View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey Duke Carey is offline
external usenet poster
 
Posts: 1,081
Default Excel 2003 - Simple IF() Formula Will Not Work For Me

The issue is rounding. One or more of the cells probably shows a value that
carries ou to many decimals past the 2 you have entered, but displays to,
say, 11813.21.

Use this formula instead

=IF(round(A1-B1-C1,2)=0,"OK","OFF")

"Scott" wrote:

I may be very sleepy, but try this and tell me why I get "OFF", instead of
"OK":

1. Open a new workbook
2. Enter the following:
Cell A1 =11813.21
B1 =5375.65
C1 =6437.56
D1 =IF(A1-B1-C1=0,"OK","OFF")

3. My result in D1 is "OFF" and it should be "OK"
4. Get a calculator or run it in your smart brain:
11813.21 minus 5375.65 minus 6437.56 = 0 (Big fat Zero!!)

If you play with the first three cells, sometimes it works, sometimes not.
I cannot see why or why not.

If the TRUE statement is performed in a seperate cell, and the IF is done in
another, I get "OK" when I should.

Is this a flaw in Excel 2003?