Vlookup with two coloumms

niladri20052006

Board Regular
Joined
Dec 3, 2010
Messages
121
Hi All,

I have two columns consisting of City and State names like below:

<table width="128" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="2"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" width="64" height="20">Dallas</td> <td style="width: 48pt;" width="64">TX</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Phoenix</td> <td>AZ</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Portland</td> <td>OR</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Seattle</td> <td>WA</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Washington</td> <td> DC</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Chicago</td> <td>IL</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Atlanta</td> <td>GA</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Chicago</td> <td>IL</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">New York</td> <td>NY</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Los Angeles</td> <td>CA</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Denver</td> <td>CO</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Atlanta</td> <td>GA</td> </tr> </tbody></table>
I have another sheet where I will have to match those contacts where city and states names will match.


What will be the Vlookup formula?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Code:
=INDEX(VALUEStoRETURN,Match(1,(CityLookupRange=A1)*(StateLookupRange=A2),0))

Confirmed with Ctrl+Shift+Enter
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,716
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top