LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default If function confused with 0.1

Thanks Mike, I guessed it may be down to a rounding error

Cheers
Chris

"Mike H" wrote:

Chris,

It's all to do with the way Excel does arithmetic. If you do you sum 1.7-1.6
and expand the formula cell to 9 decimal places you'll see the answer comes
out as 0.0999999 and while that may seem odd it entirely meets the IEEE
standard for floating point arithmetic.

Have a look here for a full explanation

http://support.microsoft.com/default.aspx/kb/78113

Now to your proble, try this

=IF(ROUND(C1,1)=0.1,"yes","no")

Mike



"Chris B" wrote:

Hi,

I have set up the following If function to determine if the answer to a
simple subtraction of two decimal numbers is 0.1.

=IF(C1=0.1,"yes","no")

The calculation is merely C1=A1-B1

However, for some calculations it is giving the answer "no" when the answer
is clearly 0.1!

1.7-1.6 gives a no response as does 1.4-1.3. Interestingly, from 4.1-4 all
answers are no!

Hope someone can help
Cheers




 
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
Confused with IF and LOOKUP function Chris Excel Discussion (Misc queries) 3 June 17th 08 02:34 AM
Very confused.... mizterbusy Excel Discussion (Misc queries) 1 September 24th 06 06:44 AM
Confused on a function daddioja Excel Worksheet Functions 3 June 9th 06 08:50 PM
confused by COLUMN worksheet function KG Excel Discussion (Misc queries) 3 May 15th 05 04:28 AM
Sorry I am confused Desmond Excel Discussion (Misc queries) 7 April 24th 05 10:40 PM


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