Lookup function

  • Thread starter Thread starter andrthad
  • Start date Start date
A

andrthad

Hi All,

I am using the lookup function, but when the value does
not exist in the lookup table it returns the values right
above. Is there a way to write the look up function to
return nothing if the value does not exist?
 
Hi,

Make RangeLookup (the 4th parameter in the VLOOKUP function) equal zero.

Try,

=IF(ISNA(VLOOKUP(LookupValue,TableArray,ColNum,RangeLookup)),"",VLOOKUP(L
ookupValue,TableArray,ColNum,RangeLookup))

Hope this helps!
 
Use vlookup

=vlookup(lookup_value,range,column#,0)

that will return #N/A if it doesn't exist,
you can trap that

=if(isna(match(lookup_value,range,0)),"",vlookup(lookup_value,range,column#,
0))

--
For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
Back
Top