New to Excel

twc238

New Member
Joined
Mar 10, 2009
Messages
4
I'm kinda new to excel and need some help on a formula.
I need to calculate Actual drive time and actual work time in units if 1 unit = 5 minutes.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,890
A1 is date/time start (format as mm/dd/yy hh:mm)
B1 is date/time finish (format as mm/dd/yy hh:mm)
formula is
Code:
=CEILING(24*60*(B1-A1),5)/5
rounds up to the next 5 minute interval, 28 min = 6 units
 

twc238

New Member
Joined
Mar 10, 2009
Messages
4
Thanks Phil, but could you explain where the numbers come from so I can understand it a little better. =ceiling(24(hrs)x60(minutes)x (cells), 5?)/5?
 

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,890
The values in cells A1 & B1 are in days and fractions of days. If you put in 03/11/2009 12:00 (that's noon), Excel preserves that value as 39883.5

B1-A1 is the finish date/time - the start date/time, so if you start at 3/11/2009 12:05 and end at 3/11/2009 12:22 the math works out as
39883.5152777778-39883.5034722222 = 0.01180555555

Multiplying that value by 24*60 gives the number of minutes used (17)

Using the ceiling function with a 5 as the second parameter rounds the first parameter (17) up to the next multiple of 5 (so 17 minutes would be converted to 20)
dividing that by 5 to convert to units results in 4
 

twc238

New Member
Joined
Mar 10, 2009
Messages
4
Thanks Phil.........That actually help me see it in my head....so I have a better understanding of it so I can explain it to others........

appreciate it....
 

Watch MrExcel Video

Forum statistics

Threads
1,130,112
Messages
5,640,168
Members
417,129
Latest member
geekzilla

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
Top