Merging cells or adding to a cell
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Merging cells or adding to a cell

  1. #1
    New Member
    Join Date
    Feb 2002
    Location
    State? Insanity! :)
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     


    OK.. If I have product numbers in column A of a file, and I want to add a couple characters to the beginning of each number.

    example.. code is "123".. I want the code to be "FF123" is there a simple way to do this?
    Either an add command, or even creating a whole column of "FF" and them merging them?

    I do not wish to do this manually by editing as there are THOUSANDS of rows to edit.

    thanks!

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    81,870
    Post Thanks / Like
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)

    Default

    On 2002-04-10 22:46, vampcatt wrote:


    OK.. If I have product numbers in column A of a file, and I want to add a couple characters to the beginning of each number.

    example.. code is "123".. I want the code to be "FF123" is there a simple way to do this?
    Either an add command, or even creating a whole column of "FF" and them merging them?

    I do not wish to do this manually by editing as there are THOUSANDS of rows to edit.

    thanks!
    I'm sure someone will provide you a macro.

    The formula-way is just:

    ="FF"&A1

    where A1 houses the first entry that you want to modify.

    Enter this in B1 and give a double click on its fill handle in order to copy the formula down. Then copy all of the cells in B and execute Edit|Paste Special >Values in place. Delete column A.

    Aladin

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    202
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    assuming your numbers are in column A, select column B and type in FF or whatever in the formula bar. press ctrl+shift+enter simultaneously, which will put 'FF' in the entire column. in the first row of column C, put =A1&B1 and copy this down as far as needed using the fill handle (bottom right of cell). then select column C again, do copy> paste special>values and delete column B

  4. #4
    Board Regular eliW's Avatar
    Join Date
    Mar 2002
    Posts
    1,919
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Here is a macro, need some polish but works,

    Sub AddFF()

    Dim myRange As Range
    Set myRange = Range("A1:A5000")
    For i = 1 To myRange.Cells.Count
    myRange.Cells(i).Value = "FF" & myRange.Cells(i).Value
    Next i
    End Sub

    Just adjust the number of rows (set to 5000)
    Eli

  5. #5
    New Member
    Join Date
    Feb 2002
    Location
    State? Insanity! :)
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Great! .. thanks guys!
    You've been a great help!


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com