+ Reply to Thread
Results 1 to 9 of 9

Using a full postcode return the town value from a list of shorter pre fix's

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Midlands, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Using a full postcode return the town value from a list of shorter pre fix's

    Hi,

    I have a list of postcodes which in the example is column A, and I want to return the town value from column I, where the first 4 digitis of the full postode in Column A are found in the pre fix postcode list of column G. The full sheet I have has around 600 full postcodes, however the example attached only has 6, and with the info on it should only retrun 1 value

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,695

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    =VLOOKUP(LEFT(A2,5),$G$2:$I$7,3,0)

    Try this one
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Registered User
    Join Date
    03-29-2014
    Location
    Midlands, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    Hi,

    Thanks for your reply. That seems to work for a couple of examples but not for the whole lot. Out of the full list only 6 are coming back with the retrun value with the rest remaining NA. I've updated the example document so you can see what I mean

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,695

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    Adjust the search range

    =VLOOKUP(LEFT(A2,5),$G$2:$I$7,3,0)

  5. #5
    Registered User
    Join Date
    03-29-2014
    Location
    Midlands, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    Hi,

    Got it, thanks for your help :-)

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    you could also try this
    =LOOKUP(10^99,SEARCH(SUBSTITUTE($G$2:$G$1423," ",""),SUBSTITUTE(A2," ","")),$I$2:$I$1423)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    03-29-2014
    Location
    Midlands, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    Hi,

    I've actually have found a problem where the full postcode has an initial double digit number, ie LN32, where it then doesnt pick up the corresponding town from the table? Everything in the standard format ie DE6 is fine

  8. #8
    Registered User
    Join Date
    03-29-2014
    Location
    Midlands, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    Hi,

    =LOOKUP(10^99,SEARCH(SUBSTITUTE($G$2:$G$1423," ",""),SUBSTITUTE(A2," ","")),$I$2:$I$1423) works perferctly

    Thanks

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Using a full postcode return the town value from a list of shorter pre fix's

    Deleted....doesn't work
    Last edited by newdoverman; 03-29-2014 at 10:32 AM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Postcode Sectors from Full Postcodes
    By jasonjholt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2013, 05:19 AM
  2. [SOLVED] Help needed trimming full postcode address to postcode sector.
    By Mikey7346 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-10-2012, 05:11 PM
  3. enter suburb return with postcode
    By lpratt in forum Excel General
    Replies: 3
    Last Post: 04-12-2011, 02:50 AM
  4. Create a Shorter List of Values - Help!
    By g/money in forum Excel General
    Replies: 1
    Last Post: 03-02-2009, 12:33 AM
  5. Filtering a LONG list to entries in a shorter list
    By excel_novice_UK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2008, 02:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1