Bird
Raised Fist0
Google Sheetsspreadsheet~10 mins

Find and replace in Google Sheets - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the formula to replace all occurrences of "apple" with "orange" in cell A1.

Google Sheets
=SUBSTITUTE(A1, [1], "orange")
Drag options to blanks, or click blank then click option'
A"apple"
B"orange"
CA1
D"fruit"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the replacement text instead of the text to find.
Not using quotes around the text to find.
2fill in blank
medium

Complete the formula to replace only the first occurrence of "cat" with "dog" in cell B2.

Google Sheets
=SUBSTITUTE(B2, "cat", [1], 1)
Drag options to blanks, or click blank then click option'
A1
B"doggy"
C"dog"
D"cat"
Attempts:
3 left
💡 Hint
Common Mistakes
Replacing with the wrong text.
Confusing the position argument with the replacement text.
3fill in blank
hard

Fix the error in the formula to replace "blue" with "red" in cell C3.

Google Sheets
=SUBSTITUTE(C3, [1], "red")
Drag options to blanks, or click blank then click option'
A"blue"
Bblue
CC3
Dred
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the text to find.
Using a cell reference instead of text.
4fill in blank
hard

Fill both blanks to replace only the second occurrence of "cat" with "dog" in cell D4.

Google Sheets
=SUBSTITUTE(D4, [1], [2], 2)
Drag options to blanks, or click blank then click option'
A"cat"
B"dog"
C"doggy"
D"catty"
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the find and replace texts.
Using incorrect quotes or missing them.
5fill in blank
hard

Fill all three blanks to replace "red" with "green" in cell E5, but only for the third occurrence.

Google Sheets
=SUBSTITUTE(E5, [1], [2], [3])
Drag options to blanks, or click blank then click option'
A"red"
B"green"
C3
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Not putting text values in quotes.
Using the wrong occurrence number.

Practice

(1/5)
1. What does the Find and replace tool in Google Sheets do?
easy
A. It deletes all cells containing the searched text.
B. It creates a new sheet with replaced data automatically.
C. It searches for specific text and replaces it with new text in the sheet.
D. It formats cells based on the searched text.

Solution

  1. Step 1: Understand the purpose of Find and Replace

    The tool is designed to locate specific text or values in the sheet and replace them with new text or values.
  2. Step 2: Compare options with the tool's function

    Only It searches for specific text and replaces it with new text in the sheet. correctly describes this function. Options B, C, and D describe actions not performed by Find and Replace.
  3. Final Answer:

    It searches for specific text and replaces it with new text in the sheet. -> Option C
  4. Quick Check:

    Find and Replace = Search and update text [OK]
Hint: Find and Replace changes text quickly without formulas [OK]
Common Mistakes:
  • Thinking it creates new sheets automatically
  • Confusing replace with delete
  • Assuming it formats cells
2. Which of these is the correct way to open the Find and Replace tool in Google Sheets?
easy
A. Go to Edit menu and select 'Find and replace'.
B. Use the formula =FINDREPLACE() in a cell.
C. Right-click any cell and choose 'Find and replace'.
D. Press Ctrl + F and then click 'Replace' in the small search box.

Solution

  1. Step 1: Recall how to access Find and Replace

    The Find and Replace tool is accessed from the Edit menu by selecting 'Find and replace'.
  2. Step 2: Evaluate each option

    Press Ctrl + F and then click 'Replace' in the small search box. opens the simple Find box, not the full Find and Replace tool. Right-click any cell and choose 'Find and replace'. is incorrect because right-click does not show this option. Use the formula =FINDREPLACE() in a cell. is invalid because no such formula exists.
  3. Final Answer:

    Go to Edit menu and select 'Find and replace'. -> Option A
  4. Quick Check:

    Edit > Find and replace = Open tool [OK]
Hint: Use Edit menu for full Find and Replace tool [OK]
Common Mistakes:
  • Using Ctrl+F only opens simple search
  • Expecting right-click menu to have Find and Replace
  • Trying to use a formula for Find and Replace
3. You have a sheet with the word 'apple' in cells A1, A2, and A3. You use Find and Replace to replace 'apple' with 'orange' and check 'Match case'. If cell A1 has 'Apple' (capital A), which cells will be changed?
medium
A. All A1, A2, and A3 will change to 'orange'.
B. Only A2 and A3 will change to 'orange'.
C. Only A1 will change to 'orange'.
D. No cells will change.

Solution

  1. Step 1: Understand 'Match case' option effect

    When 'Match case' is checked, the search is case-sensitive. So 'apple' will not match 'Apple'.
  2. Step 2: Identify which cells match exactly

    Cells A2 and A3 contain 'apple' exactly, so they will be replaced. A1 has 'Apple' with capital A, so it won't change.
  3. Final Answer:

    Only A2 and A3 will change to 'orange'. -> Option B
  4. Quick Check:

    Match case = case-sensitive replace [OK]
Hint: Match case means exact letter case must match [OK]
Common Mistakes:
  • Ignoring case sensitivity and replacing all
  • Assuming 'Apple' matches 'apple' with Match case on
  • Replacing no cells by mistake
4. You tried to replace 'cat' with 'dog' but nothing changed. You had 'Cat' in your cells. What is the most likely reason?
medium
A. You had 'Match case' checked, so 'cat' did not match 'Cat'.
B. You forgot to click 'Replace all'.
C. You searched in formulas only, but 'Cat' was in values.
D. You used regular expressions incorrectly.

Solution

  1. Step 1: Analyze the case difference

    The searched text was 'cat' lowercase, but cells had 'Cat' with uppercase C.
  2. Step 2: Understand effect of 'Match case'

    If 'Match case' was checked, the search is case-sensitive, so 'cat' won't match 'Cat'. This explains why no replacements happened.
  3. Final Answer:

    You had 'Match case' checked, so 'cat' did not match 'Cat'. -> Option A
  4. Quick Check:

    Match case blocks case mismatches [OK]
Hint: Check 'Match case' if replacements don't happen [OK]
Common Mistakes:
  • Assuming Replace all was not clicked
  • Confusing formulas vs values search
  • Misusing regular expressions without need
5. You want to replace all phone numbers in the format (123) 456-7890 with 123-456-7890 using Find and Replace. Which option should you enable to do this efficiently?
hard
A. Enable 'Match case' and find '(123) 456-7890' exactly.
B. Use formulas to manually edit each phone number.
C. Use simple find '(123) 456-7890' and replace with '123-456-7890'.
D. Enable 'Search using regular expressions' and use \((\d{3})\) (\d{3})-(\d{4}) as find and $1-$2-$3 as replace.

Solution

  1. Step 1: Understand the need for pattern matching

    Phone numbers vary, so to replace all in that format, regular expressions help match the pattern.
  2. Step 2: Use regular expressions in Find and Replace

    Enabling 'Search using regular expressions' allows using patterns like \((\d{3})\) (\d{3})-(\d{4}) to find numbers and $1-$2-$3 to reformat them.
  3. Final Answer:

    Enable 'Search using regular expressions' and use \((\d{3})\) (\d{3})-(\d{4}) as find and $1-$2-$3 as replace. -> Option D
  4. Quick Check:

    Regex option = pattern replace [OK]
Hint: Use regex for pattern-based replacements [OK]
Common Mistakes:
  • Not enabling regex for pattern matching
  • Using exact text find for varying numbers
  • Trying manual edits instead of Find and Replace
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard