Ravindra BagaleCourses & study guides मराठी Track your progress

5. Data Cleaning A–Z

5.14 Removing Unwanted Characters

Before

Product (raw)
*Nashik Grapes* 500 g
Poha #1 kg
Ladi Pav (6 pcs)!!
Amul_Butter_100_g

About this data: Teaching sample for a fictional shop “Maple Bakery Co”. Figures and names (e.g. Aamir Khan) are made up for this lesson on removing unwanted characters.

After

Product
Nashik Grapes 500 g
Poha 1 kg
Ladi Pav (6 pcs)
Amul Butter 100 g

About this data: Demo table only — not real customer or company data. Built to practise removing unwanted characters.

Steps in Excel

  1. Several characters with nested SUBSTITUTE: =TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"*",""),"#",""),"!",""),"_"," ")).
  2. Find & Replace for one character at a time. To find a literal * or ?, type ~* or ~? (the tilde escapes the wildcard).
  3. Microsoft 365 – remove a list of characters with REDUCE/LAMBDA (advanced, optional):

    =TRIM(REDUCE(A2,{"*","#","!"},LAMBDA(t,c,SUBSTITUTE(t,c,""))))

Ravindra Bagale's Tip

When searching for * in Find & Replace, many students end up with a whole empty column – because * means "anything" (a wildcard). For a literal star, write ~*. Before Replace All, use Find All to see how many cells are found, then replace.

Practice task

Clean 10 product names containing *, #, _, !! and double spaces. Do it once with Find & Replace (using ~*) and once with a SUBSTITUTE formula.

Loading practice tasks...

  1. Remove stars (Easy): Remove all * from B2.
  2. Underscore to space (Easy): Change "_" to " " in B3.
  3. Remove hash signs (Easy): Remove all # from B4.
  4. Dot to space (Easy): Change "." to " " in B6.
  5. Remove a note (Medium): Clean B5 to "Daniel Moore".
  6. Remove the $ (Medium): Remove "$" from C3.
  7. Price as a number (Medium): Change C2 into a number.
  8. Count symbols (Medium): Count "#" in B4.
  9. Total price (Hard): Total of C2:C6 as numbers.
  10. Clean name, proper case (Hard): Clean B3 into "Michael Brown".
  11. Remove both symbols (Hard): Remove "*" and "#" from B2 in one formula.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Removing Unwanted Characters?
Card 1: What is Removing Unwanted Characters? · Download PNG
Revision card 2: Tiny example — Removing Unwanted Characters
Card 2: Tiny example — Removing Unwanted Characters · Download PNG
Revision card 3: Checklist — Removing Unwanted Characters
Card 3: Checklist — Removing Unwanted Characters · Download PNG