Excel tables can also be sorted by the color of the cell, the color of the text, and the icon displayed in the cell via Conditional Formatting’s Icon Sets.
In the following image, the user has manually applied fill colors to various Revenue values. We would like to sort the list by the colored values first (red zone) and then sort the duplicate color rows by the original sort scheme of Division – Region – Apps (blue zone).
Because we have previously defined the “blue zone” logic, we will modify the existing sort scheme by right-clicking on the table and choosing Sort and then Custom Sort.
Insert two new sort levels by clicking the Add Level button two times. If the newly inserted levels do not appear at the top of the list, but rather mixed in with the original three sort options (see below), use the up and down arrows to reorder the criteria logic within the sort list.
We will set the first sort criteria to examine the Revenue column. Instead of sorting on the cell’s value, we will sort on the cell’s color.
The sorting options will now change to allow us to select the color by which we want to sort.
We can now repeat the process, selecting Revenue and Cell Color for the secondary sort but select a different color.
Once the sort routine has been applied, the result list appears as follows.