View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default If Statement linked to cell with VLOOKUP problem - getting wrong v

I meant to add before sending, it may also be that the value returned
from the Vlookup is text.
In which case
=IF(--(A1)A2,A1,A2)
the double unary minus -- in front of (A1) will coerce the text value to
numeric.

--
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Mike

The value returned from the Vlookup, may be displaying a value that is
the same as A2, but is actually different e,g, the value might be
2.000345 but with a 2 decimal format may be displaying 2.00
Try =IF(INT(A1)INT(A2),A1,A2)
assuming that that level of precision is suitable for your purposes.

--
Regards

Roger Govier


"Mike R." wrote in message
...
Hi,
I have a simple IF statement that is =IF(A1A2,A1,A2). The cell A1
is a
VLOOKUP to get the value. This seems to be giving me a false answer
in my If
statement and it always equals the value in A1. If I just type in
the value
of A1 (to test it), the If statement works properly.... help.
Mike