+ Reply to Thread
Results 1 to 7 of 7

Adding one character to the end of each entry in a column

  1. #1
    Registered User
    Join Date
    08-24-2009
    Location
    Guildford, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Adding one character to the end of each entry in a column

    Hello, I am guessing that there is probably a really simple solution for this, but I am really struggling to figure it out...

    In one column I have a list of serial numbers and I want to add a comma at the end of each entry without having to type it manually into each individual field.

    So basically, I want it to go from this:

    1234
    4567
    5678
    6789

    To this:

    1234,
    4567,
    5678,
    6789,

    This is because I have to then copy these serial numbers into another program for running searches, but for it to work properly, each serial needs a comma between. And there are literally 1000s of them, so I am trying to find a way to save time.

    If anyone can help, that would be fantastic!

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Adding one character to the end of each entry in a column

    Hello,

    Simplist solution is to use a second column and add this formula to it:

    Please Login or Register  to view this content.
    OR

    Please Login or Register  to view this content.
    Now if you need to actually replace the original cell contents then you will need vba.

    abousetta

  3. #3
    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,425

    Re: Adding one character to the end of each entry in a column

    You can do this with a Helper column.

    For the sake of argument, let's assume your data is in column A and starts in row 2 allowing for a header. Also that we can put a formula in column B ... but it can be anywhere.

    In cell B2, put the formula: =A2&"," and drag this down to the end of your data.

    Select all the formulae in column B and copy it. Select cell A2 and do Paste Special | Values. Then delete the formulae in column B.

    Done.

    Regards
    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


  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Adding one character to the end of each entry in a column

    If you need to replace the original cell contents with the new ones. This vba code should do it:

    Please Login or Register  to view this content.
    abousetta

  5. #5
    Registered User
    Join Date
    08-24-2009
    Location
    Guildford, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Adding one character to the end of each entry in a column

    Thank you guys very much! Problem now solved!

    I knew it would be something fairly straight forward!

  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,425

    Re: Adding one character to the end of each entry in a column

    You're welcome.

    If this has addressed your question, please mark your thread as solved. See my signature for details or the FAQ.

    Regards

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Adding one character to the end of each entry in a column

    Hi,

    Glad we could be of assistance. If you are satisfied with the results, please mark the thread as [SOLVED] (next to the title on the first post). Also positive recognition (scales) are always welcomed .

    If want to mark the post as solved then:

    1) Click the Edit button on your first post in the thread
    2) Click Go Advanced
    3) select [SOLVED] from the Prefix dropdown
    4) click Save Changes

    Good luck.

    abousetta

+ 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