Calculating Hours

R

Ruthie

I need to compute the difference between to times to the nearest quarter of
an hour.

For example, if someone enters 12:30 PM and 1:40 PM, I need to return the
number 5 (because there are 5 - 15 min increments). How do I do this?
 
S

Sean Timmons

=(End Time - Start time)*96

an hour is 1/24th

So, subtracting a time from another time will provide .041667 for each hour.
You'd multiply by 24 to get 1 for each hour.

Sicne you want by the 15 minute increment, multiply the 24 by 4, getting
96... ta da!
 
P

Pete_UK

Try this:

=INT((B1-A1)*96)+1

where A1 contains the start time and B1 the finish time in Excel time
format.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top