Q. Is there a way to conditionally format Excel so that my formulas automatically display a different font color?
A. You can color-code your formulas using Excel's conditional formatting tool as follows. Select a single cell (such as cell A1). From the Home tab, select Conditional Formatting, New Rule, and in the resulting New Formatting Rule dialog box, select Use a formula to determine which cells to format. In the resulting Format values where this formula is true box, enter the formula =ISFORMULA(A1) (make sure that no dollar signs appear in the formula). Click the Format button (near the lower-right portion of the dialog box) and select a desired color from the color dropdown box (I have selected green in the example below), and then click OK, OK. (Note: I also selected Bold from the Font style box so the formulas would stand out a little more).
In this example, we have now successfully applied conditional formatting to cell A1, which will display a bold, green font whenever a formula is entered into cell A1. Next, to apply this formatting to the entire worksheet, select cell A1, right-click cell A1, click the Format Painter tool icon, and then click the upper-left corner of the worksheet (in the row and column heading area) to apply this format to the entire worksheet. Thereafter, your entire worksheet will highlight all formulas using a bold, green font, an example of which is pictured below.
You can download this example workbook at carltoncollins.com/formulacolor.xlsx.
About the author
J. Carlton Collins (email@example.com) is a technology consultant, a CPE instructor, and a JofA contributing editor.
Note: Instructions for Microsoft Office in “Technology Q&A” refer to the 2007 through 2016 versions, unless otherwise specified.
Submit a question
Do you have technology questions for this column? Or, after reading an answer, do you have a better solution? Send them to firstname.lastname@example.org. We regret being unable to individually answer all submitted questions.