Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Converting time to decimal then rounding

Hi

I have a formula

=MOD(T11-R11,1)*24

Where T11 is 22:43 and R11 is 22:34

The difference of these time values is 9 minutes or .15. Currently I am
getting the result of .1 because it is not rounding up. The result I need is
..2 -- so that Excel will round .01 to .04 down and .05 to .09 up.

How should I adjust my formula? Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Converting time to decimal then rounding

Maybe:
ROUNDUP((A1-A2)*24,1)
Micky


"JB Bates" wrote:

Hi

I have a formula

=MOD(T11-R11,1)*24

Where T11 is 22:43 and R11 is 22:34

The difference of these time values is 9 minutes or .15. Currently I am
getting the result of .1 because it is not rounding up. The result I need is
.2 -- so that Excel will round .01 to .04 down and .05 to .09 up.

How should I adjust my formula? Thanks!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Converting time to decimal then rounding

Obviously a question of small rounding errors.
=MOD(T11*24*60-R11*24*60,24*60)/60 seems to work.
If it doesn't always work, you might need to round each component to whole
minutes by
=MOD(ROUND(T11*24*60,0)-ROUND(R11*24*60,0),24*60)/60
--
David Biddulph

JB Bates wrote:
Hi

I have a formula

=MOD(T11-R11,1)*24

Where T11 is 22:43 and R11 is 22:34

The difference of these time values is 9 minutes or .15. Currently I
am getting the result of .1 because it is not rounding up. The
result I need is .2 -- so that Excel will round .01 to .04 down and
.05 to .09 up.

How should I adjust my formula? Thanks!!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default Converting time to decimal then rounding

JB -

Skip the MOD for time values:

=ROUND((T11-R11)*24,1)

--
Daryl S


"JB Bates" wrote:

Hi

I have a formula

=MOD(T11-R11,1)*24

Where T11 is 22:43 and R11 is 22:34

The difference of these time values is 9 minutes or .15. Currently I am
getting the result of .1 because it is not rounding up. The result I need is
.2 -- so that Excel will round .01 to .04 down and .05 to .09 up.

How should I adjust my formula? Thanks!!

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
Converting time to decimal NoodNutt Excel Worksheet Functions 4 April 18th 08 06:16 AM
Rounding (decimal) elapsed time Gilbert DE CEULAER Excel Worksheet Functions 2 April 4th 08 12:37 AM
converting a decimal to time dazp1970 Excel Worksheet Functions 3 August 5th 07 09:16 AM
Converting decimal to time Charlene Excel Discussion (Misc queries) 17 April 13th 06 08:55 AM
Converting Decimal to Time Charlene Excel Discussion (Misc queries) 7 April 11th 06 10:24 PM


All times are GMT +1. The time now is 06:58 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"