Challenge - 5 Problems
Find and Replace Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate2:00remaining
Find and replace text in a cell
You have a cell A1 with the text
"I love apples and apples are tasty". Which formula replaces all occurrences of "apples" with "oranges"?Attempts:
2 left
💡 Hint
Use a function that replaces all occurrences of a substring.
✗ Incorrect
SUBSTITUTE replaces all occurrences of a substring by default. REPLACE replaces by position and length, so option D replaces only the first occurrence. REGEXREPLACE also works but is more complex. Option D replaces the first 6 characters regardless of content.
📊 Formula Result
intermediate2:00remaining
Replace only the second occurrence of a word
Cell A1 contains
"red blue red blue red". Which formula replaces only the second "red" with "green"?Attempts:
2 left
💡 Hint
SUBSTITUTE has an optional fourth argument to specify which occurrence to replace.
✗ Incorrect
Option C uses SUBSTITUTE with the occurrence number 2, so only the second 'red' is replaced. Option C replaces all occurrences. Option C is invalid because REGEXREPLACE does not take an occurrence argument. Option C replaces by position but requires a hardcoded length (3 for 'red').
❓ Function Choice
advanced2:00remaining
Choose the best function to replace text ignoring case
You want to replace all occurrences of
"cat" with "dog" in cell A1, ignoring case (so "Cat", "CAT", "cat" all replaced). Which function should you use?Attempts:
2 left
💡 Hint
Use a function that supports case-insensitive matching.
✗ Incorrect
REGEXREPLACE with the (?i) flag makes the search case-insensitive, replacing all case variants. SUBSTITUTE is case-sensitive. Option A replaces only the first exact match and is case-sensitive. Option A converts all text to lowercase, replaces, but loses original case formatting.
❓ data_analysis
advanced2:00remaining
Count how many times a word appears before replacing
Cell A1 contains
"apple banana apple orange apple banana". Which formula counts how many times "apple" appears?Attempts:
2 left
💡 Hint
Count by comparing length before and after removing the word.
✗ Incorrect
Option A calculates the difference in length before and after removing 'apple', then divides by length of 'apple' to get count. COUNTIF does not work on text inside a single cell. Option A sums a single number incorrectly. Option A mixes lengths of arrays and strings incorrectly.
🎯 Scenario
expert3:00remaining
Replace multiple different words in one formula
You want to replace
"cat" with "dog" and "mouse" with "rat" in cell A1 in one formula. Which formula does this correctly?Attempts:
2 left
💡 Hint
Try nesting SUBSTITUTE functions for multiple replacements.
✗ Incorrect
Option B nests SUBSTITUTE calls to replace both words correctly. Option B tries to use an array in REGEXREPLACE which is invalid. Option B uses ARRAYFORMULA incorrectly with SUBSTITUTE. Option B replaces by position but only first occurrences and lengths are hardcoded, so it may fail if order changes.