Bird
Raised Fist0
Excelspreadsheet~20 mins

Find and replace in Excel - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Find and Replace Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🎯 Scenario
intermediate
2:00remaining
Replace all occurrences of 'apple' with 'orange' in a column

You have a list of fruits in column A from A1 to A10. You want to replace every cell that contains the word 'apple' with 'orange'. Which method will do this correctly?

ASelect column A, press Ctrl+H, type 'apple' in Find what and 'orange' in Replace with, then Replace All.
BSelect column A, press Ctrl+H, type 'orange' in Find what and 'apple' in Replace with, then Replace All.
CUse Find (Ctrl+F), type 'apple', then Replace All with 'orange'.
DSelect column A, press Ctrl+F, type 'orange', then Replace All with 'apple'.
Attempts:
2 left
💡 Hint

Remember, 'Find what' is the text you want to change, and 'Replace with' is the new text.

📊 Formula Result
intermediate
2:00remaining
Result of SUBSTITUTE function replacing text

What is the result of this formula in cell B1 if A1 contains 'banana apple banana'?

=SUBSTITUTE(A1, "banana", "orange", 2)
Aorange apple banana
Bbanana apple orange
Corange apple orange
Dbanana apple banana
Attempts:
2 left
💡 Hint

The 4th argument in SUBSTITUTE tells which occurrence to replace.

Function Choice
advanced
2:00remaining
Choose the function to replace text ignoring case

You want to replace all occurrences of 'cat' with 'dog' in a text string, but the text may have 'Cat', 'CAT', or 'cat'. Which function will replace all regardless of case?

ASUBSTITUTE(text, "cat", "dog")
BREPLACE(text, FIND("cat", text), 3, "dog")
CUse a combination of LOWER and SUBSTITUTE to replace 'cat' in lowercase text
DUse Find and Replace tool with Match case unchecked
Attempts:
2 left
💡 Hint

Excel's SUBSTITUTE is case-sensitive.

data_analysis
advanced
2:00remaining
Count how many cells contain replaced text

You replaced 'old' with 'new' in a range B1:B20. Now you want to count how many cells contain the word 'new'. Which formula gives the correct count?

A=COUNTIF(B1:B20, "=new")
B=COUNTIF(B1:B20, "new")
C=COUNTIF(B1:B20, "*new*")
D=COUNT(B1:B20)
Attempts:
2 left
💡 Hint

Use wildcards to find text inside cells.

📊 Formula Result
expert
3:00remaining
Output of nested SUBSTITUTE replacing multiple words

Given cell A1 contains 'red blue green blue red', what is the result of this formula?

=SUBSTITUTE(SUBSTITUTE(A1, "blue", "yellow"), "red", "orange")
Aorange yellow green yellow orange
Bred yellow green yellow red
Corange blue green blue orange
Dyellow orange green orange yellow
Attempts:
2 left
💡 Hint

SUBSTITUTE inside another SUBSTITUTE replaces text step by step.

Practice

(1/5)
1. What does the Find and Replace feature in Excel primarily help you do?
easy
A. Quickly update many cells by changing specific text or values
B. Create new formulas automatically
C. Sort data alphabetically
D. Protect cells from editing

Solution

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

    Find and Replace is used to locate specific text or values and change them across many cells quickly.
  2. Step 2: Compare with other options

    Creating formulas, sorting data, or protecting cells are different Excel features unrelated to Find and Replace.
  3. Final Answer:

    Quickly update many cells by changing specific text or values -> Option A
  4. Quick Check:

    Find and Replace = Update many cells fast [OK]
Hint: Remember: Find and Replace changes existing content fast [OK]
Common Mistakes:
  • Confusing Find and Replace with sorting or filtering
  • Thinking it creates formulas
  • Assuming it protects cells
2. Which keyboard shortcut opens the Find and Replace dialog in Excel?
easy
A. Ctrl + F
B. Ctrl + P
C. Ctrl + H
D. Ctrl + R

Solution

  1. Step 1: Recall Excel shortcuts for Find and Replace

    Ctrl + F opens the Find dialog, but Ctrl + H opens the Find and Replace dialog.
  2. Step 2: Verify other shortcuts

    Ctrl + R is for fill right, Ctrl + P is for print, so they are incorrect here.
  3. Final Answer:

    Ctrl + H -> Option C
  4. Quick Check:

    Find and Replace shortcut = Ctrl + H [OK]
Hint: Use Ctrl + H to open Replace directly [OK]
Common Mistakes:
  • Using Ctrl + F which only finds but doesn't replace
  • Confusing Ctrl + R or Ctrl + P with Find and Replace
  • Trying to open Replace from menus only
3. You have a column with values: Apple, Banana, Apple, Cherry. Using Find and Replace to replace Apple with Orange and clicking Replace All will result in:
medium
A. Apple, Banana, Apple, Cherry
B. Orange, Banana, Orange, Cherry
C. Orange, Banana, Apple, Cherry
D. Apple, Banana, Orange, Cherry

Solution

  1. Step 1: Identify all occurrences of 'Apple'

    The list has 'Apple' in the 1st and 3rd positions.
  2. Step 2: Replace all 'Apple' with 'Orange'

    Using Replace All changes both occurrences to 'Orange'. The list becomes Orange, Banana, Orange, Cherry.
  3. Final Answer:

    Orange, Banana, Orange, Cherry -> Option B
  4. Quick Check:

    Replace All changes every match [OK]
Hint: Replace All changes every matching cell instantly [OK]
Common Mistakes:
  • Replacing only the first occurrence
  • Replacing wrong values
  • Not understanding Replace All affects all matches
4. You tried to replace cat with dog in a list containing catalog, cat, and scatter. After Replace All, the results were dogalog, dog, and sdogter. How can you fix this?
medium
A. Change the font color instead of replacing text
B. Use Replace instead of Replace All
C. Use Find only without Replace
D. Use Match entire cell contents option before replacing

Solution

  1. Step 1: Understand why partial matches changed

    Replacing 'cat' without restrictions changes parts of words like 'catalog' and 'scatter'.
  2. Step 2: Use 'Match entire cell contents' option

    This option restricts replacement to cells exactly matching 'cat', avoiding partial word changes.
  3. Final Answer:

    Use Match entire cell contents option before replacing -> Option D
  4. Quick Check:

    Match entire cell contents avoids partial replacements [OK]
Hint: Check 'Match entire cell contents' to avoid partial word changes [OK]
Common Mistakes:
  • Replacing without matching whole cell content
  • Using Replace instead of Replace All unnecessarily
  • Trying to fix by changing font color
5. You have a large sheet with product codes like AB123, AB124, AC123. You want to replace all codes starting with AB to start with XY instead, keeping the numbers intact. Which Find and Replace approach works best?
hard
A. Find 'AB' and replace with 'XY' without wildcards
B. Find 'AB*' and replace with 'XY*' using wildcards
C. Find 'AB' and replace with 'XY' using wildcards
D. Manually edit each code one by one

Solution

  1. Step 1: Understand Excel's Find and Replace wildcard behavior

    Excel supports wildcards in Find but not in Replace. The '*' wildcard matches any characters in Find but cannot be used in Replace text.
  2. Step 2: Replace 'AB' with 'XY' directly

    Finding 'AB' and replacing with 'XY' changes only the prefix, keeping the numbers intact, e.g., 'AB123' becomes 'XY123'.
  3. Step 3: Why other options fail

    Find 'AB*' and replace with 'XY*' using wildcards tries to use '*' in Replace which Excel does not support. Find 'AB' and replace with 'XY' using wildcards is invalid syntax. Manually edit each code one by one is inefficient.
  4. Final Answer:

    Find 'AB' and replace with 'XY' without wildcards -> Option A
  5. Quick Check:

    Replace prefix by replacing 'AB' with 'XY' directly [OK]
Hint: Replace prefix by replacing 'AB' with 'XY' directly [OK]
Common Mistakes:
  • Trying to use wildcards in Replace text
  • Replacing manually instead of using Replace All
  • Using incorrect wildcard syntax