Microsoft Excel: A formula for going green

By J. Carlton Collins, CPA

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).

techqa1


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.

techqa2


You can download this example workbook at carltoncollins.com/formulacolor.xlsx.


About the author

J. Carlton Collins (carlton@asaresearch.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 jofatech@aicpa.org. We regret being unable to individually answer all submitted questions.

Where to find March’s flipbook issue

The Journal of Accountancy is now completely digital. 

 

 

 

SPONSORED REPORT

Get Clients Ready for Tax Season

This comprehensive report looks at the changes to the child tax credit, earned income tax credit, and child and dependent care credit caused by the expiration of provisions in the American Rescue Plan Act; the ability e-file more returns in the Form 1040 series; automobile mileage deductions; the alternative minimum tax; gift tax exemptions; strategies for accelerating or postponing income and deductions; and retirement and estate planning.