Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Any number above 15 returns false when it should be true

=IF((16.99-16)=0.99,10,0)

In this function, any number from (1.99-1) through (15.99-15) works and any
number above (16.99-16) fails.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Any number above 15 returns false when it should be true

It's because the underlying value is not 0.99, it's in fact

0.989999999999998



You could remedy this in your case by using this

=IF(ROUND(16.99-16,2)=0.99,10,0)


that's the way computer works, see these links for an explanation

http://www.mcgimpsey.com/excel/pennyoff.html

http://www.cpearson.com/excel/rounding.htm


--


Regards,


Peo Sjoblom





"tlaurie777" wrote in message
...
=IF((16.99-16)=0.99,10,0)

In this function, any number from (1.99-1) through (15.99-15) works and
any
number above (16.99-16) fails.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Any number above 15 returns false when it should be true

try
IF(ROUND(16.99-16,2)=0.99,10,0)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"tlaurie777" wrote in message
...
=IF((16.99-16)=0.99,10,0)

In this function, any number from (1.99-1) through (15.99-15) works and
any
number above (16.99-16) fails.


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
If Statement returns true when false? Eric Excel Discussion (Misc queries) 3 September 11th 06 01:58 PM
Search for 2 true arguments and return true or false David Excel Discussion (Misc queries) 3 July 15th 06 10:18 AM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
First part of "IF" function returns false even if true. ?? Bill R Excel Worksheet Functions 4 September 5th 05 08:11 PM
Convert TRUE/FALSE results to a number pomalley Excel Worksheet Functions 5 March 16th 05 05:45 PM


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