+ Reply to Thread
Results 1 to 5 of 5

Erasing middle initail from Name string

  1. #1
    Registered User
    Join Date
    11-15-2005
    Posts
    10

    Erasing middle initail from Name string

    I've searched and found a similar question, but none of the answer seem to work out for me. There were some slight difference in our set up, but all the same, I appologize if this has already been covered.
    I'm attempting to use vlookup to pull data between to workbooks. My problem is, when matching names, one list is populated with no middle initial and the other is mixed. For instance,
    in my first work book, Smith John (no comma) is one cell. In the second work book, it may read Smith John C So my thought is, if i can find the second space in the cell(assuming it exists) and delete everything after, I should be good to go. Any thoughts?
    Thanks in advance,
    James

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Erasing middle initail from Name string

    How about using wild card with lookup_value. like

    "Smith John*" will work with if there is Smith John on starting. If you use "*Smith John*" this will work if ANYWHERE contains Smith John.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    12-07-2011
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Erasing middle initail from Name string

    Are you stuck with the second spreadsheet as it is, or can you modify it? If you can modify it, you could use "text to columns" to split the column into three columns, using the space as the delimiter, then use CONCATENATE to put the last and first names back together as desired.

  4. #4
    Registered User
    Join Date
    12-07-2011
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Erasing middle initail from Name string

    I think you dont need to change your data.

    If the middle initial is always at the right, maybe INDEX/MATCH works

    =INDEX(Sheet2!$B$2:$B$1000,MATCH("*"&A1&"*",Sheet2!$A$2:$a$1000,0))

    Where
    A1=Smith John

    Adjust the ranges and sheets (or workbooks) names

  5. #5
    Registered User
    Join Date
    11-15-2005
    Posts
    10

    Re: Erasing middle initail from Name string

    Text to Column worked like a charm. Many thanks!

+ 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