+ Reply to Thread
Results 1 to 2 of 2

extract city using city list lookup

  1. #1
    Registered User
    Join Date
    01-05-2006
    Location
    Toronto, Ontario
    MS-Off Ver
    2007
    Posts
    38

    extract city using city list lookup

    --------------------------------------------------------------------------------
    Please Login or Register  to view this content.

    I tried this formula, but run into a little trouble.

    Say a record is like this:

    E2
    255 SIMCOE ST N APT 505 OSHAWA L1G 4T4, ONTARIO

    Oshawa is the tarket, but both Oshawa and Simcoe appear in the lookup list. Because Simcoe comes last in the a-z, it gets picked.

    Is there a way to search from the right side a certian number of spaces, or pick the first right side match, or search with in some limits before the comma?

    Thanks
    Terry
    Last edited by terrysoper1973; 09-08-2011 at 04:31 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: extract city using city list lookup

    You can employ the RIGHT FUNCTION...

    =LOOKUP(2^15,SEARCH($A$2:$A$3424,RIGHT(E2,20)),$A$2:$A$3424)

    which means only look in the right 20 chars of E2 (you can increase/decrease), but that might or might not still be too limiting... I don't know...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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