Open Find and Replace, then type what to search for
To find and replace text in Google Sheets, use the keyboard shortcut Ctrl+H (Windows) or Cmd+H (Mac). A dialog box will open with two fields: "Find" and "Replace with". Type the text you want to search for in the "Find" field first.
Google Sheets will search your entire spreadsheet by default, including all sheets in the file. If you want to limit the search to only the sheet you are currently viewing, you can change that setting after you open the dialog — look for "All sheets" in the options and uncheck it.
Key Takeaways
- Use Ctrl+H (Windows) or Cmd+H (Mac) to open the Find and Replace dialog in any Google Sheets file.
- Type the text you want to find in the "Find" field and the replacement text in the "Replace with" field, then click "Replace all" to change every instance at once.
- Check the "Match entire cell contents" box if you want to replace only cells that contain exactly that text and nothing else.
- Use "Replace" one at a time to review each change before it happens, or use "Replace all" if you are confident the search term is specific enough.
- You can search using regular expressions (a pattern language) by checking the "Match using regular expressions" box, which lets you find things like "any number" or "text at the start of a cell".
Type the replacement text and choose your options
In the "Replace with" field, type the text you want to use instead. Leave this field blank if you want to delete the text you found. Below these two fields, you will see checkboxes for "Match entire cell contents", "Match case", and "Match using regular expressions" — each one changes how Google Sheets interprets your search.
Match entire cell contents means the cell must contain only the text you typed, with nothing before or after it. For example, if you search for "apple" with this box checked, it will find a cell that says "apple" but not a cell that says "apple pie". This is useful when you want to avoid accidentally replacing part of a longer word.
Match case means uppercase and lowercase letters must match exactly. If you search for "Apple" with this box checked, it will not find "apple" or "APPLE". Leave it unchecked if you want to find the text regardless of capitalization.
Replace one at a time or replace all at once
Once you have entered your search term and replacement text, you have two choices. Click "Replace" to change only the first instance Google Sheets finds, then review it before moving to the next one. This is slower but safer if you are not completely sure your search term is specific enough.
Click "Replace all" to change every instance in the spreadsheet (or in the current sheet, depending on your settings) without stopping to show you each one. Google Sheets will tell you how many replacements it made at the bottom of the dialog. Use this when you are confident — for example, replacing a misspelled company name throughout a large file.
If you make a mistake, press Ctrl+Z (Windows) or Cmd+Z (Mac) when ready to undo all the replacements at once.
Search across multiple sheets or just the current one
By default, Google Sheets searches every sheet in your file. If your spreadsheet has many sheets and you only want to search one, uncheck the "All sheets" box before you click Replace or Replace all. The search will then only look at the sheet you are currently viewing.
This is especially useful if you have a template sheet you do not want to change, or if you are working with a file where different sheets have different purposes and you only want to replace text in one of them.
Use regular expressions to find patterns instead of exact text
If you check the "Match using regular expressions" box, you can search for patterns instead of exact words. A regular expression is a code-like way to describe what you are looking for. For example, the pattern ^apple finds "apple" only when it appears at the start of a cell, and apple$ finds it only at the end.
The pattern .* means "any character, any number of times", so you can use it to find and replace entire cell contents while keeping part of the text. For example, if you search for ^(.*)apple$ and replace with $1orange, it will find cells ending in "apple" and replace just that word with "orange", keeping everything before it.
Regular expressions take practice, but they are powerful for finding things like phone numbers, dates, or any text that follows a pattern. Google Sheets has documentation on regular expressions if you want to learn more patterns.
Common mistakes and how to avoid them
The most common mistake is forgetting to check "Match entire cell contents" when you want to replace a whole cell. If you search for "Q1" without checking this box, it will also replace "Q1" inside cells that say "Q1 Results" or "Q1-2024", which you probably did not intend. Always check this box if you are replacing a short term that might appear inside longer text.
Another mistake is using "Replace all" when you meant to use "Replace" to check the first result. If you do this and realize the search term was too broad, undo when ready with Ctrl+Z or Cmd+Z. Google Sheets will undo all replacements at once, not just the last one.
Be careful with spaces. If you search for "apple " (with a space after it) but your cells say "apple" (no space), the search will find nothing. If you are not sure whether there are extra spaces, leave them out of your search term, or use regular expressions to match any number of spaces.
Replace text in formulas and cell values
By default, Find and Replace searches both the text you see in cells and the formulas behind them. If a cell contains the formula =A1+B1 and you search for "A1", it will find and replace that reference inside the formula. This is usually what you want, but be careful — replacing a cell reference in a formula can break your calculations.
If you only want to replace text that appears as a value (not inside formulas), you will need to manually review each result using the "Replace" button instead of "Replace all". There is no checkbox to exclude formulas, so this is the safest approach when you are working with a spreadsheet that has many formulas.
Frequently Asked Questions
Can I undo a replace all if I made a mistake?
Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) when ready after the replacement. Google Sheets will undo all the replacements at once, not just the last one. If you have made other changes since the replacement, you may need to press undo multiple times to get back to the state before the replacement.
What does "match using regular expressions" do?
It lets you search for patterns instead of exact text. For example, [0-9] finds any single digit, and ^ means the start of a cell. This is useful for finding phone numbers, dates, or any text that follows a consistent pattern, but it requires learning the pattern language.
Will find and replace search inside merged cells?
Yes, Google Sheets will search merged cells the same way it searches regular cells. The search looks at the text content, not the cell structure, so merging does not affect whether a match is found.
Can I search for a line break or special character?
You can search for a line break by typing Ctrl+Enter (Windows) or Cmd+Enter (Mac) in the Find field. For other special characters like tabs, use regular expressions: \t for a tab and \n for a line break. You must have "Match using regular expressions" checked for these to work.
Does find and replace work the same way in Google Sheets as in Excel?
The basic steps are the same — open the dialog, type your search and replacement text, and click Replace or Replace all. However, Google Sheets does not have all the advanced options Excel has, such as searching by cell format or searching in comments. For most text replacements, the process is nearly identical.