+ Reply to Thread
Results 1 to 9 of 9

Function to add text to the end of every cell?

  1. #1
    Registered User
    Join Date
    12-04-2009
    Location
    Bromsgrove, England
    MS-Off Ver
    Excel 2003
    Posts
    53

    Function to add text to the end of every cell?

    I've got lots of text descriptions inside a number of cells, they all have different text. I need to add a sentence to the end of every one, because the descriptions are different I can't use a simple find and replace to do this as the last word or phrase is different on each one. Is there a way to make this text go at the end of every ells description? (the text to be bolted on the end is the same for all)

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Function to add text to the end of every cell?

    This macro will do it...
    Please Login or Register  to view this content.


    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Edit the MyStr text to be what you want
    6. Get out of VBA (Press Alt+Q)
    7. Save as a macro-enabled workbook

    The macro is installed and ready to use.
    ===========

    How to use the macro:

    1) Select the cells you want to edit, or some of them.
    2) Press Alt-F8 and select AddText from the macro list.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Function to add text to the end of every cell?

    just use in a spare cell
    =a1&" your new text"
    where a1 has original text
    you can then copy paste special values to remove the underlying formulas
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Function to add text to the end of every cell?

    Or
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-26-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Function to add text to the end of every cell?

    JBeaucaire

    That worked perfectly to add an @email address to my filed.

    Thanks you for saving me soooo much time
    Chris.

  6. #6
    Registered User
    Join Date
    08-20-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Function to add text to the end of every cell?

    THanks Jbeaucarie

  7. #7
    Registered User
    Join Date
    11-13-2012
    Location
    Muncie, IN
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Function to add text to the end of every cell?

    Thank you worked like a charm!!

  8. #8
    Registered User
    Join Date
    01-08-2013
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Function to add text to the end of every cell?

    this is what I was looking ,thanks.

  9. #9
    Registered User
    Join Date
    10-21-2013
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Function to add text to the end of every cell?

    Thanks for this!

+ 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