+ Reply to Thread
Results 1 to 6 of 6

Compare a list of strings against a list of keywords to return a partial match

  1. #1
    Registered User
    Join Date
    05-02-2016
    Location
    New Zealand
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    21

    Question Compare a list of strings against a list of keywords to return a partial match

    Hi all,

    I'm attempting to clean up some data where I've been given a list of full street addresses (i.e. street number and name), but only want to extract (or confirm a match of) the street name. For example:

    93 - 97 Harrison Street

    Needs to just be: Harrison Street

    105 Koromiko Road

    Needs to just be: Koromiko Road

    Cracroft Drive

    Perfect as is

    7 St Helens Place

    Needs to just be: St Helens Place

    I have a list of 700 or so streets, so could do a compare to this list, but I'm not sure exactly how to perform a partial match search that returns the above. Any help would be much appreciated!
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Compare a list of strings against a list of keywords to return a partial match

    hi there. you didnt input the desired results in the file though. do that so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand. based on your egs in the thread, it seems like the numbers are always in front and you want to remove them. so maybe:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    05-02-2016
    Location
    New Zealand
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    21

    Question Re: Compare a list of strings against a list of keywords to return a partial match

    Hi benishiryo,

    Sorry if I didn't make it clear what I was after. It is probably quite a difficult data set to work with (I have around 60000 addresses to convert), but now I'm wondering if it may be easiest if I were to
    filter out streets that do contain a number and deal with them separately (i.e. with a separate formula) to streets that do not. I have added a few more examples in the attached file below. The example of
    "State Highway 4" is unusual - there's only a couple of roads that have a number at the end, so I could manually adjust those if a formula can't be used to tackle this. I think a very challenging data set!
    Attached Files Attached Files

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Compare a list of strings against a list of keywords to return a partial match

    hmmm. it seems like you want to remove numbers WITH the text if it's at the beginning of the address. and ignore it if it's at the end. this formula works for all your eg, but you probably need VBA to proceed further if it gets more complicated. post it in another thread if you require so. i might not be able to help with VBA.

    with formula, try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Compare a list of strings against a list of keywords to return a partial match

    Download and install Microsoft Fuzzy look up

    https://www.microsoft.com/en-gb/down....aspx?id=15011

    Resuls seen in column B.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    05-02-2016
    Location
    New Zealand
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    21

    Re: Compare a list of strings against a list of keywords to return a partial match

    Hi benishiryo and Glenn Kennedy,

    benishiryo - Many thanks for the new formula. I've put this in and aside from only a couple hundred or so streets (out of 60000), it has done an excellent job of cleaning up the data.

    Glenn Kennedy - I've got a fair bit more data coming up to "scrub", so I will give this a go soon. It appears to be a very useful tool. Thank you!

+ 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. Compare Two columns, find a partial match and return occurrences
    By Merkhava in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-11-2015, 12:42 PM
  2. [SOLVED] compare list B with list A, return cell data on row where B matched A
    By master-richie in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-04-2015, 01:59 AM
  3. Replies: 3
    Last Post: 07-03-2013, 07:47 PM
  4. [SOLVED] Compare strings for match in separate worksheet and return nearest future date
    By kungfood in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2012, 05:19 PM
  5. Replies: 0
    Last Post: 07-11-2012, 06:05 AM
  6. Skakes in the Summer
    By lowryda777 in forum Excel General
    Replies: 2
    Last Post: 06-27-2012, 10:29 AM
  7. Compare List A to List B and Return Duplicates to C
    By nexttech in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2009, 11:58 PM

Tags for this Thread

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