KutoolsforOffice — One Suite. Five Tools. Get More Done.April Sale: 20% Off

How to Find Text in Formulas Only in Excel

AuthorAmanda LiLast modified

Sometimes you don’t just want to find a value in Excel. You want to know whether that value is written inside a formula. This is common when auditing worksheets, such as finding hardcoded tax rates like 0.08, checking whether old functions like VLOOKUP are still used, locating formulas linked to an old sheet or workbook, or finding formulas that contain specific conditions like "Closed" or "Approved".

The problem is that the same text or number may also appear in normal cells. For example, 0.08 may appear in a tax rate column, in a note, and inside formulas such as =B2*(1+0.08). If you use Excel’s regular Find command, the results can mix all of these together, which makes formula checking slow and confusing.

In this tutorial, we’ll show you three ways to find text or numbers in formulas only. You can use Excel’s built-in Go To Special and Find tools, use Kutools for Excel to search formulas more directly, or run a VBA macro to highlight matching formula cells automatically.


Search formula cells only with Go To Special and Find

This method is the easiest option when you only need to search the current worksheet or a selected range. The idea is simple: select all formula cells first, then run Find on that selection. This helps avoid matches from normal values or notes that contain the same text.

Important note:

Do not rely on Look in: Formulas alone. In Excel, this option means Excel looks at formula text for formula cells, but regular cells may still be included in the search. To find text in formulas only, select formula cells first with Go To Special.

  1. On the Home tab, click Find & Select >Formulas.
    Formulas option on the Home tab
  2. Only formula cells are now selected. Press Ctrl + F to open the Find and Replace dialog.
  3. In the Find what box, type the text you want to find in formulas only.
  4. Click Options >> if the advanced options are hidden.
  5. Set Within to Sheet, and set Look in to Formulas.
    Find and Replace dialog
  6. Click Find All or Find Next.

Result

In this worksheet, searching 0.08 after selecting formula cells returns only the formulas that contain 0.08, such as the hardcoded tax formulas in column D, while excluding the tax rate values in column C and text matches in column E.

Excel worksheet showing mixed data where searching 0.08 returns values in formulas in column D

Tip:

After selecting formula cells, keep the selection active before pressing Ctrl + F. If you click another cell before searching, Excel may search a wider range again.

Pros

  • Built into Excel
  • No add-ins or code required
  • Works well for quick searches in formula cells

Cons

  • Requires several manual steps
  • You need to select formula cells again for each new search range
  • Less convenient when searching across multiple worksheets or workbooks

Find across ranges, sheets, or workbooks with Kutools

If you often need to search formulas in large workbooks, multiple worksheets, or selected ranges, Kutools for Excel provides a more direct way. Its Super Find feature can search by cell type, including formulas, and it lets you specify the search scope such as selection, active sheet, selected worksheets, active workbook, or all workbooks.

With Kutools, you can find formulas that contain specific text, formulas that begin with or end with certain text, formulas that do not contain certain text, and formulas based on text length or case-related conditions.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Integrated with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...
  1. Click Kutools > Find > Super Find to open the Super Find pane.
  2. From the Within drop-down list, choose the search scope. You can search the Selection, Active sheet, Selected worksheets, Active workbook, or All workbooks.
  3. Enable the Formula button only, and disable any other selected search type buttons, so Kutools searches text only within formulas.
  4. From the Type drop-down list, choose a condition such as Text contains.
  5. In the Value box, enter the text you want to find, such as 0.08, VLOOKUP, etc.
  6. Click Find. All matching formula cells will appear in the results list.
  7. Click any result to jump directly to that cell, or click Select to select all matched cells at once.
    Kutools Super Find searching 0.08 in formulas only in Excel and listing matching formula cells in the results pane

This method is especially helpful when you need to search formulas across multiple sheets or workbooks, because you can control the search range directly from the Within drop-down list without repeatedly selecting formula cells manually.

Pros

  • Searches formula cells directly
  • Supports selection, active sheet, selected worksheets, active workbook, and all workbooks
  • Provides flexible conditions such as text contains, begins with, ends with, and does not contain
  • Lists all matching cells and lets you jump to them quickly

Cons

  • Requires installing Kutools for Excel

Kutools for Excel - Packed with over 300 essential tools for Excel. Make Excel tasks faster, easier, and more efficient. Download now!


Highlight formula cells containing specific text with VBA

If you want to repeat the same search often, you can use a VBA macro. The following macro checks only cells that contain formulas, then highlights the formula cells whose formulas contain the text you enter.

  1. Select the range where you want to search. To search the whole worksheet, click any cell first.
  2. Press Alt + F11 to open the VBA editor.
  3. Click Insert > Module.
  4. Paste the following code into the module:
    Sub FindTextInFormulasOnly()
        Dim c As Range
        Dim searchText As String
        Dim searchRange As Range
        Dim foundCount As Long
    
        searchText = InputBox("Enter the text to find in formulas:", "Kutools for Excel")
    
        If Len(searchText) = 0 Then Exit Sub
    
        On Error Resume Next
        Set searchRange = Selection.SpecialCells(xlCellTypeFormulas)
        On Error GoTo 0
    
        If searchRange Is Nothing Then
            MsgBox "No formula cells found in the selected range.", vbInformation, "Kutools for Excel"
            Exit Sub
        End If
    
        For Each c In searchRange
            If InStr(1, c.Formula, searchText, vbTextCompare) > 0 Then
                c.Interior.Color = vbYellow
                foundCount = foundCount + 1
            End If
        Next c
    
        If foundCount = 0 Then
            MsgBox "No matches found.", vbInformation, "Kutools for Excel"
        Else
            MsgBox foundCount & " matching formula cell(s) found and highlighted.", vbInformation, "Kutools for Excel"
        End If
    End Sub
  5. Press F5 to run the macro.
  6. Enter the text you want to find. Matching formula cells will be highlighted in yellow.
    Matching formula cells highlighted in yellow

Pros

  • Searches formulas only
  • Can highlight all matching formula cells automatically
  • Good for repeated tasks and custom workflows

Cons

  • Requires macro access
  • May not be allowed in restricted company environments
  • Results are highlighted, which may overwrite existing fill colors and require manual clearing afterward

Which method works best for you?

MethodBest forLimitations
Select formula cells first, then FindQuick built-in searches in one sheet or selected rangeRequires manual selection of formula cells before searching
Kutools for Excel Super FindSearching formulas across selections, sheets, workbooks, or multiple workbooksRequires installing Kutools for Excel Download
VBA macroRepeated formula-only searches and automatic highlightingRequires macros to be enabled

Conclusion

Finding text in formulas only is useful when a value, function name, or reference also appears in normal cells. Instead of checking every match one by one, you can narrow the search to formula cells and focus only on the results that matter.

For a quick search, selecting formula cells first and then using Find is usually enough. If you work with large files or need to search across multiple sheets and workbooks, Kutools for Excel is easier to control. For repeated checks, the VBA macro can highlight matching formulas automatically.

Choose the method based on how often you need to do this and how large your workbook is.

I hope you found this tutorial helpful. If you’d like to explore more Excel tips and practical solutions, please click here to browse our full collection of Excel tutorials.