Pasting to Excel from Word - stop a Word new line being converted into a new cell
2013-11
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 |
----------------------------
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.
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?
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.
You have to use Alt+Enter to enter a carriage return inside a cell.
Use the combination alt+enter
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.
- Edit a cell and type what you want on the first "row"
- Press one of the following, depending on your OS:
Windows: Alt + EnterMac: Ctrl + Option + Enter
- Type what you want on the next "row" in the same cell
- 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.