Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
I have a field D19 in time format with value 13:40:00. Assume somone gets payed for 50 $ an hour, I want to create a formula to compute how much he has earned in that time.
Now if found here that
To convert a time to a number of hours, multiply by 24
So in this case the formula would be simply
= D19 * 24 * 50
However the formula
= D19 * 24
returns -10,33333.... The format of the cell where I entered the formula is a number -> standard. Why is it returning a negative number?
When you multiply 13:40:00 by 24 you get 13.67, so when you take 13.67 and subtract 24 (which is one day) you get -10.33333 which is a value you got.
Are you sure you aren't subtracting one day from the value that you calculate? That would be the logical explanation.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have to log hours in a CRM and the only way to get a running total of the already logged hours is displayed in seconds. In trying to get excel to consider the current time (offset by 08:30 AM) minus the amount of seconds entered, for example;
When the current time is 10:43 AM and I've entered 3600 into a cell the output should be (10:43 - 08:30) - ((3600 / 60) /60) = 1.22 or 01:43.
I can't seem to find anything online in a similar situation and all the formals I've tried end up with failed results, thanks in advance for taking the time to check out my post, cheers
You need to divide the seconds by 3600 to get hours then by 24 to get fractions of a day:
=MOD(A1,1)-B1-C1/3600/24
where A1 contains NOW(), B1 contains the base time (I have used 7:30) and C1 contains the number of seconds.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to write a vlookup formula that will
1). check for duplicates in the list and
2). if there is a duplicate, then check the dates, and pull the correct rate in the vlookup return value, depending on the date.
So for example, if Michael has a rate of $100 per hour for 7/1/2017, I can assume this is his rate until noted otherwise with an additional line. On 7/3/2017 his rate changes to $120. So for hours worked on 7/1/2017 and 7/2/2017, the rate should be $100, but on 7/3/2017 and on, the rate should be $120, or until a new line is added for Michael indicating a new rate on a specific date.
Can anyone help with this?
Thanks!
You could do something like this if you sort by name and by date descending
Note it's an array formula so you need to use Ctrl+Shift+Enter
You could do this with MAXIFS(). The multiple conditions lets you find the multiple conditions, but MAXIFS() will always return an individual value unlike SUMIFS or COUNTIFS. Place hte formula in cell F2 and fill it down
=MAXIFS('Effective Rate'!$C:$C,'Effective Rate'!$A:$A,A2,'Effective Rate'!$B:$B,"<="&B2)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I need the total number of cells in sheet-1 Column B that are less than 16 hours where Sheet-1 Column A is not equal to 5 in sheet 1 E4 cell.
For Ex please see the image attached.
Please click on this link to find the example
Assuming that
column A of sheet1 are date/times, and not text, and
you are attempting to find how many date/times are more than 16 hours old
then you simply want to place the following formula in sheet2!F7:
=COUNTIF(sheet1!A:A,"<"&NOW()-0.75)
(16 hours is 0.75 of a day.)
If the data in column A is text, then it gets slightly harder as you have to ensure that Excel does not treat the NOW()-0.75 as a date/time. You can trick it by adding an extraneous character to the end of the formatted date/time so that it no longer appears to be valid, e.g.
=COUNTIF(sheet1!A:A,"<"&TEXT(NOW()-0.75,"yyyy/mm/dd hh:mm:ss")&"#")
worked for me. (The extra "#" at the end forced it to no longer be a valid date/time string.)
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!
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