+ Reply to Thread
Results 1 to 6 of 6

Adding Same Characters In Front Of and Behind a Column of Numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    09-07-2014
    Location
    Salt Lake City
    MS-Off Ver
    Office 14
    Posts
    2

    Adding Same Characters In Front Of and Behind a Column of Numbers

    I have a column of numbers that is over 1,000 numbers long. For each of the numbers I need to type a single quote (') in front and then a single quote (') followed by a comma at the end. I have always done this manually and it takes forever. There has to be a way to do this. So a row of numbers such as:
    3663
    18018
    16940
    29115
    30010
    9800
    13283
    5859 would end up looking like:
    '3663',
    '18018',
    '16940',
    '29115',
    '30010', etc..... I know there has to be a way to do this through a formula or a replace string. Just cannot find anything. Any words of advice would be much appreciated!!! Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Adding Same Characters In Front Of and Behind a Column of Numbers

    b1 =
    ="'"&A1&"'"&","
    and drag down.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Adding Same Characters In Front Of and Behind a Column of Numbers

    Why not only this.....
    ="'"&A1&"',"
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    05-21-2014
    Posts
    92

    Re: Adding Same Characters In Front Of and Behind a Column of Numbers

    Might want to be careful here depending on how the results will be handled later on. On Excel 2010, if the

    ="'"&A1&"',"
    result is copy-pasted back in as a value, you would get the desired

    '3663',
    in the cell. But if you were to click inside the cell text and then hit 'enter', the first apostrophe will become hidden:

    3663',
    as that initial apostrophe is used by Excel to indicate that the rest of the cell's content is to be handled as text. In Excel 2010, this setting becomes part of the cell's formatting and refuses to later be manually removed (for some moronic reason). Then in order to get the correct content back, you would have to add another apostrophe after the first hidden one.

    Hopefully this won't be a concern for jrstites's use. but it is a potential annoyance when handling cell content that has a leading apostrophe.
    Last edited by Monimonika; 09-07-2014 at 12:32 PM.

  5. #5
    Registered User
    Join Date
    09-07-2014
    Location
    Salt Lake City
    MS-Off Ver
    Office 14
    Posts
    2

    Re: Adding Same Characters In Front Of and Behind a Column of Numbers

    I cannot begin to thank you enough for answering this question. It works to perfection!!! You have made my life so much easier. Thanks!

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Adding Same Characters In Front Of and Behind a Column of Numbers

    @sktneer

    your solution is even better, although the result is the same.

+ 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] Adding 0's in front of string to equal a fixed number of characters
    By tdyl1969 in forum Excel General
    Replies: 3
    Last Post: 05-10-2012, 11:26 AM
  2. Adding numbers with USD in front
    By IamRustyP in forum Excel General
    Replies: 7
    Last Post: 04-11-2011, 03:53 PM
  3. Adding 0. in front of numbers
    By WHUMad in forum Excel General
    Replies: 1
    Last Post: 06-06-2007, 05:58 AM
  4. Adding a 0 in front of a column of numbers
    By scasawyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2005, 10:05 AM
  5. [SOLVED] adding digits to front/end of fax numbers
    By Luke in forum Excel General
    Replies: 2
    Last Post: 04-27-2005, 07:06 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