+ Reply to Thread
Results 1 to 4 of 4

Macro to Compare Similar Data

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Macro to Compare Similar Data

    Hi. This might be a bit complex but, I need a macro or some sort of function that looks at a list of names in Column C and if the name in each cell is not matched exactly within range E2:E20000 then look again at E2:E20000 and return the closest match it finds and put this match in column F. I want to avoid fuzzy lookup if possible.

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Macro to Compare Similar Data

    How do you define closest match without fuzzy lookup? I'm not saying you can't, I'm saying you need to specify the approach if fuzzy lookup is not an option.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Macro to Compare Similar Data

    How about, if I have a list of 15 names and if I compare them to a range of cells that contain 15 names. If its not an exact match then look at the range of cells again and if it's like a 75% match then paste the cell in the range that is the closest match into column F. So Andy Hall might be in the col C and A Hall might be in the range I'm looking at and I'd want it to paste A Hall into F1. Something along those line.

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Macro to Compare Similar Data

    What you've done here is iterate the question. Although that is useful, what is really required to answer the question is how you want to identify your imperfect matches. What calculation would give you the answer 75% for your example? Or, another way, what approach would you use (manually, if appropriate) to work out what your fuzzy match (without using fuzzy match) is?

    Based on what you've asked for so far, the appropriate equation is:
    F1=if(c1="Andy Hall","A Hall",vlookup(c1,<your range>,<your offset>,false))
    What information can you provide to help improve this equation?

+ 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