[Workaround] Sorting rows containing merged cells in Calc

Discuss the spreadsheet application
Post Reply
DavidMWright
Posts: 36
Joined: Thu May 22, 2014 10:45 am

[Workaround] Sorting rows containing merged cells in Calc

Post by DavidMWright »

I have a spreadsheet containing merged cells. I want to be able to sort the rows, but it won't let me because of the merged cells. I'm trying to think of a way round this.
1. Can the cells be consolidated so they are no longer treated as merged?
2. Is it possible to have a spreadsheet in separate sections, one above the other, each with its own set of columns, so that merging becomes unnecessary?
3. Alternatively I could use a spreadsheet within a text document, but I'm not so keen on this one.
All suggestions welcome!
Thanks
Last edited by MrProgrammer on Tue Mar 21, 2023 4:25 pm, edited 1 time in total.
Reason: DavidMWright provided a workaround
Neo Office 2017.33 on Mac OS10.12.6
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Sorting rows containing merged cells in Calc

Post by acknak »

DavidMWright wrote:...1. Can the cells be consolidated so they are no longer treated as merged?
Sorry, I'm not sure I understand what you're after here. How would merged cells be considered not merged?
2. Is it possible to have a spreadsheet in separate sections, one above the other, each with its own set of columns, so that merging becomes unnecessary?
Not that I can think of. I think Excel can do this, by displaying a range of cells from some other part of the document as an image. Calc doesn't support that feature.
3. Alternatively I could use a spreadsheet within a text document, but I'm not so keen on this one.
I think this is the best approach, but I would keep it all in Calc:

Separate the data from the presentation. The merged cells are needed only for presentation. So move all the data to a separate sheet, with no merged cells, and replace it with links (references) to the data. You can sort the data and the references will pull everything into the sheet with the merged cells.

An alternative would be to use a database with an entry form. You can have multiple table controls on a form, each with it's own layout.
AOO4/LO5 • Linux • Fedora 23
DavidMWright
Posts: 36
Joined: Thu May 22, 2014 10:45 am

Re: Sorting rows containing merged cells in Calc

Post by DavidMWright »

A group of merged cells are clearly not treated the same as one cell, otherwise I could sort them! If you cut the contents of some merged cells and paste them elsewhere, the original individual cells are revealed, so they are only 'pretending' to be a single cell.
Anyway, I've managed to work around the problem by re-configuring the other elements of the spreadsheet so that no merged cells exist in the numeric section of the spreadsheet (an invoice), which is the area I need to be able to sort.
Neo Office 2017.33 on Mac OS10.12.6
tacklingdata
Posts: 2
Joined: Thu Jun 24, 2021 12:54 am

Re: Sorting rows containing merged cells in Calc

Post by tacklingdata »

I resolved this with the following steps:

1. Select All
2. Format --> Untick Merged Cells (Disclaimer: You may lose some content. Mine was fine, and result of pasting from a website.)
3. Sort as desired

Note: It looked like my merged cells had a small red triangle on the right side. Not the easiest to find, and there was no tooltip.

Hope it helps!
OpenOffice 5.1.9 on Mac OS 11.2.3
Post Reply