+ Reply to Thread
Results 1 to 5 of 5

Excel - Find and Replace from rows to separation by commas

Hybrid View

  1. #1
    msdker
    Guest

    Excel - Find and Replace from rows to separation by commas

    I would like to take information that is one column but over 2000 rows and
    move it into the A1 cell, but separated by commas. So instead of separation
    by rows, make it separation by commas. How do I do this?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    You can do this by macro

    Sub AddCommas()
    Set DataRange = Application.InputBox("Select data", , , , , , , 8)
    Set TargetCell = Application.InputBox("Select target cell", , , , , , , 8)
    For Each Cell In DataRange
    TargetString = TargetString & "," & Cell.Value
    Next
    TargetString = Right(TargetString, Len(TargetString) - 1)
    TargetCell.Value = TargetString
    End Sub


    Martin

  3. #3
    Martin P
    Guest

    RE: Excel - Find and Replace from rows to separation by commas

    This can also quickly be done via Word. Copy to Word, convert table to text,
    and use Edit, Replace in Word to replace paragraph mark with comma. Copy to
    Excel.

    "msdker" wrote:

    > I would like to take information that is one column but over 2000 rows and
    > move it into the A1 cell, but separated by commas. So instead of separation
    > by rows, make it separation by commas. How do I do this?


  4. #4
    msdker
    Guest

    RE: Excel - Find and Replace from rows to separation by commas

    This is the one! This was super easy. I kept thinking that I know I can
    choose characters from a list with find and replace and I had forgotten that
    I can do it in Word! Thanks!

    "Martin P" wrote:

    > This can also quickly be done via Word. Copy to Word, convert table to text,
    > and use Edit, Replace in Word to replace paragraph mark with comma. Copy to
    > Excel.
    >
    > "msdker" wrote:
    >
    > > I would like to take information that is one column but over 2000 rows and
    > > move it into the A1 cell, but separated by commas. So instead of separation
    > > by rows, make it separation by commas. How do I do this?


  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    In cell B1 put

    =A1&","&B2

    and formula copy that to the end of your data

    then take cell B2, copy, and paste special = Values into A1

    delete all other rows and column B

    --

    Quote Originally Posted by msdker
    I would like to take information that is one column but over 2000 rows and
    move it into the A1 cell, but separated by commas. So instead of separation
    by rows, make it separation by commas. How do I do 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