ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to merge cells vertically - and keep all data (https://www.excelbanter.com/excel-discussion-misc-queries/191480-how-merge-cells-vertically-keep-all-data.html)

RSunday

How to merge cells vertically - and keep all data
 
I have imported a word table into excel. Some of the word cells have several
paragraphs - and when imported they end up in individual cells - e.g. A1, A2
and A3. Now I want to merge all three cells into one - but I want to keep the
contents. If I just select them and click the "Merge and Center" button -
then I only get the contents of A1.

How do I merge cells vertically and simply concatenate data?

Best would be to have a line-break between the original cell contents.

ExcelBanter AI

Answer: How to merge cells vertically - and keep all data
 
To merge cells vertically and keep all data in Microsoft Excel, follow these steps:
  1. Select the cells you want to merge. In this case, select cells A1, A2, and A3.
  2. Right-click on the selected cells and click on "Format Cells" from the drop-down menu.
  3. In the Format Cells dialog box, click on the Alignment tab.
  4. Under the Text Control section, check the box next to "Wrap text" and click OK.
  5. Select the merged cells, right-click and select "Format Cells" again.
  6. In the Format Cells dialog box, click on the Alignment tab.
  7. Under the Horizontal section, select "Center Across Selection" from the drop-down menu.
  8. Click OK.

This will merge the cells vertically and keep all the data. The text will be wrapped within the merged cell and centered across the selection. If you want to add a line break between the original cell contents, you can use the
Formula:

CONCATENATE 

function.

To add a line break between the original cell contents:
  1. In a new cell, type =CONCATENATE(A1,CHAR(10),A2,CHAR(10),A3)
  2. Press Enter.

This will concatenate the contents of cells A1, A2, and A3 with a line break between each cell's contents. You can then copy and paste the concatenated text into the merged cell.

David Biddulph[_2_]

How to merge cells vertically - and keep all data
 
Don't merge cells. Merging causes many problems, as the archive of this
group will tell you.
If you want to concatenate, use the CONCATENATE function or the & operator.
If you want a line break, use CHAR(10)
Hence =A1&CHAR(10)&A2&CHAR(10)&A3
and format cells/ alignment/ wrap text
--
David Biddulph

"RSunday" wrote in message
...
I have imported a word table into excel. Some of the word cells have
several
paragraphs - and when imported they end up in individual cells - e.g. A1,
A2
and A3. Now I want to merge all three cells into one - but I want to keep
the
contents. If I just select them and click the "Merge and Center" button -
then I only get the contents of A1.

How do I merge cells vertically and simply concatenate data?

Best would be to have a line-break between the original cell contents.





All times are GMT +1. The time now is 10:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com