Look up

C

Compqueen

Is there a way to use a VLookup where your look up table is not sorted in
alpha order?
 
D

Dave

Hi,
Yes. If you use the 4th argument and set it to FALSE.
=VLOOKUP(LookupValue,LookupTable,ColumnToReturn,FALSE)
By using the FALSE argument, VLOOKUP looks for an exact match only, and
doesn't need the table to be sorted alphabetically.
However, if VLOOKUP doesn't find the LookupValue you give it, it returns a
#N/A error, which you can trap for if you want.
=IF(ISNA(VLOOKUP(LookupValue,LookupTable,ColumnToReturn,FALSE),"Lookup Value
Not Found",VLOOKUP(LookupValue,LookupTable,ColumnToReturn,FALSE)

Regards - Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top