Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Weird Finding

I think the problem is with the way XL stores time. 10:00 is actually stored
as a decimal number, which in this case ends with 6 repeating. When you do
the subtraction, you end up with a decimal that has 1 repeating. Finally, XL
does the multiplication, and due to a 15 digit limit, displays the number has
25. However, if you were to format the cell as number with 13 decimals, you
can see that is shows:
24.9999999999999
Thus, it really is less than 25 (by a very small amount!)

While 11:00 to 11:25 comes out to:
25.0000000000000

For a solution, you could try:
=ROUND((B2-A2)*1440,0)

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Chris" wrote:

I have a formula set up to calculate the difference between 2 times.

Cell A2 = 10:00 AM
Cell B2 = 10:25 AM

The formula in Cell A3 is =(B2-A2)*1440. This formula returns the total
minutes between the two times into Cell A3 which the value is 25.

I have conditional formatting set up to fill in the cell color as red if the
value is less than 25. For some reason, the cell is filling in red for the
calculation between 10:00 AM and 10:25 AM which is incorrect due to the value
being exactly 25. However, if I do a calculation of 11:00 AM to 11:25 AM,
the cell with the conditional formatting does not fill in with red which is
correct because the value is exactly 25.

I typed in some other ones too. I think 12 - 12:25 turned it red too. Its
definitely weird.

Can someone explain for me?

Thanks.

 
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
Is this weird or what? Finance Guru Excel Worksheet Functions 8 August 15th 08 07:24 PM
Weird Multiplication! Gary T Excel Worksheet Functions 6 November 23rd 07 02:15 AM
Weird files Steve New Users to Excel 5 March 20th 07 05:35 AM
WEIRD QUESTION Louise Excel Discussion (Misc queries) 4 September 23rd 06 12:07 AM
Weird jhill New Users to Excel 1 August 10th 05 04:48 PM


All times are GMT +1. The time now is 03:49 PM.

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

About Us

"It's about Microsoft Excel"