Find and Replace in Excel: Shortcuts, Wildcards and Options – LicenceHouse guide

To find and replace in Excel, press Ctrl+H (or go to Home > Editing > Find & Select > Replace). Type the text in Find what, the new text in Replace with, and select Replace All. Press Ctrl+F to search without changing anything. Select Options to match case, search the whole workbook or replace formats.

Task Windows Mac
Open Find Ctrl+F Cmd+F (Search bar) or Control+F
Open Replace Ctrl+H Control+H
Find next match Shift+F4 Return in the Search bar
Any single character ?
Any number of characters *
A literal ? * or ~ ~? ~* ~~

How do I find and replace in Excel?

Open the Replace tab with Ctrl+H, enter what to look for and what to put instead, then replace one match at a time or all at once.

Five steps to find and replace in Excel: Ctrl+H, fill in Find what and Replace with, use Find Next or Replace All, Ctrl+Z to undo.

  1. Press Ctrl+H. The Find and Replace dialog opens on the Replace tab.
  2. In Find what, type the text or number, for example Office 2021.
  3. In Replace with, type the new value, for example Office 2024. Leave it blank to delete the text.
  4. Select Find Next to check the first match, then Replace to change just that one, or select Replace All.
  5. Excel tells you how many replacements it made. Press Ctrl+Z if the result isn't what you wanted.

Microsoft's guide to how to find or replace text and numbers on a worksheet describes every option in the dialog. The most useful ones are described below.

How do I search in an Excel spreadsheet?

To search in an Excel spreadsheet, press Ctrl+F, type the text and select Find Next to jump to each match. Select Find All to list every match with its sheet, cell, value and formula. Click a result to go to that cell. Press Ctrl+A inside the results list to select every matching cell at once, which is a quick way to colour or format them all together.

Select Options >> to refine the search:

  • Within: Sheet or Workbook. Choose Workbook to search every sheet in the file.
  • Search: By Rows (the default) or By Columns.
  • Look in: Formulas, Values, Notes or Comments. Only Formulas is available on the Replace tab.
  • Match case: treat "SALES" and "sales" as different.
  • Match entire cell contents: find cells that contain only the search text, not cells where it's part of a longer entry.

What we commonly see: Find says "We couldn't find what you were looking for" even though the number is on screen. The cell shows a formatted result, such as 1,250.00, but Look in is set to Formulas and the cell contains =B2*C2. Switch Look in to Values, and search for the number without the thousands separator. Also check that Match entire cell contents isn't ticked from an earlier search, because Excel remembers the last settings.

How do I find and replace within a selection in Excel?

Select the range first, then press Ctrl+H. When more than one cell is selected, Find and Replace only looks inside that selection. This is the safest way to replace a code in one column without touching matching text elsewhere on the sheet.

  1. Click the column letter, or drag over the cells you want to change, such as C2:C500.
  2. Press Ctrl+H, enter the values and select Replace All.
  3. Only cells inside the selection change.

If only a single cell is selected, Excel searches the whole sheet (or workbook, if Within is set to Workbook). To work on several whole sheets at once, group them by Ctrl+clicking their tabs, then use Replace All. Remember to ungroup afterwards.

How do I use wildcards in Find and Replace?

Excel supports three wildcards, which Microsoft lists in its page on wildcard characters in searches: ? for one character, * for any number of characters, and ~ to search for a real question mark, asterisk or tilde.

Excel wildcards: sm?th matches smith and smyth, *-UK matches codes ending -UK, (*) matches bracketed text, ~* finds an asterisk.

Find what Matches Doesn't match
sm?th smith, smyth smooth
*-UK ORD1001-UK, ABC-UK ORD1001-US
(*) Any text in brackets, including the brackets Text without brackets
~* A literal asterisk Other characters

Wildcard find and replace in Excel is great for clean-up jobs. To strip bracketed notes such as "Laptop (refurb)", put (*) in Find what, leave Replace with empty and select Replace All. To delete everything after a dash in a code, use -*. Test with Find All first so you can see exactly which cells will change.

Advanced nuance: the asterisk is greedy. (*) on "Pro (UK) Key (new)" matches from the first opening bracket to the last closing one, so it removes "(UK) Key (new)" and leaves "Pro ". When a cell can contain several bracketed parts, the dialog can't target just the first one. Use a formula instead, such as TEXTBEFORE in Excel 2024 and Microsoft 365, or the LEFT/FIND approach in our guide to splitting cells in Excel.

Can I find and replace formats in Excel?

Yes. Select Options in the Replace tab, then the Format button next to Find what and Replace with. For example, find every cell with a yellow fill and replace it with no fill and bold text. Leave both boxes empty to match on format alone. Use Format > Choose Format From Cell to pick up a format by clicking a sample cell. Select Clear Find Format afterwards, or the next search will silently filter by that format.

What is the Find and Replace function in Excel formulas?

For a formula-based find and replace function in Excel, use SUBSTITUTE or REPLACE. These leave the original data untouched and put the result in a new column.

Formula alternatives to Find and Replace: SUBSTITUTE to swap 2021 for 2024, remove dashes or the first space, REPLACE for 3 characters.

=SUBSTITUTE(A2,"2021","2024")       replace text wherever it appears
=SUBSTITUTE(A2,"-","")              remove every dash
=SUBSTITUTE(A2," ","",1)            remove only the first space
=REPLACE(A2,1,3,"ORD")              replace the first 3 characters

SUBSTITUTE is case-sensitive and doesn't use wildcards. Our guide to removing spaces and dashes shows more clean-up formulas. Find and Replace can also rewrite formulas themselves. For instance, replace Sheet1! with Archive! to repoint every reference at another sheet. It's quicker than editing cells one by one, but check the results carefully.

How do I turn off Research in Excel?

In many versions, the Research pane opens when you hold Alt and click a cell, or when the Alt key is stuck. Close it with the X at the top of the pane. If it keeps reappearing, you can disable it for the current session with a line of VBA:

  1. Press Alt+F11 to open the Visual Basic Editor.
  2. Press Ctrl+G to open the Immediate window.
  3. Type Application.CommandBars("Research").Enabled = False and press Enter.
  4. Close the editor.

Users on Microsoft's forum report that the setting may reset when Excel restarts, so you may need to run it again or put it in a startup macro. Our guide to what a macro is in Excel explains how to store one. If Alt-related problems affect other shortcuts too, check the keyboard, as covered in our guide to arrow keys not working in Excel.

Does Find and Replace differ between versions?

The dialog is the same in Excel 2016, 2019, 2021, 2024 and Microsoft 365 on Windows. On a Mac, the Search box at the top of the window (Cmd+F) finds matches quickly, and its Advanced option opens the full dialog. Microsoft 365 adds no new wildcards, but it does add REGEX functions for complex pattern replacements. Those are Microsoft 365 only, as our comparison of Excel 2024 and Excel 365 explains.

Frequently asked questions

Why is Find and Replace not finding anything?

Check the Options settings first. Within may be set to the wrong scope, Look in may be set to Formulas when you need Values, or Match entire cell contents or Match case may still be ticked. A leftover format in the Format button also limits results. Finally, if a range is selected, Excel only searches that range.

Can I undo Replace All in Excel?

Yes, press Ctrl+Z straight away to undo the whole Replace All in one step. Undo history is lost when you close the workbook, though, and running a macro can also clear it. For large replacements, save a copy first or run Find All beforehand to review the exact cells that will change.

How do I replace a line break in Excel?

In Find what, press Ctrl+J. Nothing visible appears, but the box now contains a line break character. Type a space or comma in Replace with and select Replace All to turn multi-line cells into single lines. Our guide to starting a new line in a cell explains where those breaks come from.

How do I find and replace an asterisk in Excel?

Type a tilde before it: ~* in Find what finds a real asterisk rather than treating it as a wildcard. The same works for ~? and ~~. Without the tilde, searching for * matches every non-empty cell, and Replace All would overwrite all of them.

Can I search across multiple workbooks?

Not with the built-in dialog. Find and Replace works within one workbook at a time, though the Workbook option covers every sheet in it. To search several files, open each one and search in turn, or use a macro that loops through the files in a folder.

Related guides

Links in this guide

Link Type Why it helps
Microsoft Support: Find or replace text and numbers External Every option in the Find and Replace dialog
Microsoft Support: Wildcard characters in searches External Official wildcard reference
Split a cell in Excel Internal Formula alternatives to greedy wildcards
Remove spaces and dashes Internal More SUBSTITUTE clean-up formulas
What is a macro in Excel Internal Store the Research fix in a macro
Arrow keys not working in Excel Internal Keyboard problems that cause odd behaviour
Excel 2024 vs Excel 365 Internal Which versions have REGEX functions
Excel keyboard shortcuts Internal More time-saving shortcuts
New line in an Excel cell Internal Where line breaks come from
Remove duplicates in Excel Internal Next step after cleaning data
Find and break external links Internal Find hidden references to other files
Excel, Excel formulas, Excel tips, How-to