Excel : Display hours over 24 when using TIME() [closed] - excel

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I found many posts which say how to display hours if it exceeds 24. But in my case it doesn't work.
I have 3 cells which contain hours, minutes, seconds. In the fourth cell I used formula =TIME(E4,F4,G4) where E4 contains hours, F4 contains minutes and G4 contains seconds. I formatted the cell using
Format Cells --> Number --> Custom --> [hh]:mm:ss
. But still am not getting the correct value in the cell.
hours | minutes | seconds | Time
81 | 22 | 27.045 | 09:22:27
Expected value as Time is "81:22:27"
Is there any other formatting required?
Thanks in advance.

The Time function takes the remainder for each argument. The remainder of 81/24 is 9, which is why it is showing 9 hours. You would need to add the rest back in, like so:
=TIME(,F4,G4)+E4/24

Since your "expected value" is 81:22:27, you could just construct the time as a concatenation of the respective values:
=RIGHT("0"&INT(E4),2)&":"&RIGHT("0"&INT(F4),2)&":"&RIGHT("0"&INT(G4),2)

You will need to calculate your time differently - but format the result as [h]:mm:ss
If Hours, Minutes, Secs are in A1, A2, A3
Then in A4 use formula =DATE(0,1,A1/24)+TIME(A1,B1,C1)
Format A4 as [h]:mm:ss and that will do it!

Related

Subtract hours and minutes from a time entered in Excel 2013 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I want to know the time when 12 hrs and 30 mins is subtracted from a time let us say 10:00 AM(it should display 9:30 PM). But since excel by default stores this date as 1st Jan 1990, I am getting a negative timing and excel does not display it. How do I make sure that when a time is entered in a cell,I can subtract certain hours from it and display the time in AM/PM format? PS: I tried changing it to 1904 format,but this did not help.
I think it's enough to put
=MOD(A2-B2,1)
where the first time is in A2 and the second in B2.
That will get the fraction part (the hours) and give it a positive sign which should be what you want.

Extracting data from text [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I am trying to convert text using only Excel data manipulation functions (not Data/Text to Columns).
Column A looks like this:
A1: 10 11 03,-690000,100.163685
A2: 14 11 03,-761000,100.3977
A3: 17 11 03,-682000,100.575887
and so on.
I'd like to get the date (01 11 03 recognised as a date) in column B, the middle data (between the two commas) in column C and the data on the right (after the second comma) in column D using the full accuracy displayed.
Seems you have options that would be easier, but please try in B1:
=DATEVALUE(LEFT(A1,2)&"/"&MID(A1,4,2)&"/"&MID(A1,7,2))
in C1:
=1*MID(A1,FIND(",",A1)+1,FIND(",",MID(A1,FIND(",",A1)+1,99))-1)
in D1:
=1*MID(A1,FIND(",",A1,FIND(",",A1)+1)+1,99)
and copy down to suit.
I believe the easiest way for you to handle this situation is to simply save your current worksheet as a text file, and then reopen it in Excel. When you open the file again in Excel it should automatically separate out the three columns the way you want it. Here is a screen capture from my Excel after I have done this:
Next you can format the A column as a date however you wish.

use Excel to count numbers in specified range [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
suppose we have following data
23
30
27.5
18
4
11
9
10
16
24
56
90
65
17
19
44
72
and i want to count number of elements in range [10-60] ? sure we can use if for determining if our value is in interval,but is there any function in excel like countrange or something like this which takes input as a vector and also range and returns number of element which fits in that range?thanks very much
This should also work:
=COUNTIF(A1:A17;">=10")-COUNTIF(A1:A17;">60")
A1:A17 is the range of course.
I think you can do this using COUNTIFS function
=COUNTIFS($A$2:$A$9, ">=10",$A$2:$A$9,"<=60")
COUNTIFS
Check out COUNTIF
COUNTIF function counts the number of cells within a range that meet a single criterion (condition) that you specify.
=COUNTIF(range, criteria)
Also there is COUNTIFS
http://office.microsoft.com/en-us/excel-help/count-numbers-greater-than-or-less-than-a-number-HP003056117.aspx
I don't think there is a build in function to do that. You'd need to write one on your own at takes a range of fields, iterates of all elements and increments a predefined return value if a field meets your requirements.
You can read how that's done here: Creating custom functions
Considering the latter part of your question (ie for a number of ranges rather just than a single one) yes, there is an Excel function for this, =FREQUENCY.
The answer for [10-60] is 11, as shown below, but with the upper limits for the bins in ColumnC, one array formula will populate all counts for the ranges selected:

Find which range a cell belongs to [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have an excel sheet with columns A and B populated with numbers, a la:
1 12
13 20
21 30
31 35
This is just as an example, in reality A and B are columns of length 50ish.
In this example, I have another column with values in it between 1 and 30. I want to write a function that returns which range it is between. Perhaps a 1 if it is between the first range (1-12) 2 between the second (13-20) etc.
This is the way the data was presented to me, if it needs to be re-arranged so be it.
Does anyone know any functions that would be useful to solve this problem? I have read that nested if statements are limited to 7 "if's" so I would need to write out a bunch of them.
Thanks folks.
As #Tim has said, =MATCH looks most suitable, without its optional third parameter, so that it “finds the largest value that is less than or equal to lookup_value.” Hence the upper bounds (right-hand column in your question) are not required for this formula. The numbers returned are the relative positions of the ‘match’ in the selected array. If your “another column with values in it between 1 and 30” is say C and starts in Row2 then =MATCH(C2,A:A) copied down is a generalisation that will only return 1, 2, 3 if the population of A:B starts in Row1. In other words, if the 1 in A is say in Row3 then I’d recommend:
=MATCH(C2,A$3:A$6)
copied down to suit.
The last number in A (ie 31) can be anything as long as it is more than the upper bound of your “between 1 and 30”.

Excel equations using months [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am trying to come up with an equation. Here is what I am trying to do. I am trying to get a running total by multiplying a monthly rate for renting something that will at all times keep a running total at all times. Monthly rate x month started = Running total. Keep in mind there doesn't need to be a total based on the number of days owned on a month (Not to be pro-rated in other words.) Something like if it cost $100 a month in January. Then by July 1st you would owe $600. On June 15th for example you would still only owe $500 because the month hasn't ended. In other words the running total would only show completed month totals. Maybe I don't have the best knowledge of excel but I am ok at the equations. The problem is from using months instead of simply multiplying numbers. Any help would be appreciated. Thanks.
My approach to this would be to have dates in one column like '01/Jan/2013', '01/Feb/2013' etc. then the next column would have the formula of = 100 + CellAbove
Use DateDif or Month
= DATEDIF ( start_date , end_date , "interval")
so to calc the months from January to July using Months try this
=DateDif("1/11/2013", '6/1/2013"), "M") will yield 4
=DateDif("1/01/2013", '6/1/2013"), "M") will yield 5
=Month("1/11/2013") - MONTH("6/1/2013") will yield -5
=Month("6/1/2013") - MONTH("1/1/2013") will yield 5
Substitute the References in place of my Direct Dates. i.e.
A1 = "6/1/2013"
A2 = "1/1/2013"
A3 = "=MONTH(A1)-Month(A2)"
See what works for you!
Steve

Resources