ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vlookup with two searches (https://www.excelbanter.com/excel-discussion-misc-queries/197632-vlookup-two-searches.html)

jack

Vlookup with two searches
 
I need to to create a vlookup that looks up within a table - first a zip code
(column a) and then a city within that zip code (column b) and returns me
columns b, c, & d.


Pete_UK

Vlookup with two searches
 
Do you want data from B C and D all in one cell (separated by
commas?), or in 3 different cells?

Which cell is the zip code that you are looking up located?

Pete

On Aug 5, 4:50*pm, Jack wrote:
I need to to create a vlookup that looks up within a table - first a zip code
(column a) and then a city within that zip code (column b) and returns me
columns b, c, & d.



jack

Vlookup with two searches
 
I want b c and d in different cells.

The zip code to be looked up is on a separate sheet in column E. The city
to be looked up is in column D.

"Pete_UK" wrote:

Do you want data from B C and D all in one cell (separated by
commas?), or in 3 different cells?

Which cell is the zip code that you are looking up located?

Pete

On Aug 5, 4:50 pm, Jack wrote:
I need to to create a vlookup that looks up within a table - first a zip code
(column a) and then a city within that zip code (column b) and returns me
columns b, c, & d.




Lars-Åke Aspelin[_2_]

Vlookup with two searches
 
On Tue, 5 Aug 2008 08:50:01 -0700, Jack
wrote:

I need to to create a vlookup that looks up within a table - first a zip code
(column a) and then a city within that zip code (column b) and returns me
columns b, c, & d.



Assuming your zip codes table is in range A2:A100, your city names
table is in range B2:B100, your zip code to look for is in cell E1,
your city name to look for is in cell F1, and that your output from
this lookup is to be placed in the three cells E2, F2 and G2 you can
try the following formula in cell E2 and copy it to cells E2:G2.

=INDEX(B$2:B$100,MATCH(1,($A$2:$A$100=$E1)*($B$2:$ B$100=$F1),0))

Note that this is an array formula that has to be entered with
CTRL+SHIFT+ENTER rather than just ENTER

Hope this helps / Lars-Åke

[email protected]

Vlookup with two searches
 
if you can, use a database: they're much faster and more reliable for
these types of tasks.


All times are GMT +1. The time now is 07:26 PM.

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