Help to compare two lists to show a corrosponding value

clairep

New Member
Joined
Nov 17, 2011
Messages
3
Hi, I have a list of towns and their post codes (post code list) in an excel spreadsheet. In a seperate spreadsheet I have a long list of addresses, I need to be able to look up each town in the post code list, and return the appropriate post code in the next column in my address list. Please can someone tell me if this can be done, and if so, how to do it. Thank you.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,424
Office Version
  1. 2019
A post code defines a street in a town not the town itself.
You need a list of streets and postcodes to determine the correct postcode.
 

bamblack

Board Regular
Joined
Aug 15, 2011
Messages
208
Easily achievable via a vlookup formula. Punch this into C2

Code:
=VLOOKUP(B2,'Post codes'!A:B, 2)

Then fill that down. That tells it to look for the value in B2 in the defined range ('Post codes!A:B) then the offset in that row to return when it finds it (2). I believe that's how it's set up at least. The formula works which is the important part!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,255
Messages
5,769,061
Members
425,515
Latest member
baltusf

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
Top