Can Excel sort by color? Absolutely. In addition to sorting by values, Excel can sort by cell color, font color and cell icon.
First, you need to define the colors for your sort fields / fields. In this example, we choose colors based on the sales column.
first Mark all lines with sales from 100 to 500 million. To select a background color, click Home on the main menu and go to the group Font . Find the color pump icon that stands for Fill color and click the down arrow next to it. A color palette appears, from which you can select a color by clicking on its thumbnail. For our example, we have selected Yellow from the Standard Colors group.
2nd Mark the next group with sales from 77 to 85 million and then choose Blue.
3rd From 60 to 65 million you choose green; for 50 million, choose Orange; select lavender for 40 to 45 million and cyan (turquoise) from 30 to 39 million
Now that Colors is defined by SALES, you can use them to sort by BOOK, AUTOMATIC, LANGUAGE or PUB DATE, and see for example authors selling Cyan, which signify the group of sales between 30 and 39 million.  1. Move the cursor anywhere within the data area, press Ctrl + A to highlight everything.
2nd From the Home tab in the main menu, select the group Editing Group . Click Sort and Filter> Custom Sort and the dialog Sort opens.
3rd If you have headlines, make sure you mark the box that says: My data has headings .
4th Select a sort key from the field Sort by under Column for example Author .
5th Under Sort by select Cell Color from the drop-down menu.
6th Under Order select the thumbnail for the color you want to sort. In our example, it is cyan.
7th And in the last field box, select At the top that sorts the selected rows at the top of the worksheet (select At the bottom the selected rows are sorted to the bottom).  8. Then click the Add Level button that adds a second sort key to the query.
ninth From left to right, select AUTHOR Cell Values A to Z and click OK .
Note that all cell phones (30 to 39 million in SALES) are sorted to the top of the spreadsheet and then alphabetized by AUTHOR within the cyan cells. The rest of the spreadsheet is sorted only by AUTHOR with all remaining sales totals (except 30 to 39 million).
For more samples and detailed instructions on sorting by colors, values and icons and use conditional formatting, check out these two previous articles: How to use Microsoft Excel's conditional formatting and How to customize Excel conditional formatting.