Part lookup

Copper Contributor

Hey Guys. Hoping someone can help. I'm trying to do a Vlookup for postcodes and what area they are. 

I need a Vlookup rule that will only search for the first one of two letters of the postcode, not the whole thing. Does anyone have any ideas please?

 

10 Replies

@Jamesboden 

=VLOOKUP(LEFT(F4,1),$B$4:$C$16,2,FALSE)

Is this what you are looking for?

postcode area.JPG 

Hey. Going to be honest, I only half understand this

@Jamesboden 

Can you attach a screenshot of your sheet without sensitive data? I would try to adapt a vlookup to your requirement.

Problem I'm having is that when i do a standard lookup it only finds the first letter. So S for example is sheffield. So if I search for SO which is southhampton it still returns sheffield as that is the first letter. If that makes sense.

So basically, If I enter the first part of any postcode. Say SO I want it to return the area its is in.

@Jamesboden 

=VLOOKUP(D2,$A$2:$B$11,2,FALSE)

You can try this formula. The ranges can be adapted as required.

PO Area.JPG

Hey. this is fine. but I want to put in a full postcode AB1 1AA for example and it return an answer.

@Jamesboden 

=IFERROR(VLOOKUP(LEFT(D2,2),$A$2:$B$11,2,FALSE),VLOOKUP(LEFT(D2,1),$A$2:$B$11,2,FALSE))

You can try this formula.

PO code area.JPG 

Yep thats the one. Thank you so much for your help.