'Excel sorting / grouping rows

Is it possible to group poems in Excel, mark them as 'whole'?

I would like that after turning on filtering and sorting, e.g. A-Z, cells for one category would not get mixed up, they would be sorted together. Merge cells is not an option.

this is how I would like the cells to look like after A-Z filtering (selected the area of a given category with colors) / this is how they currently look:

enter image description here

enter image description here

I don't want cells from different categories (colors) to get mixed up when sorting



Solution 1:[1]

This is a partial answer to explain one way to do this.

You can sort a list by colour; however the caveat is you can only sort by one colour at a time.

Sort by colour

So it would have to be a VBA solution, and you would need to build up an array of the colours in the column then loop through the array, placing each colour at the top until the entire list is sorted.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tragamor