Jump to content
[[Template core/front/custom/_customHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Excel help/question


Grits and Shins
 Share

Recommended Posts

Anybody know how I can use the VLOOKUP function matching on more than 1 column?

 

Say for example on sheet 1 column 1 contains state names, column 2 contains city names and columns 3 thru whatever contain data

On sheet 2 column 1 contains state nam, column 2 contains city names

 

I'd like to do a VLOOKUP where I retrieve date from sheet 2 where BOTH the state and city for a particular row match.

Link to comment
Share on other sites

Anybody know how I can use the VLOOKUP function matching on more than 1 column?

 

Say for example on sheet 1 column 1 contains state names, column 2 contains city names and columns 3 thru whatever contain data

On sheet 2 column 1 contains state nam, column 2 contains city names

 

I'd like to do a VLOOKUP where I retrieve date from sheet 2 where BOTH the state and city for a particular row match.

 

Are there that many cities in multiple states?

 

 

If you must do that I think a Pivot table will be what you're looking for.

Link to comment
Share on other sites

Possibly a nested series of VLookups within an If..Then function.

 

Something like if VLookup for state returns a value, then perform Vlookup on city (or city then state depending on how you need to do it), retrieving the value you want. I haven't tried testing this, but in theory it may work.

 

ETA: Not sure if that works after playing around a little bit, but perhaps someone knows of a way based off of that thinking.

Edited by Big Country
Link to comment
Share on other sites

Possibly a nested series of VLookups within an If..Then function.

 

Something like if VLookup for state returns a value, then perform Vlookup on city (or city then state depending on how you need to do it), retrieving the value you want. I haven't tried testing this, but in theory it may work.

 

ETA: Not sure if that works after playing around a little bit, but perhaps someone knows of a way based off of that thinking.

 

Yeah I have tried to nested IF and VLOOKUP approach ... the problem is that there didn't appear to be an easy way to verify that BOTH the state and city match ON THE SAME row.

Link to comment
Share on other sites

From an Access forum, but in their Excel subforum

 

Is it possible to do a VLOOKUP using two lookup fields? For example: A spreadsheet has two columns titled Last Name and First Name. The lookup spreadsheet has the same fields. There are several of the same last names so the secondary lookup needs to be on the first name.

 

Response:

 

If the Last Name is in column A and First Name in column B, lookup value in column C, lookup names in D1 and E1:

 

=INDEX(C1:C3,MATCH(D1&E1,A1:A3&B1:B3,0))

 

 

I'll keep looking to see if I can find any other potential solutions

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information