CALC: Merge only columns not rows

Can we do this too in Calc

EDIT - New and better sample

Can you update the screenshot again to show what should happen with the data from the range? Do you want to keep all the data or only the data from the first column?

As far as I know Excel (in fact - no) it will throw out the data of columns C:D

Good question but not mine - because I haven’t entered any data yet in the cells
But I tried it - and I can tell you - for those rows which have more than one row with data Excel comes with a warning for each of those rows - If you accept, you will have the Data you had in the first colums in one merged cell

First of all, this is not the Excel command, but one of the possibilities provided by the Ultimate Suite for Excel add-in.

There are “add-ins” for Calc too, they are called “extensions” and are located here. Perhaps you can find the extension you need there.

Otherwise, you can use this solution or this solution:

“First of all, this is not the Excel command, but one of the possibilities provided by the Ultimate Suite for Excel add-in.”
Yes you’re right - bad pic-sample from me - but anyhow this feature IS built in - in Excel 2016

but anyhow this feature IS built in - in Excel 2016

No it’s not - just tested with my Excel 2016.

I was wrong - there’s Merge Across there.

:wink: Thanks to you confirming it

Now I have add a better sample-pic

You can create your own macros to merge only the rows or only the columns in a selected cell range:

Select the three cells of the first row, merge, copy, select other rows and paste.

I haven’t entered any data yet in the cells

Select the three cells of the first
row, merge, copy, select other rows
and paste

You might mean:

Select the three cells of the first row, merge, copy and then you can select all the rest of the rows and “insert special/format”
This will not work if you have data in others than the first column, cause the empty cell will overwrite the others

55867.ods (22.8 KB)

plus macro:

Sub merge_selected_rows()
sel = thiscomponent.currentselection
adr = sel.rangeaddress
rws = sel.rows
rc = rws.count
for i = 0 to rc -1
	r = rws.getByIndex(i).queryintersection(adr)
	r.getbyindex(0).merge(true)
next
End Sub
1 Like