Zip Code Lookup

iellingson

New Member
Joined
Dec 22, 2009
Messages
14
I have looked all over and can't find a solution for this.

I have two columns in one sheet that contain origin & destination zip codes.
I have two columns in a second sheet that contain a low value zip code and a high value zip code.

What I am looking to do is find what range this zip code falls and place a value or that range in the cell next to it on the first sheet.

Example
Code:
Sheet 1
A       B                          C       D
90210   (CA1 or 90001-92001)       60601   (IL1 or 60001-62001)

Sheet 2
A       B       C     D       E      F
90001   92001   CA1   60001   62001  IL1

I have 41,000 rows in Sheet 1 and 254 rows in Sheet 2.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Example
Code:
Sheet 1
A       B                          C       D
90210   [RANGE=cls:xl2bb-100][XR][XH=cs:4]Excel Workbook[/XH][/XR][XR][XH][/XH][XH]A[/XH][XH]B[/XH][XH]C[/XH][/XR][XR][XH]1[/XH][XD=h:r]90210[/XD][XD=h:l]CA1[/XD][XD=h:l](CA1 90001 - 92001)[/XD][/XR][XR][XH]2[/XH][XD=h:r]60601[/XD][XD=h:l]IL1[/XD][XD][/XD][/XR][XR][XH=cs:4][RANGE][XR][XD](CA1 or 90001-92001)       60601   (IL1 or 60001-62001)

Sheet 2
A       B       C     D       E      F
90001   92001   CA1   60001   62001  IL1
I have 41,000 rows in Sheet 1 and 254 rows in Sheet 2.

So are you looking to get a formula to calculate the bold sections?

B gives you just CA. C gives you what you have above. C requires you to concatenate A&B as an example on sheet 2 in col D.
Sheet1[/XD][XH][/XH][/XR][/RANGE][/XH][/XR][/RANGE]Excel 2007
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,Sheet2!$A$1:$C$3,3,TRUE)
B2=VLOOKUP(A2,Sheet2!$A$1:$C$3,3,TRUE)
C1=CONCATENATE("(",B1," ",VLOOKUP(A1,Sheet2!$A$1:$D$3,4,TRUE),")")

HTH
 
Upvote 0
So are you looking to get a formula to calculate the
Excel Workbook
ABC
190210CA1(CA1 90001 - 92001)
260601IL1
bold sections? B gives you just CA. C gives you what you have above. C requires you to concatenate A&B as an example on sheet 2 in col D. Sheet1
Excel 2007
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,Sheet2!$A$1:$C$3,3,TRUE)
B2=VLOOKUP(A2,Sheet2!$A$1:$C$3,3,TRUE)
C1=CONCATENATE("(",B1," ",VLOOKUP(A1,Sheet2!$A$1:$D$3,4,TRUE),")")

HTH

What I am looking for is for zip codes to return a value based upon the range they fall in. Example 90210 falls within CA1 but since that is a range I can't use VLookup.
 
Upvote 0
What I am looking for is for zip codes to return a value based upon the range they fall in. Example 90210 falls within CA1 but since that is a range I can't use VLookup.

If you use true instead of false as your last argument you can look up a range. Just need to separate the range into two columns first and then look up the start of the range.

In the example I put down if you put 90211 in the first column you should return CA1 as well.
 
Upvote 0
If you use true instead of false as your last argument you can look up a range. Just need to separate the range into two columns first and then look up the start of the range.

In the example I put down if you put 90211 in the first column you should return CA1 as well.

Awesome. Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

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