+ Reply to Thread
Results 1 to 7 of 7

Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2012 for mac
    Posts
    3

    Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    Hi,

    I have a long spreadsheet that has long salutations of the form "Ms. First Last and Mr. First Last." I want to use a formula to turn this into "Ms. Last and Mr. Last," but I'm having trouble figuring out how to demarcate the second space (i.e. I can get "Ms. and Mr. Tom Jones" but not a lot else).

    I'd really appreciate your help! Thank you!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    With your names in A1, this will work with those two examples:

    =LEFT(A1,SEARCH(".",A1))&MID(A1,SEARCH(" ",A1,5),255)

    However, I suspect your real data might have a few more variations.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    08-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2012 for mac
    Posts
    3

    Re: Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    Thanks! That got me halfway there. My data now looks like "Ms. Smith and Mr. Tom Jones." Any chance you know how I can eliminate "Tom" here?

    Thanks so much for your help!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    Ah, I didn't realise that both names were in the same cell - must read posts more carefully !!

    I'll try a few things out and get back to you if I have any success.

    Pete

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    Hello again. This seems to work with data in that format:

    =LEFT(A1,SEARCH(".",A1))&MID(A1,SEARCH(" ",A1,5)+1,SEARCH(" and ",A1)-SEARCH(" ",A1,5)+8)&MID(A1,1+FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))),255)

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    08-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2012 for mac
    Posts
    3

    Re: Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    Wow, that is great! I added a &" "& to add a space between the first title and the first name, but besides that this worked perfectly.

    Thank you so much!

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Turn Ms. Amy Smith and Mr. Tom Jones into Ms. Smith and Mr. Jones

    @ meyera

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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