How to do a Vlookup for part of a value

phipe

New Member
Joined
Mar 22, 2011
Messages
1
Hello,

Here is my problem - I have a list with all members of our website - 40 000 entries and their postcodes. Postcodes are in UK so typical format is for example SE1 5TW
I also have another list with postcode sectors provided by a client. So if a postcode is SE1 5TW, the sector will be fust SE1 5

The client wants to know how many members we have in this sectors, so:

If I have A1:A40000 all the postcodes and
B1:B1650 all the sectors how can I find how many (members)postcodes we have for each sector ? Note that postcodes may not be unique.

I may also need to match results to other data later, so actual postcodes rather than just a number (count) is what I`m after.

I tried Vlookup(B1&"*", A:A, 1, False) but I realised that I actually need Vlookup(A1,B1&"*":B1650&"*", 1, False) however I believe there is no such formula.

Any help will be really appreciated !

Thanks in advance !

Filip
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
If the full postcode is in column A, and you are looking at a list of sectors, you could use the Find command within the VLOOKUP:

=VLOOKUP(LEFT(A1,FIND(" ",A1)+1)),A:A,1,0)

If you are looking in a list of postcodes, not sectors, look up LEFT(A1,FIND(" ",A1)+1))&"*"
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,334
Members
452,907
Latest member
Roland Deschain

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