Find and replace shortcut in Excel
The keys
| Shortcut | Windows | Mac |
|---|---|---|
| FindOn a Mac, Cmd+F jumps to the search box instead of opening the Find dialog. | Ctrl+FWeb Ctrl+F or Shift+F3 | Control+F or Shift+F5 |
| Find and replace | Ctrl+H | Control+H or Command+Shift+H |
| Search the sheet from the search boxWindows uses Ctrl+F and the Find dialog. | —No Windows shortcut in Microsoft's list | Command+F |
Checked against Microsoft's official lists on . Where Microsoft lists a key for one platform only, the other column says so instead of guessing.
Options that change the result
- Within: Sheet searches the active sheet only. Choose Workbook to search every sheet.
- Look in: Formulas finds what is typed in the cell; Values finds what it shows. A formula result can only be found with Values.
- Match entire cell contents: without it, finding 10 also finds 100 and 2010.
- Match case: makes Find case-sensitive.
Wildcards and special characters
* stands for any characters and ? for one character, so "A*" finds everything starting with A. To find a real asterisk or question mark, put a tilde in front: ~* or ~?.
To find line breaks, click in Find what and press Ctrl+J. Replacing them with a space joins two-line cells into one line.
When Find does not find it
- Look in is set to Formulas but you are searching for a displayed value, such as a total or a formatted date. Switch to Values.
- The text has extra spaces or a non-breaking space from a web page. Search for part of the word, or clean the data with TRIM.
- Only part of the sheet is searched: you had a range selected. Click one cell first to search the whole sheet.
- An option from your last search is still on. Click Options and check Match case and Match entire cell contents.
Why a shortcut sometimes does nothing
Excel for the web: the browser takes some keys
In a browser, a few keys belong to the browser first: F1 opens the browser's help, Ctrl+O opens a file, Ctrl+W closes the tab, and F6 moves around the browser. Excel for the web uses Ctrl+F6 instead of F6, Ctrl+Alt+Page Down for the next sheet in Chrome, and Alt+Windows key with a letter for ribbon tabs. To get desktop behavior back, go to Help > Keyboard Shortcuts and select Override browser shortcuts. If the file opened in Viewing mode, editing shortcuts do nothing until you switch to Editing.
Related shortcuts
| Shortcut | Windows | Mac |
|---|---|---|
| Repeat the last Find, downwardMicrosoft lists this for Excel for the web only. | —No Windows shortcut in Microsoft's listWeb Shift+F4 | —No Mac shortcut in Microsoft's list |
| Go to a cell or range (Go To) How to: Shortcut to select visible cells only in Excel Type a reference such as B14 or a range name, then press Enter. | Ctrl+G or F5 | Control+G or F5 |
| Select only the visible cells How to: Shortcut to select visible cells only in Excel Windows: press F5 (or Ctrl+G), choose Special, then Visible cells only. | —No Windows shortcut in Microsoft's list | Shift+Command+* |
FAQ
What is the shortcut for find and replace in Excel?
Ctrl+H on Windows and the web. On a Mac, Ctrl+H or Cmd+Shift+H.
What does Cmd+F do in Excel for Mac?
It moves to the search box in the toolbar. Ctrl+F or Shift+F5 opens the Find dialog with all its options.
How do I find the next match?
Press Enter, or Find Next, while the dialog is open. In Excel for the web, Shift+F4 repeats the last find downward and Ctrl+Shift+F4 upward.
Can I replace with a formula instead?
Yes, SUBSTITUTE replaces text inside a formula, which keeps the original data intact.
Related guides
- How to replace text in Excel with a formulaUse =SUBSTITUTE(A2,"old","new").
- How to remove spaces in Excel (extra or all spaces)Use =TRIM(A2) to remove leading and trailing spaces and shrink double spaces between words to one.
- How to remove line breaks in Excel cellsUse =SUBSTITUTE(B2,CHAR(10),", ") to swap each line break for a comma and space, or wrap it in TRIM with a space instead: =TRIM(SUBSTITUTE(B2,CHAR(10)," ")).
- How to remove characters from a cell in ExcelTo remove a specific character, use =SUBSTITUTE(A2,"-","") to replace it with nothing.
Related functions
In the glossary: WildcardNon-breaking space