What to do about the error message "You can't sort a table with merged cell"
Asked by Mihai Codoban:

I have a table without any merged cells (as far as I can tell), yet when I want to sort it I get an error popup message saying "You can't sort a table with merged cell" . How can I find out which cells are merged? Is this a Confluence bug?

![Screen Shot 2022-10-10 at 10.25.45 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/219918i0A68AC803A593D57/image-size/large?v=v2&px=999 "Screen Shot 2022-10-10 at 10.25.45 AM.png")


Answers:
author: Ron Johnson
body: I was able to get this to work by deleting the Header Row and then adding a new row. I copied the header text for each column and placed it in notepad. Then put that text into the top of each column then went to Cell Options and made that row the Header Row and it worked perfect!


author: Paul O_Shaughnessy
body: I think the message is misleading. When I click to sort on table headers I get:

```
A-Z sort
```

Clicking a second time, I get

```
Z-A sort
```

Clicking a third time, I get the "Can't sort with merged cell" message. What actually happens on the third click is that the table is returned to the default sort.

However, it does look like there is a sort bug on strings from my experience. It looks like sorting only applies to the first word in a string

See: <https://jira.atlassian.com/browse/CONFCLOUD-73756>


author: Brant Schroeder
body: [@Mihai Codoban](/t5/user/viewprofilepage/user-id/4733867) Your table must have a merged cell somewhere in the table. If you can not easily see where it is you would have to view the table in edit mode, click on each cell option until you see split cell and that is your merged cell.

comments: author: Mihai Codoban
body: \> If you can not easily see where it is  

Is there a way one can easily see where it is?

\> you would have to view the table in edit mode, click on each cell option

What if there's \~80 cells? Surely this can't be the intentionally designed experience :)


author: Brant Schroeder
body: [@Mihai Codoban](/t5/user/viewprofilepage/user-id/4733867) It is usually a couple of columns that were combined. I would suggest just looking at the ones on the top if you do not visually see cells that are actually combined.


author: Mihai Codoban
body: Clicked all the cells, none has "split cell" enabled.


author: Brant Schroeder
body: [@Mihai Codoban](/t5/user/viewprofilepage/user-id/4733867) you can submit a support issue to Atlassian and have them take a look <https://support.atlassian.com/contact/>


author: Lonnie
body: We encounter the same issue. When we examine the underlying HTML of the table, there are no \<tr\> elements with rowspan or colspan set to any value other than "1".

There is no indication of a merged cell throughout the table.

Nevertheless, as the reader/viewer clicks the sorting icon, the page will complain "You can't sort a table with merged cell" once each cycle through the choices.


author: Lonnie
body: The sorter seems to do a poor job with numeric fields (which have been intentionally crafted to be sortable by typical alpha-numeric sorting libraries).

For example, "2023-03-15" should come before "2023-05-15" in an ascending sort. It does not.

Overall, the order appears to be more of jumble than a sort - regardless of which sort option is clicked (up, down, or none).


author: Petr Bartos
body: same issue here. can be replicated just by creating new table 2x2 (heading: IP adresses, comment) and trying to sort values there


Tags: cloud

confluence-cloud

sort

table