Yes. In Excel for Microsoft 365 on Windows, press Ctrl+H, choose Options if needed, set Look in to Formulas, then enter the text to find and its replacement; use Replace or Replace All to change matching formula text. Check the search scope first, because a replacement can affect many formulas at once.
How to find and replace formula text
The Replace command edits the text that makes up formulas, rather than searching only the displayed results. To use it in a worksheet:
- Open the workbook and, if you want to limit the change, select the cells you want Excel to search.
- Press Ctrl+H, or use Home > Find & Select > Replace.
- Select Options to show the search settings. Set Look in to Formulas.
- Enter the exact text to search for in Find what and the new text in Replace with.
- Use Find Next or Find All to inspect matches. Choose Replace for one match, or Replace All to change every match within the selected search scope.
For example, you could replace one worksheet name in a set of formulas that refers to a source tab that has been renamed. Replacing a distinctive reference fragment is often safer than replacing a short piece of text that could appear elsewhere. If you are unsure, use Find All first and inspect the results; you can close the dialog without making a change.
What the Look in setting changes
Excel can search different representations of cell contents. With Look in set to Formulas, it searches the formula text stored in cells. With Values selected, it searches displayed or calculated results instead. This difference matters: a cell may display 60 while its underlying formula contains a function and cell references. Searching for 60 as a value is not the same as searching for the formula that calculates 60.
The Find and Replace dialog also lets you define where and how Excel searches. Depending on the dialog and version, options include searching the current sheet or the whole workbook, searching by rows or columns, matching case, and matching the entire cell contents. A selection can restrict the search to those cells; without one, the search generally covers the current worksheet unless you choose a broader scope. Check these settings before using Replace All.
Match entire cell contents is useful when you mean to find a cell whose full contents match the search text. It is usually not the right setting for finding a short fragment inside a longer formula. Search options can persist from earlier searches, so do not assume the dialog has returned to its defaults.
Finding formulas that use a particular function
To locate formulas using a function, search for a distinctive part of its name with Look in set to Formulas. For example, searching for SUM( can help identify formulas containing that function. Find All can list matching cells, making it easier to review them before any edits. This is a text search, not a formula audit: it will not tell you whether the formula is correct or whether every relevant formula uses the same function.
You can also select formula cells without searching for a particular function. Choose Home > Find & Select > Go To Special, select Formulas, and confirm. Excel selects cells containing formulas in the applicable range. This is helpful when you want to format or inspect formula cells as a group, but it does not distinguish one function from another. To identify formulas with a specific fragment, use Find and Replace with Look in set to Formulas instead.
A concrete formula replacement example
Suppose row 2 has the numbers 12, 18, and 30 in C2:E2, and F2 contains a formula that adds them. With that layout, the existing formula is =SUM(C2:E2), which returns 60. If the goal is to calculate the average instead, the replacement formula for F2 is =AVERAGE(C2:E2), which returns 20 because (12 + 18 + 30) divided by 3 is 20.
For a whole range of similar formulas, one approach is to search for SUM( and replace it with AVERAGE( while Look in is set to Formulas. Review the matches and make sure every selected formula should change: some SUM formulas may be totals that must remain totals. Replacing just the function name leaves the cell references and the rest of each formula intact. If formulas have different structures, changing them one at a time or using a carefully designed formula may be safer.
Control the scope and reduce mistakes
A workbook-wide replacement can affect formulas on hidden sheets or sheets you are not currently reviewing. Before using Replace All, confirm whether the dialog is set to the current sheet or the workbook. If the change should apply only to one table or range, select that range first and confirm that Excel is searching the selection. For important workbooks, save a separate copy before making a bulk change.
Use Find All to review matches, then replace a single occurrence and check the result before applying the change more broadly. After a replacement, inspect representative cells and confirm that the results still make sense. If the workbook uses formulas to feed reports, charts, or other sheets, check those outputs too. Ctrl+Z can usually undo an ordinary Find and Replace operation, but it is not a substitute for a backup, particularly if you continue editing afterward.
Formula text can contain similar-looking references that mean different things. For example, A1, $A$1, and Sheet2!A1 are not interchangeable in every context. A broad search for a short fragment can change more formulas than intended, while a narrow search can miss variations. Use a distinctive fragment and inspect the matches rather than assuming Excel understands the meaning you intended.
Wildcards and other search details
Excel’s Find and Replace supports wildcard characters in searches. An asterisk can stand for a sequence of characters, and a question mark can stand for one character. That can help locate patterns, but it can also broaden a search unexpectedly. To search for a literal wildcard character, precede it with a tilde. Be especially cautious with wildcard searches in formulas: a pattern may match multiple formula structures, not just the one you had in mind.
Searches are based on text, not on formula logic. A search for a function name does not understand nested functions, argument types, or whether a reference is absolute or relative. It may find the text inside a larger formula, and it may miss formulas written differently to achieve the same result. If the replacement changes punctuation, parentheses, or separators, verify the resulting formula carefully; a malformed formula may show an error or calculate differently.
Replacing formulas with values is a different task
People sometimes mean they want to remove formulas and keep the current results. Find and Replace is generally not the right tool for that job: it cannot turn a variety of formulas into their individual calculated values through one generic text replacement. Instead, copy the formula cells and paste their values over the same cells. In Excel for Windows, use Home > Paste > Paste Values, or open Paste Special and choose Values. This replaces the formulas with the values currently shown.
Before pasting values, consider whether the cells need to update when source data changes. Once a formula is replaced with a value, that calculation no longer updates automatically. Keep an untouched copy if you may need the original formulas later. If you only need to inspect or share results, making a copy of the sheet or workbook and converting formulas in that copy can preserve the working version.
Windows, Mac, and Excel for the web
The steps above describe Excel for Microsoft 365 on Windows. On a Mac, the Find and Replace dialog and its search-scope choices are available, and you can use Home > Find & Select > Replace in the ribbon. Keyboard shortcuts can differ with the keyboard and Excel version, so use the ribbon command if Ctrl+H does not open the dialog on your Mac. On Excel for the web, look for Find and Replace in the Home tab; available options can differ from the desktop application. If you cannot select Formulas or set the scope you need in the web version, open the workbook in desktop Excel.
Frequently Asked Questions
Can Excel find a formula by its function name?
Yes. Open Find and Replace, set Look in to Formulas, and search for a distinctive function fragment such as SUM(. Review the matches because the search finds text, not the formula’s purpose.
Can I replace formulas in the entire workbook?
Yes, if you choose the workbook-wide search scope in the Find and Replace options. Check the scope before selecting Replace All, since matching formulas on other sheets may also change.
Can I find formulas instead of their results?
Yes. Set Look in to Formulas. If it is set to Values, Excel searches calculated or displayed results instead, which can lead to very different matches.
Can Find and Replace turn formulas into values?
Not reliably as a general conversion. Copy the cells and use Paste Values to replace formulas with their current results. Remember that those values will no longer recalculate.
How can I undo a formula replacement?
Press Ctrl+Z on Windows soon after the change, or use Undo on the Quick Access Toolbar. Save a copy before a large replacement, because later actions or closing the workbook can make recovery less straightforward.
Related
- How to Update a Data Validation List in Excel Step by Step
- Change Date Format in Excel for the Web: Step-by-Step
- How to Change a Date Format to a Custom Format in Excel
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel LEN Formula Examples: Count Text in CellsIn Excel for Microsoft 365, use =LEN(A2) to count the characters in cell A2, including spaces and punctuation.…
- Excel NPV With Different Rates: Formula, Steps, ExampleExcel’s NPV function accepts one discount rate, so it cannot directly calculate net present value when the rate…
- How to Find Repeated Names in Excel with COUNTIF FormulaTo find repeated names in Excel, put names in A2:A100, then enter =COUNTIF($A$2:$A$100,A2) in B2 and fill it…
- Excel Conditional Formatting Formula for Due Dates ExplainedIn Excel for Microsoft 365 on Windows, select the cells to format, choose Home > Conditional Formatting >…
- Excel Column Name to Number: Formula and ExamplesIf cell A1 contains an Excel column name, enter =COLUMN(INDIRECT(A1&"1")) to return its number: A returns 1, Z…
- Excel LEN, FIND, LEFT & RIGHT: Text Extraction FormulasTo split text in Excel, combine LEN and FIND with LEFT or RIGHT: use =LEFT(A2,FIND(" ",A2)-1) to return…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.