Sort data by conditional formatting
There are several ways tosort data in Microsoft Excel.
Learn how to use conditional sorting inExcelto sort by font color, cell background color, or icon color.
Blank rows and columns between areas of related data are okay.

Excel then determines if the data area hasfield namesand excludes those rows from the records to be sorted.
Allowing Excel to snag the range to be sorted is fine for small amounts of data.
If the same range is to be sorted repeatedly, the best approach is togive the range a name.

This way, Excel automatically highlights the correct range of data in the worksheet.
Any sorting requires the use ofsort order.
When sorting by values, there are two possible sort orders: ascending and descending.

Go to theHometab, then selectSort & Filter>Custom Sort.
Select theSort ondrop-down arrow and choose Cell Color.
Clear theMy data has headerscheck box so that the first row doesn’t get cut off.

Select theOrderdrop-down arrow and chooseRed.
The four records with red backgrounds are grouped together at the top of the data range.
To sort the data by font color:
Select theSort ondrop-down arrow and choose Font Color.

Select theOrderdrop-down arrow, then chooseRed.
SelectAddto add a second sort level.
Use the same parameters as the first sort level, but this time select theOrderdrop-down arrow and chooseBlue.

SelectOKto sort the data and exit the dialog box.
Highlight the range of cells to be sorted (cells A2 to B31 in the example).
Go to theHometab and selectSort & Filter>Custom Sort.

Select theColumndrop-down arrow, then choose the column containing the conditional icons (Temperature in the example).
Select theSort ondrop-down arrow, then chooseConditional Formatting Icon.
Select theOrderdrop-down arrow, then chooseGreen.

Use the same tweaks as the first sort level, but this time select theOrderdrop-down arrow and chooseYellow.












