Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Round time to nearest 15 minutes in decimal format


Trying to calculate time and round to nearest 15 minutes.

Example:

C2 11:46 AM
D2 4:30 PM

E2=D2-C2 this gives me hours and minutes format of 4:44

I would like the result to be rounded to the nearest 15 minutes in decimal
format. (not rounded up or down each time, but to the nearest 15 minute
interval)

In this example I would like the result to be 4.75

Any help is appreciated.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Round time to nearest 15 minutes in decimal format

Try this:

=ROUND((D2-C2)*96,0)/96*24

Or, if the times might span past midnight:

C2 = 7:00 PM
D2 = 1:00 AM

=ROUND(MOD(D2-C2,1)*96,0)/96*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"dalmom" wrote in message
...

Trying to calculate time and round to nearest 15 minutes.

Example:

C2 11:46 AM
D2 4:30 PM

E2=D2-C2 this gives me hours and minutes format of 4:44

I would like the result to be rounded to the nearest 15 minutes in decimal
format. (not rounded up or down each time, but to the nearest 15 minute
interval)

In this example I would like the result to be 4.75

Any help is appreciated.

Thank you



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Round time to nearest 15 minutes in decimal format

Perfect!

Thank you very much!



"T. Valko" wrote:

Try this:

=ROUND((D2-C2)*96,0)/96*24

Or, if the times might span past midnight:

C2 = 7:00 PM
D2 = 1:00 AM

=ROUND(MOD(D2-C2,1)*96,0)/96*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"dalmom" wrote in message
...

Trying to calculate time and round to nearest 15 minutes.

Example:

C2 11:46 AM
D2 4:30 PM

E2=D2-C2 this gives me hours and minutes format of 4:44

I would like the result to be rounded to the nearest 15 minutes in decimal
format. (not rounded up or down each time, but to the nearest 15 minute
interval)

In this example I would like the result to be 4.75

Any help is appreciated.

Thank you




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Round time to nearest 15 minutes in decimal format

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"dalmom" wrote in message
...
Perfect!

Thank you very much!



"T. Valko" wrote:

Try this:

=ROUND((D2-C2)*96,0)/96*24

Or, if the times might span past midnight:

C2 = 7:00 PM
D2 = 1:00 AM

=ROUND(MOD(D2-C2,1)*96,0)/96*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"dalmom" wrote in message
...

Trying to calculate time and round to nearest 15 minutes.

Example:

C2 11:46 AM
D2 4:30 PM

E2=D2-C2 this gives me hours and minutes format of 4:44

I would like the result to be rounded to the nearest 15 minutes in
decimal
format. (not rounded up or down each time, but to the nearest 15 minute
interval)

In this example I would like the result to be 4.75

Any help is appreciated.

Thank you






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Round time to nearest 15 minutes in decimal format

Ironically, I had the exact same question today - one day after your posts.
Thank you!

"T. Valko" wrote:

Try this:

=ROUND((D2-C2)*96,0)/96*24

Or, if the times might span past midnight:

C2 = 7:00 PM
D2 = 1:00 AM

=ROUND(MOD(D2-C2,1)*96,0)/96*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"dalmom" wrote in message
...

Trying to calculate time and round to nearest 15 minutes.

Example:

C2 11:46 AM
D2 4:30 PM

E2=D2-C2 this gives me hours and minutes format of 4:44

I would like the result to be rounded to the nearest 15 minutes in decimal
format. (not rounded up or down each time, but to the nearest 15 minute
interval)

In this example I would like the result to be 4.75

Any help is appreciated.

Thank you




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
How do I round time down to the nearest half hour? KatJ Excel Worksheet Functions 4 April 3rd 23 07:32 PM
Round/Display (HR:MN:SEC) data in decimal HR format for Time C Nauj Solrac Excel Discussion (Misc queries) 6 March 26th 09 05:34 PM
Round time up to nearest :15 Amy Excel Discussion (Misc queries) 2 December 17th 08 09:51 PM
How do I round time to the nearest quarter of an hour Meghan New Users to Excel 6 July 7th 06 06:36 PM
Round time to nearest quarter hr John Excel Worksheet Functions 2 March 16th 05 09:41 PM


All times are GMT +1. The time now is 08:16 PM.

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"