Contributor

# Part lookup

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

# Re: Part lookup

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

Is this what you are looking for?

# Re: Part lookup

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

# Re: Part lookup

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

# Re: Part lookup

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.

# Re: Part lookup

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

# Re: Part lookup

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

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

# Re: Part lookup

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

# Re: Part lookup

``=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.

# Re: Part lookup

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