View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Problem with VLOOKUP Results.

And if the OP wanted a second column, that range would have to be at least 2
columns wide:

=VLOOKUP($A2,'AIRPORT CODES'!$A$2:$b$2989,2,0)

If the OP were only looking at a single column, maybe =match() would be a better
function to use.

Roger Govier wrote:

Apologies, to include the 4th parameter that should have course have read
=VLOOKUP($A2,'AIRPORT CODES'!$A$2:$A$2989,1,0)

but I'm not sure about the 1. That is only finding the same name in the
first column of Airport Codes.
Surely you would want some offset from this, perhaps 2?

=VLOOKUP($A2,'AIRPORT CODES'!$A$2:$A$2989,2,0)

--
Regards
Roger Govier

"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi Greg

You need to set the 4th argument of the Vlookup to be False or 0 instead
of True, in order to find an exact match if the data is not in sorted
order.
also, you should be looking up a single cell, not a range of cells

=VLOOKUP($A2,'AIRPORT CODES'!$A$2:$A$2989,1)

--
Regards
Roger Govier

"Greg" wrote in message
...
My issue is:

Col A has the airport codes (ABE) and my table array has the airport
codes
decoded.
The formula I used:
=VLOOKUP($A$2:$A$2544,'AIRPORT CODES'!$A$2:$A$2989,1)
should have returned the decoded airport city of ABE - Allentown, PA, USA
Allentown Bethlehem EastonAirport.
Instead it returned ABC - Albacete, Spain Albacete Airport. Can anyone
tell
me what I'm doing wrong?



--
I am always thankful for the help everyone gives me.

Virtual Drinks for all!



--

Dave Peterson