Open Find and Replace, then type what you're looking for
To find and replace text in Google Sheets, press Ctrl+H on Windows or Command+H on Mac. A box will open with two fields: "Find" and "Replace with". Type the text you want to find in the first field, then type what you want to replace it with in the second field. Google Sheets will show you how many matches it found before you make any changes.
The Find and Replace box stays open so you can search for multiple things in the same sheet without closing and reopening it each time. You can also use Ctrl+F (or Command+F on Mac) if you only want to find text without replacing it — this opens a simpler search box that doesn't have a replace field.
Key Takeaways
- Press Ctrl+H (or Command+H on Mac) to open Find and Replace in any Google Sheet.
- Google Sheets shows you the number of matches before you replace anything, so you can catch mistakes before they happen.
- Use the "Match entire cell contents" option when you want to replace only cells that contain exactly what you typed, not cells that contain it as part of something else.
- The "Search all sheets" checkbox lets you find and replace across every sheet in your workbook at once, not just the one you're viewing.
- You can undo a replace operation with Ctrl+Z if you change your mind when ready after.
Choose whether to search one sheet or all sheets at once
By default, Google Sheets searches only the sheet you're currently viewing. If you want to search across every sheet in your workbook, check the box labeled "Search all sheets" before you click Replace. This is useful when you have data spread across multiple tabs and need to make the same change everywhere.
If you leave "Search all sheets" unchecked, the search stays on your current sheet only. Google Sheets will tell you which sheet each match is on if you're searching all sheets, so you can see where the replacements happened.
Use "Match entire cell contents" to avoid partial matches
By default, Google Sheets finds text even when it's part of a larger word or phrase. For example, if you search for "cat", it will find "cat", "catalog", and "concatenate". If you only want to replace cells that contain exactly "cat" and nothing else, check the box labeled "Match entire cell contents".
This option is especially useful when you're working with codes, IDs, or short values where a partial match could change something you didn't intend to change. For instance, if you're replacing product codes, matching entire cell contents prevents the code "A1" from matching inside "A1B2C3".
Use regular expressions for complex patterns
If you need to find text that follows a pattern rather than an exact phrase, you can use regular expressions. Check the box labeled "Match using regular expressions" to turn this on. Regular expressions use special characters to describe patterns — for example, ^[0-9]+$ matches any cell containing only numbers, and .*@.* matches any cell containing an email address.
Regular expressions are powerful but take practice to write correctly. Common patterns include ^ (start of cell), $ (end of cell), . (any character), + (one or more), and * (zero or more). If you're new to regular expressions, start with straightforward patterns and test them on a copy of your sheet first.
Make case-sensitive searches when capitals matter
Google Sheets ignores uppercase and lowercase letters by default. If you search for "smith", it will find "Smith", "SMITH", and "smith". When you need to distinguish between them — for example, if "smith" is a common noun and "Smith" is a proper name — check the box labeled "Match case".
This option is rarely needed in everyday spreadsheet work, but it's essential when you're working with data where capitalization carries meaning, such as chemical formulas, programming code, or brand names that use specific capitalization.
Replace one match at a time or all at once
After you type your search term and replacement, Google Sheets shows you the number of matches it found. You have two choices: click "Replace all" to change every match at once, or click "Replace" to change only the first match, then decide what to do with the next one.
Replacing one at a time is slower but safer — you can see each match in context and decide whether it's really the one you want to change. Replacing all is faster when you're confident the search term will only match what you intend to replace. After you click Replace or Replace all, Google Sheets tells you how many replacements it made. You can undo the entire operation with Ctrl+Z if you change your mind when ready.
Search for empty cells or cells with specific content
You can search for cells that are completely empty by leaving the "Find" field blank and typing something in the "Replace with" field, then clicking Replace all. This fills every empty cell with whatever you typed. The reverse works too: leave "Replace with" blank and type something in "Find", then Replace all will delete that text from every cell.
To find cells that contain nothing but spaces, search for ^ +$ with "Match using regular expressions" turned on. This finds cells with only whitespace, which can be invisible but cause problems when you're sorting or filtering data.
Frequently Asked Questions
Can I undo a find and replace if I made a mistake?
Yes. Press Ctrl+Z (or Command+Z on Mac) when ready after the replacement to undo it. This works even if you replaced all matches at once. If you've made other changes since the replacement, undo will reverse those too, so work carefully.
What's the difference between "Match entire cell contents" and "Match using regular expressions"?
"Match entire cell contents" is simpler — it just means the cell must contain exactly what you typed, nothing more. Regular expressions let you describe patterns, like "any number" or "anything ending in .com". You can use both at the same time.
Will find and replace work on formulas or only on values?
Find and replace searches the actual content of cells, including formulas. If you search for "A1", it will find cells containing the value A1 and also cells with formulas that reference A1. Be careful when replacing inside formulas — you can break them accidentally.
Can I search for a line break or special character?
Yes, but you need regular expressions turned on. Search for \n to find line breaks (created by pressing Ctrl+Enter in a cell). For other special characters, use their regular expression codes — for example, \t for tabs. If you're unsure of the code, search online for "regex [character name]".
Does find and replace work the same way in Google Sheets as in Excel?
The basics are the same — Ctrl+H opens the dialog, you type what to find and what to replace it with. Google Sheets has fewer options than Excel (no "Replace Format" button, for example), but the core search and replace features work nearly identically.