ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Look up (https://www.excelbanter.com/excel-worksheet-functions/190095-look-up.html)

Compqueen

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



Jim Cone[_2_]

Look up
 

Use False or 0 for the fourth argument.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"Compqueen"
wrote in message
Is there a way to use a VLookup where your look up table is not sorted in
alpha order?



Dave

Look up
 
Hi,
Yes. If you use the 4th argument and set it to FALSE.
=VLOOKUP(LookupValue,LookupTable,ColumnToReturn,FA LSE)
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,ColumnToR eturn,FALSE),"Lookup Value
Not Found",VLOOKUP(LookupValue,LookupTable,ColumnToRet urn,FALSE)

Regards - Dave.


All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com