In Excel 2007 and Excel 2010, you can use icon sets in conditional formatting. For example, use Red, Yellow and Green stoplight icons, to highlight the good, average, and poor results in your sales data.
Rob emailed me recently, to ask how to limit the conditional formatting icons to 2 colours only, instead of the 3 or 4 default icon colours.
I am only interested in using 1 or 2 icons (a red X for “Off” and a Green light for “On” – not interested in the Yellow light). I want these icons to be triggered by a boolean (TRUE/FALSE) in another cell.
Create Your Own Icon Set in Excel 2010
Fortunately, if you’re using Excel 2010, you aren’t limited to the default icon sets – you can create your own, by mixing and matching from the available icons.
To create the icon set that Rob wants, I selected cells B2:B5, and set the following Formatting Rule.
- The Show Icon Only option is checked
- Green Circle icon when the value is greater than or equal to 1 (Number)
- Red X icon when the value is less than 1 and greater than or equal to 0 (Number)
- No Cell Icon when the value is less than 0
In cell B2 there is a formula to multiply the value in cell A2 by 1:
That formula is copied down to cell B5.
- If the result in column A is TRUE, the formula result in column B is 1, and a green circle shows.
- If the result in column A is FALSE, the formula result in column B is 0, and a red X shows.
Create Your Own Icon Set in Excel 2007 and Earlier
For earlier versions of Excel, where you can’t customize the icon sets, or icon sets don’t exist, you can use the WingDing font, combined with conditional formatting, to show coloured symbols in the cell.
There are instructions here: Conditional Formatting Icons in Excel 2003