Time calculator minus time duration

av1alicia

New Member
Joined
Nov 21, 2023
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I am trying to calculate the time between two cells and have the answer in hours, with two decimals, but in .25 minute increments. With the final cell providing the unit number. With the unit rule of 8 applied
A1(time in)= 8:32a
A2(time out) = 10:40a
A3(calculates total time billed in hh:mm)
A4 (time billed divided by.25)= Units

The time between 8:32:00 AM and 10:40:00 AM is:

2 hours, 8 minutes,

Units = 8
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I am trying to calculate the time between two cells and have the answer in hours, with two decimals, but in .25 minute increments. With the final cell providing the unit number. With the unit rule of 8 applied
A1(time in)= 8:32a
A2(time out) = 10:40a
A3(calculates total time billed in hh:mm)
A4 (time billed divided by.25)= Units

The time between 8:32:00 AM and 10:40:00 AM is:

2 hours, 8 minutes,

Units = 8
So what is your question? What do you mean by "unit rule of 8"? Do you want in 15 second intervals or did you mean .25 of an hour? Will your time ever wrap around 00:00:00 (from 23:00:00 to 1:00:00 -next day)?
 
Upvote 0
I'm guessing you want to round down minutes, by quarter hours. If you want to round down seconds by quarter seconds you can do that similarly:


Book1
ABCD
1Time INTime OUTTime Diffunits of 15 minutes each
208:32:0010:55:0002:23:009.00
Sheet4
Cell Formulas
RangeFormula
C2C2=B2-A2
D2D2=(HOUR(B2-A2)/0.25)+(INT(MINUTE(B2-A2)/15))
 
Upvote 0
Another option (formula in H2):

Book1
ABCDEFGH
1InOutTime difference [h:mm]Time difference in hours [h]Units of 0.25 hours (quarter hour or 15 min)Truncated UnitsRounded UnitsAll in one formula to get expeted result
28:3210:402:082.138.533333333898
Sheet2
Cell Formulas
RangeFormula
C2C2=B2-A2
D2D2=C2*24
E2E2=D2/0.25
F2F2=TRUNC(E2,0)
G2G2=ROUND(E2,0)
H2H2=TRUNC((B2-A2)*24/0.25,0)
 
Upvote 0
So what is your question? What do you mean by "unit rule of 8"? Do you want in 15 second intervals or did you mean .25 of an hour? Will your time ever wrap around 00:00:00 (from 23:00:00 to 1:00:00 -next day)?
No the time will never wrap to the next day
 
Upvote 0
No the time will never go into the next day
And the time hh:mm then will convert into units billed every 15 minutes at one unit each
 
Upvote 0
Yay! Yes these formulas work. Thank you Everyone. I will never be an excel master. I appreciate you that are!
 
Upvote 0
Happy to help. And welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,970
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top