by Allen Wyatt
(last updated April 12, 2018)
John asked if it is possible to sort or filter based on the conditional formatting in a range of cells. He has a list of values in column A and a list in column B. He created a conditional format that makes any values in column A that are also in column B appear as bold red, and he wanted to sort or filter by that result.
The short answer is that no, you cannot sort by conditional formatting results—at least not without updating to Excel 2007 or a later version of the program. Doing so is much more complex than one might think, as shown at this page on Chip Pearson's Web site:
The easiest answer is to simply recreate your conditional formula in column C, to the right of your two columns of data. The formula should return True or False, depending on whether the value in column A is found somewhere in column B. With the True/False value in column C, you can filter or sort based on what is there.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2384) applies to Microsoft Excel 97, 2000, 2002, and 2003.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
You can use conditional formatting to add shading to various cells in your worksheet. This tip shows how you can shade ...Discover More
When creating conditional formats, you are not limited to only one condition. You can create up to three conditions, all ...Discover More
If you need to shade alternating rows in a data table, you'll want to examine how you can accomplish the task with ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.