Excel.Tips.Net: Sorting Data Containing Merged Cells

By Allen Wyatt for Excel.Tips.Net

Excel has long included the ability to merge adjacent cells into a larger, single cell. This ability has been used by many worksheet designers to give their worksheets a polished, professional look.

There is a huge drawback to using merged cells, however: You can’t sort tables that include them. If you try, you’ll get a message that says “The operation requires the merged cells to be identically sized.”

The most obvious solution to the problem is to not use merged cells. Let’s say, for instance, that you have a worksheet in which each “record” actually consists of two rows, and that the first column of the worksheet contains merged cells. (Each two-row record starts with two merged cells spanning the two rows. This merged cell contains a project name.)

It is better to unmerge the cells in the first column, but then you may wonder how to make the records sort properly in the worksheet; how to keep the row pairs together during a sort. You can do this by putting your project name in the first row and the project name appended with “zz” in the second row. For instance, if the first row contains “Wilburn Chemical” (the project name), then the second row could contain “Wilburn Chemicalzz”. Format the second row’s cell so the name doesn’t show up (such as white text on a white background), and you can then successfully sort as you want to.

Article Continued Here

Stop Responding to Threats.
Prevent Them.

Want to get monthly tips & tricks?

Subscribe to our newsletter to get cybersecurity tips & tricks and stay up to date with the constantly evolving world of cybersecurity.

Related Articles