Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default "IF" formula gives wrong answer

The formula is pretty simple -- if(A-b-c=0, "OK", "ERROR"). Use it on a
column and around 3-5% gives "ERROR" as result even though the statement is
true. Urgent help needed!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default "IF" formula gives wrong answer

If you format a cell wit =A-b-c to display 15 digits you'll probably find that isn't not exactly zero.

Look here for a possible explanation

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"yhoy" wrote in message ...
| The formula is pretty simple -- if(A-b-c=0, "OK", "ERROR"). Use it on a
| column and around 3-5% gives "ERROR" as result even though the statement is
| true. Urgent help needed!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default "IF" formula gives wrong answer


Out of curiosity, I followed your instruction below and display 30 digits
and it's still all zero. Does that sound right?


"Niek Otten" wrote:

If you format a cell wit =A-b-c to display 15 digits you'll probably find that isn't not exactly zero.

Look here for a possible explanation

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"yhoy" wrote in message ...
| The formula is pretty simple -- if(A-b-c=0, "OK", "ERROR"). Use it on a
| column and around 3-5% gives "ERROR" as result even though the statement is
| true. Urgent help needed!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default "IF" formula gives wrong answer

No. Follow Ron's advice

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"yhoy" wrote in message ...
|
| Out of curiosity, I followed your instruction below and display 30 digits
| and it's still all zero. Does that sound right?
|
|
| "Niek Otten" wrote:
|
| If you format a cell wit =A-b-c to display 15 digits you'll probably find that isn't not exactly zero.
|
| Look here for a possible explanation
|
| http://support.microsoft.com/kb/78113
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "yhoy" wrote in message ...
| | The formula is pretty simple -- if(A-b-c=0, "OK", "ERROR"). Use it on a
| | column and around 3-5% gives "ERROR" as result even though the statement is
| | true. Urgent help needed!
|
|
|


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default "IF" formula gives wrong answer

Try multiplying the result by 1E16 or something, and see what you get then.
--
David Biddulph

"yhoy" wrote in message
...

Out of curiosity, I followed your instruction below and display 30 digits
and it's still all zero. Does that sound right?


"Niek Otten" wrote:

If you format a cell wit =A-b-c to display 15 digits you'll probably find
that isn't not exactly zero.

Look here for a possible explanation

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"yhoy" wrote in message
...
| The formula is pretty simple -- if(A-b-c=0, "OK", "ERROR"). Use it on a
| column and around 3-5% gives "ERROR" as result even though the
statement is
| true. Urgent help needed!







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default "IF" formula gives wrong answer

On Tue, 12 Feb 2008 03:07:00 -0800, yhoy
wrote:

The formula is pretty simple -- if(A-b-c=0, "OK", "ERROR"). Use it on a
column and around 3-5% gives "ERROR" as result even though the statement is
true. Urgent help needed!


Try

if(round(a-b-c,5) = 0, "OK","ERROR")

Change the 5 to some value that gives you sufficient precision for your
calculation.

Look up "rounding errors" in this NG and also in the MSKB
--ron
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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
How to change "automax" to "autosum"? (probablyl wrong terminology) [email protected] Excel Discussion (Misc queries) 5 November 6th 06 08:07 PM
VBA setting formula for a cell causes "Wrong data type" error undercups Excel Discussion (Misc queries) 4 September 17th 06 10:14 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Using the answer IF "true" in another formula? Yvonne Excel Worksheet Functions 1 April 22nd 06 05:30 PM


All times are GMT +1. The time now is 03:55 AM.

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"