Pasting to Excel from Word - stop a Word new line being converted into a new cell

23
2013-11
  • Sean McRaghty

    So I have a table in MS Word which has two columns. In the second column the text is spread on multiple lines, ie I have pressed 'Enter' to achieve this.

    When I paste into Excel, it converts these separate lines into separate cells.

    What I want it to do is to keep the lines in the same cell, just on different lines, ie what would happen if I were to press Alt+Enter in a cell in excel.

    How would I go about this?

    Edit: here's an example of my data. In word it's in a word table.

    ----------------------------
    | Bananas   | - yellow     |
    |           | - curved     |
    ----------------------------
    | Apples    | - red/green  |
    |           | - round      |
    ----------------------------
    
  • Answers
  • Rhys Gibson

    Pasting won't work. Alt+Enter in Excel isn't a special character, it's only a way of ensuring a CR+LF is stored within a cell rather than forcing you into the next cell.

    One option would be to not press Enter in your Word table but use another character instead (e.g. '#') and then use a macro in Excel to search for '#' and replace with CHR(10) once you've pasted.


  • Related Question

    text editing - How to write multi lines in one Excel cell?
  • Wahid Bitar

    I want to write multi-lines in one MS Excel cell.

    But whenever I press the Enter key, the cell editing ends and the cursor moves to next cell. How can I avoid this?


  • Related Answers
  • 8088

    What you want to do is to wrap the text in the current cell. You can do this manually by pressing Alt + Enter every time you want a new line

    Or, you can set this as the default behaviour by pressing the Wrap Text in the Home tab on the Ribbon. Now, whenever you hit enter, it will automatically wrap the text onto a new line rather than a new cell.

    enter image description here

  • soandos

    You have to use Alt+Enter to enter a carriage return inside a cell.

  • Wayne

    Use the combination alt+enter

  • jonsca

    Alt + Enter never worked for me. I had to go to Format Cells and make sure that the Number tab was set to Text. That allowed me to see exactly as I had input. My issue could have been Mac specific though.

  • Head of Catering
    1. Edit a cell and type what you want on the first "row"
    2. Press one of the following, depending on your OS:


      Windows: Alt + Enter

      Mac: Ctrl + Option + Enter

    3. Type what you want on the next "row" in the same cell
    4. Repeat as needed.

    Note that inserting carriage returns with the key combinations above produces different behavior than turning on Wrap Text. In the screenshot below, column A has the carriage returns and column B has Wrap Text turned on. Changing the width of a column with carriage returns doesn't remove them. Changing the width of a column with Wrap Text turned on will change where the lines break.

    In-cell line breaks in Excel