+ Reply to Thread
Results 1 to 4 of 4

Using small dictionary, find strings, fill adjacent cell

  1. #1
    Registered User
    Join Date
    01-31-2011
    Location
    California
    MS-Off Ver
    Excel Mac 2011
    Posts
    4

    Smile Using small dictionary, find strings, fill adjacent cell

    Hello,
    I've read a little bit about Excel programming with VBA but I'm afraid that my task is too advanced for me.

    Basically, I have a *massive* list of names, first and last. What I'd like to do is search through the list (in particular, the LName column) and, if I find a match to any one of a couple dozen different names (including alternate spellings), the program will write a word (the standardized spelling) to the adjacent cell. I've attached a sample file so you can better understand what it is I'd like to do. The sample workbook includes the dictionary of names/alternative spellings that I'd like to use, on a second sheet.

    Anyone's help on this would be *greatly* appreciated, and it goes toward a very good cause - academic research on worldwide social mobility! Thank you.
    Attached Files Attached Files
    Last edited by Rockofeller; 02-01-2011 at 01:08 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using small dictionary, find strings, fill adjacent cell

    I used a "fill down" technique to duplicate all the base names in column A on the ALT SPELLINGS sheet. Once that was done, an INDEX/MATCH can spot the appropriate alternate spellings and display them. IN D2, then copied down:

    =IF(ISNUMBER(MATCH(C2,'Alt Spellings'!$B:$B,0)),INDEX('Alt Spellings'!$A:$A,MATCH(C2,'Alt Spellings'!$B:$B,0)),IF(ISNUMBER(MATCH(C2,'Alt Spellings'!$C:$C,0)),INDEX('Alt Spellings'!$A:$A,MATCH(C2,'Alt Spellings'!$C:$C,0)), C2))
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-31-2011
    Location
    California
    MS-Off Ver
    Excel Mac 2011
    Posts
    4

    Re: Using small dictionary, find strings, fill adjacent cell

    It works - thank you so much!!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using small dictionary, find strings, fill adjacent cell

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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