Yes, you can sort by colour in Excel! This feature makes it easy for you to colour code cells and then place them together at the top of your data set.
Have a look at the table below. (These are all fake details.) I have changed the fill colour of six cells – three yellow and three red. If these colours mean something, maybe red is bad and yellow means investigate. We may want to combine them all at the top of our list.
To show those six cells at the top of my list I can right click any of the yellow cells and click Sort and then click Put Selected Cell Color on Top.
This will adjust the list as shown below.
If I repeat this with a red cell, then the list will now look like this.
If you use the Sort option in the Filter button, colours appear in their own section – see below.
Obviously Excel has no built-in colour sequence for sorting (eg red comes before yellow) so it can only put a single colour at the top of the list each time you do a single sort.
If you sort the colours in sequence one after the other you can create your own sequence at the top of your list.
You can also use the Sort Dialog to create a sequence.
Sort Dialog
You can use the Sort dialog from the Data ribbon tab to create the sequence you want appear at the top – see example below.
Please note: I reserve the right to delete comments that are offensive or off-topic.