Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Calculating Hours

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Calculating Hours

=(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!

"Ruthie" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Calculating Hours

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

On Oct 1, 6:26*pm, Ruthie wrote:
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?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calculating Hours

.... or more likely =ROUND((B1-A1)*96,0) ?

Pete's formula would return 5 for a 1:00 or 1:05 difference, instead of 4
which I would regard as being "to the nearest quarter of an hour".
--
David

"Pete_UK" wrote in message
...
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

On Oct 1, 6:26 pm, Ruthie wrote:
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating hours Marty Excel Worksheet Functions 5 September 24th 08 10:56 AM
Calculating hours Kelly_Durden via OfficeKB.com Excel Discussion (Misc queries) 2 January 30th 08 04:47 PM
Calculating hours Pagina-eind hyperlink probleem Excel Discussion (Misc queries) 3 October 18th 07 01:57 PM
Calculating hours Ian[_3_] Excel Worksheet Functions 8 September 19th 07 11:51 AM
calculating hours bus2408 Excel Worksheet Functions 2 June 23rd 05 02:39 PM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"