+ Reply to Thread
Results 1 to 2 of 2

Adding(Append) fix string before a particular cell

Hybrid View

prayami Adding(Append) fix string... 01-02-2008, 05:19 PM
VBA Noob Say the data in Column A... 01-02-2008, 05:29 PM
  1. #1
    Registered User
    Join Date
    11-15-2007
    Posts
    18

    Adding(Append) fix string before a particular cell

    Hi,

    I frequently require to add or append perticular string in some of the cells( note: cells are in sequence or together in the column ).
    It will be really helpful if we can do that in excel.

    e.g.

    If in perticular column, some of the column cells values are :
    ABC
    EFG
    HIJ
    KLM
    OPQ

    I want to add perticular string e.g. "IBM" on the beginning of the cell value.
    e.g.
    IBM ABC
    IBM EFG
    IBM HIJ
    IBM KLM
    IBM OPQ

    Right now I just copy and paste "IBM" in each cell.

    Is it possible like formula to set in formula for one cell and then drag.

    Thanks,

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Say the data in Column A enter this in B1 and drag down

    ="IBM "&A1
    then select column B > copy > paste special values and delete column A

    or you could use.

    Press Alt + F11 > Insert new module > paste in the below and close VBA editor > select the range > then press Alt + F8 and select AddText and run

    Sub AddText()
    Dim c As Range
    Application.ScreenUpdating = False
    For Each c In Selection
        If Not IsEmpty(c) Then
            c.Value = "IBM " & c.Value
        End If
    Next c
    Application.ScreenUpdating = True
    
    End Sub
    HTH

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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