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

5. Data Cleaning A–Z

5.11 E-mail Addresses

Before

Customer E-mail (raw)
Ravina " Ravina@Example.COM"
Shahrukh SHAHRUKH@example.com
Ruhi ruhi.bagale@example .com
Raja raja@examplecom

About this data: Teaching sample for a fictional shop “GreenField Dairy”. Figures and names (e.g. Aarti Kulkarni) are made up for this lesson on e mail addresses.

After

Customer E-mail Valid?
Ravina ravina@example.com Yes
Shahrukh shahrukh@example.com Yes
Ruhi ruhi.bagale@example.com Yes
Raja raja@examplecom Check

About this data: Demo table only — not real customer or company data. Built to practise e mail addresses.

Steps in Excel

  1. Lower case, no spaces anywhere: =LOWER(SUBSTITUTE(TRIM(B2)," ","")).
  2. Basic validity check (one @, a dot after it, no spaces):

    =IF(AND(LEN(C2)-LEN(SUBSTITUTE(C2,"@",""))=1, ISNUMBER(FIND(".",C2,FIND("@",C2)))),"Yes","Check")

  3. Extract user and domain: =LEFT(C2,FIND("@",C2)-1) and =MID(C2,FIND("@",C2)+1,100) (or TEXTBEFORE/TEXTAFTER in Microsoft 365).

Ravindra Bagale's Tip

Many students make the mistake of applying PROPER to e-mail addresses – it looks odd, like "Ravina@Example.Com". Always keep e-mails in LOWER case. And the validity formula is only a basic check – look at the rows marked "Check" manually, and don't add an @ or a dot yourself.

Practice task

Clean ten customer e-mails, mark invalid ones, and count how many customers use each domain with COUNTIF on the extracted domain.

Loading practice tasks...

  1. Clean and small letters (Easy): Clean B2.
  2. Small letters (Easy): Show B6 in small letters.
  3. Where is the @? (Easy): Find the position of "@" in B3.
  4. Has an @? (Easy): Does B5 have an "@"? (TRUE or FALSE)
  5. User name part (Medium): Get the text before "@" in B3.
  6. Domain part (Medium): Get the text after "@" in B3.
  7. Count @ signs (Medium): How many "@" are in B4?
  8. Space inside? (Medium): Does B7 have a space? (TRUE or FALSE)
  9. Valid or check (B3) (Hard): Show "Yes" if B3 has exactly one @ and no space, else "Check".
  10. Valid or check (B4) (Hard): Same test for B4.
  11. Emails with no @ (Hard): How many emails in B2:B7 have no "@"?

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 E Mail Addresses?
Card 1: What is E Mail Addresses? · Download PNG
Revision card 2: Tiny example — E Mail Addresses
Card 2: Tiny example — E Mail Addresses · Download PNG
Revision card 3: Checklist — E Mail Addresses
Card 3: Checklist — E Mail Addresses · Download PNG