Thread: Vlookup Error
View Single Post
  #6   Report Post  
Ola
 
Posts: n/a
Default

Hi,

Try this: =LOOKUPV(C1,A1:B100,2,0,"")


But first
1. Press Alt+F11. Insert Module. Copy and Paste the below.

Function LookupV(Lookup_Value, Table_Array As Range, Col_Index_Num,
Range_value, Optional Error_Msg)
LookupV = Application.VLookup(Lookup_Value, Table_Array, Col_Index_Num,
Range_value)
If IsError(LookupV) And Not IsMissing(Error_Msg) Then LookupV =
Error_Msg
End Function

The LOOKUPV formula is Shorter and is Faster then VLOOKUP
Make sure the VBA code is only 4 rows!

Regards,
Ola