Preserve Line Breaks in Excel Cells

  • Thread starter DaveC426913
  • Start date
  • Tags
    Excel
In summary, the conversation discusses the need to transfer a Word table of postal addresses into an Excel spreadsheet while preserving line breaks. The first solution suggested is to use the "merge cells" function, but the person asking the question clarifies that they want to keep each piece of data in a separate column. Another person suggests using the alt+enter shortcut to insert line breaks within a cell, which is deemed helpful. However, it is ultimately revealed that the requirements have changed and now each piece of data must be in its own column.
  • #1
DaveC426913
Gold Member
23,056
6,742
I need to get a Word table of postal addresses into an Excel spreadsheet.

I want to preserve the line breaks in the original addresses. Is it possible to have line breaks within a single cell in Excel?

From Word table:


...Col 1...Col2

R1: Bob Smith...21 Foo St.
......Toronto ON
......M8Q 2S2
R2: Biff Grunties...43 Bar St.
......Toronto ON
......M4V 1D8


into Excel sheet: :approve: :approve: :approve: :approve: :


...Col 1...Col2

R1: Bob Smith...21 Foo St.
......Toronto ON
......M8Q 2S2
R2: Biff Grunties...43 Bar St.
......Toronto ON
......M4V 1D8


what I'm getting now :mad: :mad: :mad: :mad: :

...Col 1...Col2

R1: Bob Smith...21 Foo St.
R2: ...Toronto ON
R3: ...M8Q 2S2
R4: Biff Grunties...43 Bar St.
R5: ...Toronto ON
R6: ...M4V 1D8
 
Computer science news on Phys.org
  • #2
DaveC426913 said:
Is it possible to have line breaks within a single cell in Excel?

I've never been able to do it, not through lack of effort thought
 
  • #3
Failing that, each item of data in a separate column is preferred:

From Word table:

...Col 1...Col2
R1: Bob Smith...21 Foo St.
......Suite 700
......Toronto ON
......M8Q 2S2
R2: Biff Grunties...43 Bar St.
......Toronto ON
......M4V 1D8
......(800) 555-1212


To Excel sheet:


...Col 1...Col 2...Col 3...Col 4...Col 5...Col 6...Col 7...

R1: Bob Smith...21 Foo St....Suite 700......Toronto ON...M8Q 2S2
R2: Biff Grunties...43 Bar St.........Toronto ON...M4V 1D8...(800) 555-1212
 
Last edited:
  • #4
There are a lot of ways to do this, but here is one way:

Select the three cells that you want to merge. Right click and select format cells. Click on the alignment tab and then check the "merge cells" check box. Then click the down arrow on the vertical alignment box and choose either top, bottom, center, etc. (whatever suits your needs)

If I completely misread your question, then I apologize.:redface:
 
  • #5
Omega_6 said:
There are a lot of ways to do this, but here is one way:

Select the three cells that you want to merge. Right click and select format cells. Click on the alignment tab and then check the "merge cells" check box. Then click the down arrow on the vertical alignment box and choose either top, bottom, center, etc. (whatever suits your needs)

If I completely misread your question, then I apologize.:redface:
Gah! Is THAT where the MERGE CELLS command is! I've been looking for it!

Thanks. That may not still not work, but it's one more club in my bag.
 
  • #6
Well, at least it helped a little bit.:smile:
Let me know if you get it or not, or maybe go into more detail.
 
  • #7
Well, doesn't that just blow honkin' donkey chunks.

Excel's idea of a merge is to keep only the data in the top-left-most cell - it displays a warning to say so. That's not a merge at all!

Can you imagine if that *were* the definiton of merge?

"Warning: merging traffic. Only traffic in left lane will be kept. All other traffic will explode."
 
  • #8
That was just great...:smile:

Anyways, I know that I've done something similar to what you are trying to do. I'll look into it later, its just been a while.:wink:

::edit:: Pressing alt+enter will insert a line break within a cell.
 
Last edited:
  • #9
Omega_6 said:
::edit:: Pressing alt+enter will insert a line break within a cell.

That is soooo helpful, I've been trying to do a similar thing for months

~Hoot
 
  • #10
Hootenanny said:
That is soooo helpful, I've been trying to do a similar thing for months

~Hoot

:approve: :approve: :approve: :approve: That's the answer!

:mad: :mad: :mad: :mad: Too bad the requirements have changed in the meantime! Now they want each piece of data (addr1 addr2 city, prov, etc.) in its own column!
 

FAQ: Preserve Line Breaks in Excel Cells

How can I preserve line breaks in Excel cells?

To preserve line breaks in Excel cells, you can use the keyboard shortcut "Alt + Enter" to insert a line break within the cell. Alternatively, you can use the "Wrap Text" feature under the "Alignment" section of the "Home" tab.

Can I preserve line breaks in multiple cells at once?

Yes, you can select multiple cells and use the same methods mentioned above to preserve line breaks in all of them simultaneously.

Will preserving line breaks affect the formatting of my Excel sheet?

Preserving line breaks will not affect the overall formatting of your Excel sheet. It will only add line breaks within the selected cells, leaving the rest of the sheet unchanged.

Is there a way to remove line breaks from Excel cells?

Yes, you can use the "Find and Replace" feature under the "Editing" section of the "Home" tab to remove line breaks from specific cells or the entire sheet.

Can I preserve line breaks when exporting an Excel sheet to another program?

This depends on the program you are exporting to. Some programs, such as Microsoft Word, will automatically preserve line breaks from Excel cells. However, others may not support this feature and the line breaks may be removed during the export process.

Back
Top