Practice by topic / Excel / Text Functions

FIND and SUBSTITUTE Exercises

Imported data is messy: extra spaces, inconsistent capitals, codes glued together. Text functions clean and reshape it without retyping anything. These 10 exercises build up step by step, starting with find the position of an @ symbol, replace a dash with a slash, find the position of a space.

3 of 10 free · no sign-up needed · graded on the formula you write

1

Find the Position of an @ Symbol

Free

A1 holds an email address. Write a formula in A2 that returns the position of the @ symbol using FIND.

Show the solution

Use =FIND("@",A1)

Right — FIND returns the 1-based position of the search text within the string.

Expected result in A2: 5

Try it in the live spreadsheet →
2

Replace a Dash With a Slash

Free

A1 holds a date-like string using dashes. Write a formula in A2 that replaces all dashes with slashes using SUBSTITUTE.

A
12024-03-15
2?
Show the solution

Use =SUBSTITUTE(A1,"-","/")

Good — SUBSTITUTE without an instance number replaces every occurrence.

Expected result in A2: 2024/03/15

Try it in the live spreadsheet →
3

Find the Position of a Space

Free

A1 holds a full name. Write a formula in A2 that returns the position of the first space using FIND.

A
1John Smith
2?
Show the solution

Use =FIND(" ",A1)

Right — FIND locates the first occurrence of the search text.

Expected result in A2: 5

Try it in the live spreadsheet →
4

Replace Only the Second Occurrence

A1 holds text with the word 'the' appearing twice. Write a formula in A2 that replaces only the 2nd occurrence of 'the' with 'THE' using SUBSTITUTE.

A
1the cat sat on the mat
2?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
6

Find the Position of a File Extension Dot

A1 holds a filename. Write a formula in A2 that returns the position of the '.' before the extension using FIND.

A
1report.pdf
2?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
8

Find the Position of a Comma in an Address

A1 holds an address like 'Austin, TX'. Write a formula in A2 that returns the position of the comma using FIND.

A
1Austin, TX
2?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
9

Standardize Separators With SUBSTITUTE

A1 holds a phone number using dots as separators. Write a formula in A2 that replaces all dots with dashes using SUBSTITUTE.

A
1555.123.4567
2?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
10

Replace the First Instance Only

A1 holds text where a word appears twice, but only the first instance should change. Write a formula in A2 that replaces just the 1st occurrence of 'red' with 'blue' using SUBSTITUTE.

A
1red car, red bike
2?

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →