+ Reply to Thread
Results 1 to 7 of 7

Pasting text from multiple rows along 5 columns into new column

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    5

    Pasting text from multiple rows along 5 columns into new column

    I am looking for a macro that will take the cell contents from multiple rows in five columns (A-E) and paste them into a new column with spaces and/or commas. So, for example:

    Amy likes Suede in May
    Mary likes Leather in June
    Scott likes Cotton in July
    Sean likes Silk in August


    Becomes

    Amy, likes Suede, in May
    Mary, likes Leather, in June
    Scott, likes Cotton, in July
    Sean, likes Silk, in August

    I need a macro because the cell contents and number of rows change regularly. Does anyone have any ideas?

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Pasting text from multiple rows along 5 columns into new column

    Try this :

    Please Login or Register  to view this content.
    Please click the * below if this helps

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Pasting text from multiple rows along 5 columns into new column

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Pasting text from multiple rows along 5 columns into new column

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Pasting text from multiple rows along 5 columns into new column

    Thank you all! JasperD's code is closest to what i am looking for! (AB33 doesn't have commas and jindon has too many ;-) ).

    JasperD: What is the proper code to end the macro when there are no rows with text? Currently it goes down the column for infinity.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Pasting text from multiple rows along 5 columns into new column

    Ahh
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Pasting text from multiple rows along 5 columns into new column

    jindon, perfect! Thank you!!

+ 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