View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default countif function

PPS.... I wrote:
"joeu2004" wrote:
Instead, your issue is (or should be) with A1-A2 returning exactly zero,
despite the visible difference.

[....]
If you want to avoid that dubious heuristic described in KB 78113, you can
do several things.

Change formulas of the form =A1-A2 to =(A1-A2) or =A1-A2-0.

Surprisingly, even just adding parentheses defeats that heuristic. It is
as if parentheses are an operator; so the "last operation" is not
subtraction from the point of view of the heuristic.

Likewise, comparisons of the form IF(A1=A2,...) should be changed to
IF(A1-A2=0,...).


But there will be times when the inconsistency goes the other way. That is,
COUNTIF, MATCH and LOOKUP functions will behave as if values are different,
but the values visibly look the same when formatted to 15 significant
digits, and =A1-A2 seems to bear that out (it returns exactly zero).

So it still might be prudent to use --TEXT(...,"0.00000000000000E+00") when
you want to be sure that "what you see is what you get".