+ Reply to Thread
Results 1 to 6 of 6

String of names with comma and space between - add the word "and"

  1. #1
    Registered User
    Join Date
    11-23-2020
    Location
    Fountain Valley, CA
    MS-Off Ver
    Office 365
    Posts
    3

    String of names with comma and space between - add the word "and"

    I have a cell with a string of names separated by a comma and a space. How can I add the word "and" (without quotes) before the last name?
    Original: name, name, name
    Required result: name, name, and name

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: String of names with comma and space between - add the word "and"

    One way:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-23-2020
    Location
    Fountain Valley, CA
    MS-Off Ver
    Office 365
    Posts
    3

    Re: String of names with comma and space between - add the word "and"

    Looks like I need to have a different forumal depending upon the number of names in the cell? Some cells have two names, some three, some four, etc.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: String of names with comma and space between - add the word "and"

    Have you tried the formula? The outer SUBSTITUTE makes the changes. The inner LEN/SUBSTITUTE determines which instance to change. It's not difficult to test.

  5. #5
    Registered User
    Join Date
    11-23-2020
    Location
    Fountain Valley, CA
    MS-Off Ver
    Office 365
    Posts
    3

    Re: String of names with comma and space between - add the word "and"

    Fabulous! Thank you very much!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: String of names with comma and space between - add the word "and"

    You're welcome. Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] how to replace last comma in string with "and"
    By dschmitt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-17-2018, 02:59 AM
  2. [SOLVED] VBA-Generated Hyperlink: "Reference Not Valid" error for Sheet Names w/ space, dash, etc.
    By joe31623 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-22-2016, 01:45 PM
  3. [SOLVED] Need to truncate cell string to <len(30) but at " " (space)
    By sh_gaitonde3901 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-16-2016, 06:15 AM
  4. [SOLVED] Need formula that finds the last ", " in a text string & substitutes it w/ the word "and"
    By danielneedssomehelp in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-23-2014, 04:06 PM
  5. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  6. how to fill the space with "_ " in a word "RE CAL"
    By krish T in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-28-2010, 11:22 AM
  7. Replies: 0
    Last Post: 02-23-2006, 01:33 PM

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