Skip to main content

How to highlight / conditional formatting cells with formulas in Excel?

Author: Xiaoyang Last Modified: 2024-10-09

Supposing you have a large worksheet which contains both constants and formulas, and now you want to know the location of all the formula cells. Of course, you can select all the formulas easily and quickly by using Go To Special function. But if your data or formulas need to be changed now and then, you must apply this function repeatedly.

Here, I introduce you a better solution-- Conditional Formatting. With Conditional Formatting, you can highlight all cells with formulas and what's more, your highlighted formatting will be adjusted with your changing data.

Highlight formula cells with Define Name Formula and Conditional Formatting

Highlight formula cells with User Defined Function and Conditional Formatting

Highlight formula cells with Kutools for Excel quickly and easily


Highlight formula cells with Define Name Formula and Conditional Formatting

Before using the Conditional Formatting, you should create a Defined Name, please do with following steps:

1. Open your worksheet and go to click Formulas > Name Manager, see screenshot:

A screenshot showing how to access the Name Manager in Excel

2. In the popped out Name Manager dialog box, click New button.

A screenshot of the Name Manager dialog box

3. And in the New Name dialog box, do the following operations:

  • (1.) Type a name for your defined name formula, in this example, I will input Formatformulas;
  • (2.) Choose Workbook from the Scope drop down list;
  • (3.) Enter this formula =GET.CELL(48,INDIRECT("rc",FALSE)) into the Refers to field.

A screenshot showing the creation of a new name in Excel using the GET.CELL formula to highlight cells with formulas

4. Then click OK to return to the former dialog and close it.

5. Then select your range or the whole worksheet that you want to highlight the formula cells.

6. Under Home tab, click Conditional Formatting > New Rule, see screenshot:

A screenshot of the Conditional Formatting menu in Excel for applying the new rule to highlight formulas

7. In the New Formatting Rule dialog, click Use a formula to determine which cells to format option, and enter this formula =Formatformulas (Formatformulas is your defined name in step 3), you can change it to your own defined name. See screenshot:

A screenshot of the New Formatting Rule dialog box in Excel for highlighting cells using the defined name formula

8. Then click Format button, set your formatting under Fill tab, see screenshot:

A screenshot showing how to format cells with Conditional Formatting in Excel using the Fill tab

9. And then click OK > OK to finish the operations, and all the cells with formula have been highlighted at once as following shown:

A screenshot of highlighted formula cells in Excel after applying the Conditional Formatting rule

Notes:

1. When you enter formulas in any of the cells which covered by the Conditional Formatting, they will be highlighted automatically.

2. After finishing the operations, you need to save your workbook as an Excel Macro- Enabled Workbook so that the conditional formatting cells are saved. And when you open your workbook next time, click Enable Content.

A screenshot showing the prompt to save the workbook as Macro-Enabled in Excel to preserve the conditional formatting


Highlight formula cells with User Defined Function and Conditional Formatting

If you don’t want to use the defined name formula, you can create a simple User Defined Function, and then apply the Conditional Formatting to solve this task.

1. Firstly, hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following shorter code in the Module Window.

Function HasFormula(Rng As Range) As Boolean
'Updateby Extendoffice
Application.Volatile
HasFormula = Rng.HasFormula
End Function

3. Then save and close this code and go back the worksheet to select the range or whole worksheet that you want to highlight the formula cells.

4. Go to Home tab, and click Conditional Formatting > New Rule.

5. In the New Formatting Rule dialog, select Use a formula to determine which cells to format option, and enter this formula =Hasformula(A1), see screenshot:

A screenshot showing the Conditional Formatting formula used with a User Defined Function to highlight cells in Excel

6. Then click Format button, and choose one color you like under Fill tab in the Format Cells dialog box.

7. And then click OK > OK to close the dialogs. And all the cells contains formula have been highlighted immediately.

Notes:

1. In the formula A1 indicates the first cell in your selected range, you can change it to meet as your need.

2. When you enter formulas in any of the cells which covered by the Conditional Formatting, they will be highlighted automatically.

3. After finishing the operations, you need to save your workbook as an Excel Macro- Enabled Workbook so that the conditional formatting cells are saved. And when you open your workbook next time, click Enable Content.


Highlight formula cells with Kutools for Excel

It seems the above two methods both are somewhat difficult for our Excel beginner, here, I will recommend a powerful tool- Kutools for Excel, with its multifunctional Worksheet Design feature, you can quickly highlight all formulas of the whole workbook.

Note:To apply this Worksheet Design, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Open the workbook which you want to highlight all the formulas.

2. Click Kutools Plus > Worksheet Design, and a new Design tab will be displayed in the ribbon, then click Highlight Formulas option in the View group, see screenshots:

A screenshot showing the Worksheet Design button on the Kutools Plus tab
Arrow
A screenshot showing the Highlight Formulas button on the Design tab

3. And all of the formulas within the whole workbook have been highlighted immediately. See screenshot:

A screenshot showing formula cells highlighted in Excel using Kutools

Notes:

1. Click the Highlight Formulas again, the highlighting will be turned off.

2. You can change the highlighting color to your like by clicking Settings under the Design tab, and then in the Design Tools Settings dialog, choose one color you like from the Formulas color section:

A screenshot showing the Design Tools Settings in Kutools for Excel for changing formula highlight colors

3. When you enter new formulas in any of the cells within the current workbook, they will be highlighted automatically.

Click to know more about this Highlight Formulas utility.

Download and free trial Kutools for Excel Now !


Demo: Highlight formula cells with Kutools for Excel

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Related articles:

How to lock and protect formulas in Excel?

How to hide formulas not displayed in the formula bar in Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!