Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kaywe44
 
Posts: n/a
Default IF formula doesn't work with certain numbers

I have 2 columns, both summed. If the sums equal, the 3rd column is to say
"ok". If they don't, it says "check bal". We have been doing this for
months. Today I entered "197.14" in both columns. The sum total is the
same. The IF column says "check bal". I can put in "197" and it works,
"197.12" works, "197.13" & "197.15" work. "197.10" also doesn't work. We
finally added 197.14 to a total in another cell & it worked fine. We
reformatted & made sure everything was numbers & that there was no rounding
in the total numbers. Any ideas? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default IF formula doesn't work with certain numbers

Start out by by displaying the size of the difference.
--
Gary''s Student


"kaywe44" wrote:

I have 2 columns, both summed. If the sums equal, the 3rd column is to say
"ok". If they don't, it says "check bal". We have been doing this for
months. Today I entered "197.14" in both columns. The sum total is the
same. The IF column says "check bal". I can put in "197" and it works,
"197.12" works, "197.13" & "197.15" work. "197.10" also doesn't work. We
finally added 197.14 to a total in another cell & it worked fine. We
reformatted & made sure everything was numbers & that there was no rounding
in the total numbers. Any ideas? Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jerry W. Lewis
 
Posts: n/a
Default IF formula doesn't work with certain numbers

If you are saying that you typed 197.14 in two cells and an IF statement
declared them different, then I would expect that =COUNT(cell1,cell2) would
return 1, indicating that one cell contains text and the other a number.

If you are saying that two different calculations both arrived at answers of
197.14, yet an IF statement declared them different, then I would expect that
the formula
=(cell1-cell2)
would return something other than zero (note that the parentheses are needed
here).

Almost all software (including Excel) does binary math. Most terminating
decimal fractions (including .14) are nonterminating binary fractions that
can only be approximated in binary. When you do math with approximate
inputs, it should not be surprising when the final answer is only
approximately correct.

Assuming that you are only adding and subtracting numbers that each have at
most 2 decimal places, then If you would round the results of calculations to
2-decimal places, you would do no violence to the calculation and avoid
surprises caused by accumulated approximations to the inputs. Alternately,
if you did your accounting in pennies instead of dollars, then you would
avoid the issue altogether, since all integers with no more than 15 digits
are exactly representable in the IEEE standard binary format that Excel uses.

Jerry

"kaywe44" wrote:

I have 2 columns, both summed. If the sums equal, the 3rd column is to say
"ok". If they don't, it says "check bal". We have been doing this for
months. Today I entered "197.14" in both columns. The sum total is the
same. The IF column says "check bal". I can put in "197" and it works,
"197.12" works, "197.13" & "197.15" work. "197.10" also doesn't work. We
finally added 197.14 to a total in another cell & it worked fine. We
reformatted & made sure everything was numbers & that there was no rounding
in the total numbers. Any ideas? Thanks!

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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
IF formula - evaluation shows it should work but... Juliet Excel Worksheet Functions 6 January 17th 06 10:39 PM
Auto Extend Formulas doesn't work for a particular formula niwrad Excel Discussion (Misc queries) 3 January 9th 06 09:36 AM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM


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

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"