View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default IF VLOOKUP Nested function

The formula =IF(A1,1,0) returns 0 when A1 is blank because a blank is
treated as ) and zero is treated as FALSE. It returns 1 if A1 has a numeric
value because an number is treated as TRUE
But it returns #VALUE! if A1 has text because the first argument is not a
Boolean value.
Try IF(ISBLANK(A12), "", VLOOKUP.........)
But recall that if A12 has a formula that returns a null string ("") it will
not pass the ISBLANK test; the cell must be truly empty.
best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Paul LeBlanc" wrote in message
...
I have a formula that returns a lookup value
=VLOOKUP(A10,VarietyLookUpTable!$A$2:$C$56,2,FALSE )
but when I try to make it so that there is no value in the cell if the
reference cell is blank
=IF(A12,VLOOKUP(A12,VarietyLookUpTable!$A$2:$C$56, 2,FALSE),"")
It only works if the cell is blank, if there is a value in the cell which
is
formatted as text I get the #VALUE! instead of the usual result