Are you tired of scrolling through hundreds of rows and columns, trying to identify cells with formulas in your Excel spreadsheets?
No worries! This guide will unveil various ways to highlight cells containing formulas in an Excel worksheet.
Excel is the best available data analysis and visualization tool for every business dealing with numbers and figures. Even, you could find Excel as the go-to app to store household shopping lists, grocery lists, or inventories.
To do all sorts of data analysis and trend generation you use many formulas in Excel. When the Excel worksheet becomes large and scrolling through the entire sheet becomes impossible, it’s a hectic job to audit the worksheet and resolve calculation errors.
In those situations, you can try any of the below-mentioned methods to quickly highlight all the formula cells so you can concentrate on functions that derive the insights.
Here are the reasons to highlight cells with formulas in Excel:
Now is the time to explore various proven and easy ways to highlight formula cells in Excel in the below sections.
By default, Excel would only show the result of a formula inside the cell where you create the formula. However, Excel also gives you a powerful tool to visualize the exact construction of all the formulas inside their respective cells within a worksheet. This tool is known as Show Formulas and is available inside the Formula Auditing block in the Formulas tab.
However, you don’t need to navigate your way to the above destination to find all the formulas in an Excel worksheet. Instead, you can simply hit the following keys altogether to visualize all formulas.
Ctrl + ` (accent) (On a Windows PC)
^ + ` (accent) (On a Mac)
Pressing all the above keys at once either on a PC or Mac will format the worksheet in a way so you can see all the formulas in cells. Now, you can manually highlight these cells from Home > Font > Fill Color.
If you wish to go back to the default view, simply hit the hotkeys again. The cell highlighting that you did previously won’t go away. So, you can easily notice the formula cells in the default view as well.
In the above method, Excel doesn’t highlight the formula cells automatically. You need to do that manually once you see which cells contain formulas. If you want an automatic way to find and highlight formula cells, then you can use the Excel Editing tool Go To. Here’s how to use this tool:
This method is good for a quick glance at the Excel worksheet for the positions of the formulas. The highlighting is volatile. As soon as you select any cell on the worksheet, Excel un-highlights the formula cells.
Another intuitive way to highlight formula cells without using any formula or codes is the Find and Replace tool. Here’s how you can use it:
All the methods explained so far offer static highlighting of formula cells. How about creating highlights that’ll stay forever and will change dynamically when you add or remove new formula cells?
Yes, you can easily get that by using Conditional Formatting in Excel. Find below the easy steps to implement this dynamic highlighting of all formula cells in your worksheet:
=ISFORMULA(A1)
The ISFORMULA function is available since Excel 2013 edition. So, the method won’t work on earlier Excel editions than Excel 2013.
The latest Excel web app has the ISFORMULA function so you can use Conditional Formatting to highlight formula cells on Excel for the Web as well.
If highlighting formula cells in Excel is part of automation in your Excel worksheet involving VBA scripts, then this section is particularly for Excel masters like you. Below, I’m explaining how to use two VBA scripts to highlight cells containing formulas in a selected range and the entire worksheet:
Sub HighlightFormulaCells() Dim r As Range With ActiveSheet.UsedRange .Interior.ColorIndex = xlNone For Each r In .Cells If r.HasFormula Then r.Interior.ColorIndex = 6 'yellow Next End With End Sub
If you wish the VBA program to highlight formula cells in a given cell range and not in the whole worksheet, then use the following VBA code:
Sub Highlight_Formulas_Range() Dim Rng As Range For Each Rng In Range("A1:G15") 'Range to highlight cells If Rng.HasFormula Then Rng.Interior.ColorIndex = 3 'red Else Rng.Interior.ColorIndex = 0 'blank End If Next Rng End Sub
In the above code, modify the value in the Range("A1:G15") code element according to your own worksheet data. For example, you could make it Range("B1:H15") to pinpoint formulas in the said cell range.
These are irreversible changes. You won’t be able to go back to the previous formatting. So, create a copy of the existing worksheets before executing these VBA scripts.
If you need to automate the Conditional Formula-based process to highlight formula cells, you can use the following script in Excel Automate (Office Scripts). The script is valid for both the Excel 365 desktop app and Excel on the Web app.
function main(workbook: ExcelScript.Workbook) < let conditionalFormatting: ExcelScript.ConditionalFormat; let selectedSheet = workbook.getActiveWorksheet(); // Create custom from range A1:D6 on selectedSheet conditionalFormatting = selectedSheet.getRange("A1:D6").addConditionalFormat(ExcelScript.ConditionalFormatType.custom); conditionalFormatting.getCustom().getRule().setFormula("=ISFORMULA(A1)"); conditionalFormatting.getCustom().getFormat().getFill().setColor("#fce4d6"); conditionalFormatting.setStopIfTrue(false); conditionalFormatting.setPriority(0); >
Now you know all the popular methods to highlight cells with formulas in Excel. If you’re just starting your journey as an Excel user and learning new Excel skills, start with the methods like Go To function, the Show Formulas keyboard shortcut, and the Find & Replace tool method.
If you’ve been using Excel for a while, use the Conditional Formatting-based method to highlight cells depending on a formula. Finally, if you’re an ace Excel user and looking for advanced automation in Excel, check out the VBA scripts and automate the whole process of highlighting formula cells in Excel.
I'm a freelance writer at HowToExcel.org. After completing my MS in Science, I joined reputed IT consultancy companies to acquire hands-on knowledge of data analysis and data visualization techniques as a business analyst. Now, I'm a professional freelance content writer for everything Excel and its advanced support tools, like Power Pivot, Power Query, Office Scripts, and Excel VBA. I published many tutorials and how-to articles on Excel for sites like MakeUseOf, AddictiveTips, OnSheets, Technipages, and AppleToolBox. In weekends, I perform in-depth web search to learn the latest tricks and tips of Excel so I can write on these in the weekdays!
Subscribe for awesome Microsoft Excel videos 😃
👉 Find out more about our Advanced Formulas course!