+ Reply to Thread
Results 1 to 5 of 5

how to preserve paragraph breaks in pasted text?

Hybrid View

  1. #1
    Bob
    Guest

    how to preserve paragraph breaks in pasted text?

    When I paste text copied from a Word document into an Excel cell, Excel
    breaks the pasted text into separate cells according to the paragraph breaks
    contained in the pasted text. However, I would like to preserve those
    paragraph breaks and keep all the pasted text in the same cell.

    I realize that when entering text in a cell, I must insert Alt+Return to get
    a paragraph break to stay in the cell. But there doesn't seem to be a way to
    force pasted text to stay in a single cell when it contains paragraph breaks.

    Any advice would be most appreciated.

  2. #2
    Martin P
    Guest

    RE: how to preserve paragraph breaks in pasted text?

    In Word, change the hard returns to dollar signs, using Edit, Replace.
    Copy the cells to Excel.
    In Excel, run this macro:
    Sub dollartobreak()
    Cells.Replace What:="$", Replacement:="" & Chr(10) & "", LookAt:=xlPart,
    SearchOrder _
    :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
    End Sub
    "Bob" wrote:

    > When I paste text copied from a Word document into an Excel cell, Excel
    > breaks the pasted text into separate cells according to the paragraph breaks
    > contained in the pasted text. However, I would like to preserve those
    > paragraph breaks and keep all the pasted text in the same cell.
    >
    > I realize that when entering text in a cell, I must insert Alt+Return to get
    > a paragraph break to stay in the cell. But there doesn't seem to be a way to
    > force pasted text to stay in a single cell when it contains paragraph breaks.
    >
    > Any advice would be most appreciated.
    Last edited by Cutter; 07-25-2012 at 08:37 PM. Reason: Added code tags

  3. #3
    Dave Peterson
    Guest

    Re: how to preserve paragraph breaks in pasted text?

    Manually:

    If your cells in your word table contain paragraph mark or linebreak characters,
    then excel will bring them over as separate cells.

    One way around it is to convert those paragraph marks & linebreaks to unique
    characters, then copy|paste and then convert them back to linefeeds.

    I like this technique (inside a copy of the word file):
    Select your table.
    Edit|replace|Special (show More if required)
    Find what: (paragraph mark under Special button)
    replace with: $$$$$ (if $$$$$ doesn't appear in the table)
    replace all

    Same thing with Manual Line break (from under Special).

    Now copy the table into Excel.

    Edit|Replace
    Replace what: $$$$$
    Replace with: ctrl-j
    replace all.

    Don't forget to close the word document without saving (or hit undo as many
    times as necessary).

    Bob wrote:
    >
    > When I paste text copied from a Word document into an Excel cell, Excel
    > breaks the pasted text into separate cells according to the paragraph breaks
    > contained in the pasted text. However, I would like to preserve those
    > paragraph breaks and keep all the pasted text in the same cell.
    >
    > I realize that when entering text in a cell, I must insert Alt+Return to get
    > a paragraph break to stay in the cell. But there doesn't seem to be a way to
    > force pasted text to stay in a single cell when it contains paragraph breaks.
    >
    > Any advice would be most appreciated.


    --

    Dave Peterson

  4. #4
    bkrcove
    Guest

    RE: how to preserve paragraph breaks in pasted text?

    A quick way of doing this if you only have a small amount of text to paste is
    to copy it from Word and paste it into the Formula Bar in Excel instead of
    into the cell. I have tried this and Excel converts even hard paragraph
    breaks in Word into soft paragraph breaks in Excel, which is what we want.


  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    Oviedo, FL
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: how to preserve paragraph breaks in pasted text?

    There's an easier way to preserve the paragraph breaks. If you only select the cell and then paste, it will go into multiple cells like you are experiencing. However, if you double click in the cell so your cursor is active, and then paste, it will all go in the same cell.

    Wes

+ 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