How can I merge cells in consecutive rows

I have an area where I need to merge all cells in every row but not across rows. The area is very tall (around 250 rows), so doing it manually for every row is not viable. If I select the whole area and merge the cells, they all merge into one tall cell.

What is a good way to merge every row in the area? The starting point is shown by the first image, and the goal is shown in the second image. The area where rows should be merged is designated by the border and continues downward.

the starting point

the goal

I realized that extending cells by dragging from the bottom right corner of a selection extends also how the cells are merged. So merging the cells in every row can be done by merging the cells in the first row, selecting it and extending it to the rest of the area. That overwrites the previous content of the area, so it may be necessary to copy the original content elsewhere before the merging and copy the content back into the merged rows.

2 Likes

I’m not sure you found (and posted as an answer) the best way.
Indeed, the first step is to merge the cells in the first row. And then you can use the “brush” for the remaining rows.

image

Or copy the sample, merged cells to the clipboard - the usual Ctrl+C, select the range with Ctrl+* (or in the latest versions of Office this can be done with one Ctrl+A) and with Ctrl+Shift+V (Paste Special) - paste Formats Only.
image

In both cases, all the data will be intact, no need to “copy the original content elsewhere before the merging and copy the content back into the merged rows”

doesn’t it fall under the vey definition of "not viable " ? :thinking:

should be (almost) doable with a macro : Calc Macro Merge Cells

It is viable because I can copy the whole column at once.

and merge ?

Wait, what are you commenting about? The question or my answer? The content seems like you are commenting about my answer, but you post it as an answer to the question. So I am confused.

As I described in the answer, merging is done by merging the first row and extending it by dragging from the bottom right corner of the selected merged cell over the rest of the area. The complexity of that is not in O(1), but it is viable for 250 rows and much better than merging in every row separately.

otkr tools 3(merge cell/enter move)

This is useful but does not cover all use cases. The extension allows you to merge the selected region based on rows, but it does not allow you to choose the merge method. It keeps the data of the left-most cell and overwrites the rest. If the user wishes to merge the data in those cells (say, if they are text entries), this extension is not able to handle the request.