View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Negative Values resulting in error

Do you mean that you want 4 and -4 be be treated as equal?
If so: =if(ABS(c27)=ABS(v19), v19,"Error")

OR is the problem that one or both of the numbers results from a calculation
and, while they appear the same, they are different in maybe the 12 place of
decimal? Then use
=if(ABS(c27-v19)< 1E-12, v19,"Error")

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme


"KKD" wrote in message
...
I have a formula set as follows:

=if(c27=v19,(v19),("Error"))

The formula works fine until the value becomes a negative number, then it
returns as a false "Error" even though the values are still equal. How can
I
resolve this?
--
KKD