Replace in Excel: Complete Guide to Find & Replace, SUBSTITUTE, and REPLACE Functions
Master replace excel techniques with Find & Replace, SUBSTITUTE, and REPLACE functions. Step-by-step examples, shortcuts, and practical use cases.

Learning how to replace excel data efficiently is one of the most valuable skills any spreadsheet user can develop, whether you are cleaning up imported customer lists, fixing inconsistent product codes, or standardizing date formats across thousands of rows. The replace excel toolkit includes the classic Find & Replace dialog, the powerful SUBSTITUTE function, the position-based REPLACE function, and modern alternatives like Power Query and the SUBSTITUTE chain pattern that experienced analysts rely on every single day.
Most beginners learn Find & Replace through the Ctrl+H keyboard shortcut and stop there, never realizing that Excel offers at least four distinct ways to swap text, numbers, formulas, and even formatting throughout a workbook. Each method has specific strengths: Find & Replace excels at quick manual edits, SUBSTITUTE handles dynamic formula-driven replacements, REPLACE targets fixed character positions, and Power Query manages bulk transformations across millions of rows without breaking your source data.
The need to replace content in Excel arises constantly in real business workflows. Sales teams receive CRM exports with trailing whitespace, finance departments inherit budgets with mixed currency symbols, HR specialists clean employee records with formatting inconsistencies, and marketing analysts standardize campaign codes for reporting dashboards. Without solid replace skills, these tasks consume hours that could otherwise go toward analysis, decision-making, and higher-value strategic work that actually moves the business forward.
What separates intermediate users from true Excel power users is knowing which replace method to apply in each situation. Replacing a single typo across a worksheet calls for Ctrl+H, but standardizing phone number formats across a hundred-thousand-row table demands SUBSTITUTE nested inside a formula. Replacing the first three characters of a SKU requires REPLACE with specific position arguments, and replacing values based on conditional logic often calls for IF combined with SUBSTITUTE or a lookup-driven approach.
This comprehensive guide walks through every replace technique Excel offers, from the basics that every user should master to the advanced patterns that separate analysts from spreadsheet operators. You will learn keyboard shortcuts that save hundreds of clicks per week, wildcard patterns that handle complex search scenarios, formula combinations that automate repetitive cleanup, and troubleshooting tips for the moments when Excel just will not find what you know is sitting right there in the data.
Beyond the mechanics, you will also discover when replacing is the wrong answer entirely. Sometimes a lookup table, a conditional format, or a Power Query transformation produces cleaner, more maintainable results than a string of replace operations buried inside dozens of cells. Understanding these tradeoffs helps you build workbooks that survive audits, scale to larger datasets, and remain readable for the next person who has to open the file six months from now without context.
By the end of this guide, you will have a complete mental map of Excel replace functionality and a practical playbook for choosing the right tool every time. Whether you are preparing for a certification exam, optimizing daily reporting tasks, or simply tired of manually fixing the same spreadsheet errors week after week, the techniques here will dramatically reduce the friction between messy raw data and the clean, analysis-ready tables your work depends on.
Excel Replace by the Numbers

Find & Replace Step-by-Step Workflow
Open the Dialog
Define Search Scope
Enter Find and Replace Values
Preview with Find All
Execute Replace All
Verify and Undo If Needed
The SUBSTITUTE and REPLACE functions look similar at first glance, but they solve fundamentally different problems and choosing the wrong one leads to frustrating debugging sessions. SUBSTITUTE swaps text based on what the content actually is, while REPLACE swaps text based on where it sits in the string. Understanding this distinction unlocks dozens of cleanup patterns that would otherwise require complex helper columns, manual edits, or external scripting tools that introduce unnecessary complexity into your workflow.
SUBSTITUTE follows the syntax SUBSTITUTE(text, old_text, new_text, [instance_num]) and is perfect for replacing known values regardless of position. For example, SUBSTITUTE(A1, "-", "") strips every dash from a phone number, while SUBSTITUTE(A1, " ", "", 2) removes only the second space in a string. The optional instance argument gives surgical control that Find & Replace cannot match, making SUBSTITUTE the workhorse for formula-driven text cleanup in production spreadsheets.
REPLACE uses the syntax REPLACE(old_text, start_num, num_chars, new_text) and operates purely on character positions. If you know a product code always begins with three letters followed by a dash, REPLACE(A1, 1, 4, "NEW-") swaps those first four characters cleanly. This positional behavior is invaluable when you need to standardize fixed-width data, mask sensitive information like credit card digits, or insert prefixes into uniformly structured identifiers without scanning content.
Combining SUBSTITUTE with itself creates powerful chained replacements. SUBSTITUTE(SUBSTITUTE(A1, "Mr.", ""), "Mrs.", "") removes both honorifics in a single formula, and nesting deeper handles three, four, or even ten replacements per cell. Excel imposes no practical limit on nesting depth for this pattern, though readability suffers after about five levels. For longer chains, consider Power Query or a custom LAMBDA function that accepts a replacement list as a parameter for cleaner maintenance.
The fourth argument of SUBSTITUTE deserves special attention because it solves problems that stump even experienced users. Imagine a string like "2025-Q1-North-Sales-Final" where you want to replace only the third dash with a slash. SUBSTITUTE(A1, "-", "/", 3) does exactly that, leaving the other dashes intact. This instance-aware replacement is impossible with the standard Find & Replace dialog and would otherwise require slicing the string into pieces with LEFT, MID, and RIGHT functions before reassembling it manually.
Both functions are case-sensitive, which trips up users coming from Find & Replace where case sensitivity is optional. SUBSTITUTE("EXCEL is great", "excel", "sheets") returns the original string unchanged because the capitalization differs. To perform case-insensitive replacements within formulas, wrap the source text in UPPER or LOWER, perform the substitution, then handle case restoration separately. Alternatively, use the newer REGEXREPLACE function in Microsoft 365 for true regex-based case-insensitive operations.
Performance matters when applying these functions across large datasets. SUBSTITUTE evaluates quickly on individual cells but can slow workbooks dramatically when nested deeply and copied across hundreds of thousands of rows. For bulk operations on large tables, Power Query consistently outperforms formula-based replacement because it transforms data once during refresh rather than recalculating on every change. Profile your workbook performance before committing to a formula-heavy approach for enterprise-scale spreadsheets.
Replace Excel Techniques Compared to VLOOKUP and Other Functions
Find & Replace supports two wildcard characters that dramatically expand its power. The asterisk (*) matches any sequence of characters, including zero characters, so searching for "ABC*XYZ" finds any cell containing ABC followed eventually by XYZ. This is invaluable for cleaning up data where you know the boundaries of a substring but not what sits between them.
The question mark (?) matches exactly one character, which is perfect for fixed-length codes. Searching for "A?C" finds ABC, ADC, and AXC but not ABBC. To search for a literal asterisk or question mark, prefix it with a tilde (~). Wildcards do not work inside SUBSTITUTE or REPLACE functions, but the newer XLOOKUP and FILTER functions accept similar pattern matching for more advanced workflows.

Find & Replace vs SUBSTITUTE Function: Which Should You Use?
- +Find & Replace requires no formula knowledge and works instantly with Ctrl+H
- +Supports wildcards (* and ?) for flexible pattern matching across cells
- +Can search entire workbook, multiple sheets, or selected ranges with one click
- +Preserves original data when you choose Replace one match at a time
- +Works on formulas, values, comments, and even cell formatting
- +Undoable with a single Ctrl+Z press if results are unexpected
- +Handles case-sensitive and case-insensitive searches via a checkbox option
- −Find & Replace is destructive and irreversible after closing and saving the workbook
- −Cannot perform conditional replacements based on adjacent cell values
- −SUBSTITUTE requires formula knowledge and consumes additional spreadsheet columns
- −SUBSTITUTE is always case-sensitive with no built-in case-insensitivity toggle
- −Deeply nested SUBSTITUTE chains become difficult to read and maintain over time
- −Neither method supports true regex without Microsoft 365 REGEXREPLACE function
Replace Excel Best Practices Checklist
- ✓Always save a backup copy of your workbook before running Replace All on critical data
- ✓Use Find All to preview matches before committing to a bulk replacement operation
- ✓Check the Match Case and Match Entire Cell Contents options to avoid unintended changes
- ✓Limit Replace All scope to a specific selection when working in shared workbooks
- ✓Prefer SUBSTITUTE in formulas when source data may change or refresh dynamically
- ✓Use REPLACE for fixed-position character swaps like masking credit card or ID numbers
- ✓Apply TRIM and CLEAN alongside SUBSTITUTE to handle whitespace and non-printing characters
- ✓Test wildcard patterns on a small sample before applying them workbook-wide
- ✓Document complex SUBSTITUTE chains with cell comments for future maintainability
- ✓Use Power Query for repeatable replacement workflows on data that refreshes regularly
Use the Look In dropdown to target only formulas, not displayed values
Inside the Find & Replace dialog, click Options and change the Look In dropdown from Values to Formulas. This lets you replace cell references, function names, and formula text without touching displayed results. It is the fastest way to convert SUM to AVERAGE across an entire model or update absolute references after restructuring a workbook.
Even experienced Excel users hit frustrating roadblocks with replace operations, and most of the time the cause is a small detail in how Excel interprets the search criteria rather than any genuine bug. The most common complaint is that Find & Replace cannot locate text that is clearly visible on screen. Nine times out of ten, the culprit is hidden whitespace, a non-breaking space character imported from a webpage, or a number formatted to look like text when the underlying value is actually numeric data stored with custom formatting.
The non-breaking space problem deserves special attention because it appears in nearly every dataset copied from web pages, PDFs, or certain enterprise systems. These characters look identical to regular spaces but have a different Unicode value (160 instead of 32). To replace them, type Alt+0160 on the numeric keypad in the Find field, or use SUBSTITUTE(A1, CHAR(160), " ") to convert them programmatically. The TRIM function alone will not remove these because TRIM only handles standard space characters.
Number formatting causes another class of replace failures. If a cell displays "1,234" but stores 1234 internally, searching for the comma will fail because the comma exists only in the display layer. To find or replace formatting characters, you must either modify the cell format directly through Format Cells, or convert the values to actual text using the TEXT function before searching. This distinction between stored value and displayed value is foundational to advanced Excel work.
Date values present similar challenges because Excel stores dates as serial numbers but displays them according to the regional format. Searching for "01/15/2025" will not find a cell that displays that date if the underlying serial number is 45672. To replace dates, work with the underlying serial values or convert to text first. The TEXT function with a format string like TEXT(A1, "mm/dd/yyyy") converts the serial to searchable text without disturbing the original data.
Hidden rows, filtered ranges, and protected sheets introduce another layer of complexity. By default, Find & Replace operates on all cells in scope including hidden ones, which can produce surprising results when you have applied a filter. To restrict replacement to visible cells only, first select the visible range using Alt+; (semicolon), then run Replace with the scope set to selection. This pattern protects filtered-out rows from accidental changes during cleanup operations on large datasets.
Protected worksheets block all replace operations on locked cells without warning, which can be confusing when nothing seems to happen after clicking Replace All. Check whether the sheet is protected by looking at the Review tab, and either unprotect temporarily or work around locked ranges by selecting only unlocked cells before launching the dialog. Shared workbooks and co-authored files have additional restrictions that vary by Excel version and may require switching modes before bulk edits work as expected.
Finally, the dreaded "Excel cannot find the data you are searching for" message often comes down to scope. If you searched within a selection and the target is outside that selection, the message appears even though the text exists in the workbook. Always verify the Within dropdown reads Workbook for the broadest search, and clear any active filters that might mask matching cells from the search algorithm before assuming the data is genuinely missing or corrupted.

While Ctrl+Z undoes Replace All within the same session, this safety net disappears once you close and reopen the file. Always save a backup copy before running large replacements on production data. Cloud-based AutoSave can make this worse by writing destructive changes to the original file before you notice the problem and can intervene.
Professional Excel workflows rely on a handful of replace patterns that appear over and over across industries. Mastering these standard recipes saves enormous time and produces consistent, predictable results regardless of the specific dataset you are working with. The cleanup of imported CSV files alone consumes hours per week in many finance, marketing, and operations roles, and a small library of proven replace techniques cuts that effort dramatically while improving data quality at the same time.
The classic phone number standardization pattern uses nested SUBSTITUTE calls to strip parentheses, dashes, spaces, and dots from raw phone strings before reformatting them consistently. A formula like SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1, "(", ""), ")", ""), "-", ""), " ", "") produces a clean digit-only string ready for reformatting with TEXT or for storage in a database. Variations of this pattern handle email addresses, postal codes, and product identifiers with equal effectiveness across large datasets.
Currency cleanup is another universal task because financial data often arrives with mixed dollar signs, commas, and parentheses around negative values. Combining SUBSTITUTE to remove the symbols with VALUE to convert the result to a true number gives you analyzable figures in a single formula. For example, VALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1, "$", ""), ",", ""), "(", "-")) handles most North American currency formats including accounting-style negative numbers without manual intervention.
The CHAR function deserves a special mention because it lets you replace characters that you cannot easily type, such as line breaks (CHAR(10)), tabs (CHAR(9)), and non-breaking spaces (CHAR(160)). Multi-line cells imported from CRM systems or web forms often contain embedded line breaks that break downstream lookups and pivot tables. SUBSTITUTE(A1, CHAR(10), ", ") converts those line breaks into a comma-separated list ready for analysis or export to other systems.
For repeated cleanup workflows, consider building a custom LAMBDA function in Microsoft 365 that accepts a cell reference and applies your full cleanup chain in one call. Naming this function something like CleanPhone or CleanCurrency in the Name Manager creates reusable transformations that document themselves and survive workbook restructuring. This approach is particularly valuable for teams sharing standardized cleanup logic across multiple reports and dashboards built on the same underlying data feeds.
Power Query users should learn the Replace Values, Trim, Clean, and Split Column transformations because together they handle the vast majority of text cleanup needs without writing a single formula. Power Query also supports replacing values based on conditions through custom columns and the Replace Errors feature, giving you transformation power that approaches dedicated ETL tools. Best of all, every step is recorded and editable, making complex cleanup pipelines maintainable months after the original author has moved on.
Finally, do not overlook the simple but powerful trick of replacing values across multiple sheets simultaneously. By selecting multiple tabs with Ctrl+click before opening Find & Replace, every replacement applies to all selected sheets at once. This grouping technique is invaluable for monthly reporting workbooks where similar structures appear across twelve sheets and updating a label or category name everywhere would otherwise require twelve separate operations and twelve chances to introduce inconsistency.
The final piece of replace mastery is knowing when not to use replace at all. Many cleanup problems look like replace tasks on the surface but actually call for different approaches that produce cleaner, more maintainable results. Lookup tables, conditional formatting, data validation, and Power Query transformations each solve specific problems better than chained SUBSTITUTE formulas, and recognizing which tool fits which job is a hallmark of senior Excel proficiency that separates analysts from data entry operators in any organization.
When you find yourself writing a formula with more than three nested SUBSTITUTE calls, stop and ask whether a lookup table would be cleaner. A two-column reference table with original values on the left and replacement values on the right, queried with VLOOKUP or XLOOKUP, scales infinitely and updates with a single edit rather than requiring formula changes across hundreds of cells. This pattern is especially powerful for category standardization, regional code mapping, and any cleanup that involves more than five distinct find-replace pairs in your workflow.
For one-time data corrections that you never want to repeat, the Paste Special with Operation Multiply trick is faster than any formula. Type the correction factor in an empty cell, copy it, select the range to fix, then Paste Special with Multiply selected to apply the change directly to the values. This technique works for arithmetic corrections like converting cents to dollars or applying a uniform discount, and it leaves no formula residue behind that could confuse future users of the workbook.
Conditional formatting paired with formulas often replaces the need to physically change cell values. If you want certain values to appear differently, applying a custom number format like [Red]0;[Black]0 changes the visual display without altering underlying data. This preserves audit trails, keeps formulas intact, and avoids the irreversibility problem of bulk replacements. Combined with data validation rules that prevent bad values from entering cells in the first place, these tools reduce the ongoing need for cleanup substantially.
For replacing values across hundreds of related workbooks, consider Office Scripts, Power Automate, or VBA macros that automate the process. Recording a macro of your manual replace operations is often the fastest path to automation, and the resulting code can be tweaked to handle file lists, error logging, and conditional logic that exceeds the capabilities of any built-in feature. Modern Office Scripts work in Excel for the Web and integrate cleanly with Power Automate for fully unattended processing of recurring data feeds.
Practice makes these patterns second nature, and the best way to internalize replace techniques is to work through realistic exercises that mirror the kinds of cleanup tasks you face in your actual job. Take a messy CSV file, time yourself cleaning it manually, then redo the same task using SUBSTITUTE formulas, then Power Query, and compare the time, accuracy, and maintainability of each approach. This kind of deliberate practice builds the intuition needed to choose the right tool instantly when deadlines are tight.
Finally, document the cleanup logic for any workbook that runs more than once. A simple instructions sheet listing the data sources, the cleanup steps applied, and any known data quality issues saves enormous time when someone else inherits the file or when you return to it months later. Replace operations applied without documentation become invisible technical debt that compounds over time, and a few minutes of documentation today prevents hours of confusion in the future when business conditions or source systems inevitably change.
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.