An Excel formula to check if an email address is valid

Excel has no ISEMAIL function, but this formula checks the basic shape of the address in A2 (exactly one @, something before it, a dot after it, no spaces or double dots) and returns TRUE or FALSE: =IFERROR(AND(LEN(A2)-LEN(SUBSTITUTE(A2,"@",""))=1, FIND("@",A2)>1, ISNUMBER(FIND(".",A2,FIND("@",A2)+2)), ISERROR(FIND(" ",A2)), ISERROR(FIND("..",A2)), RIGHT(A2,1)<>"."), FALSE). A formula can only check the format. To know whether the domain takes mail or is a throwaway service, use an email check API.

Try it free Email Address Check API — format, mail servers, disposable · $0.01 / call

The formula, piece by piece

=IFERROR(AND(LEN(A2)-LEN(SUBSTITUTE(A2,"@",""))=1, FIND("@",A2)>1, ISNUMBER(FIND(".",A2,FIND("@",A2)+2)), ISERROR(FIND(" ",A2)), ISERROR(FIND("..",A2)), RIGHT(A2,1)<>"."), FALSE)
PartChecks that
LEN(A2)-LEN(SUBSTITUTE(A2,"@",""))=1There is exactly one @
FIND("@",A2)>1Something comes before the @
ISNUMBER(FIND(".",A2,FIND("@",A2)+2))A dot appears after the @, with at least one character between them
ISERROR(FIND(" ",A2))There are no spaces
ISERROR(FIND("..",A2))There are no two dots in a row
RIGHT(A2,1)<>"."It doesn't end with a dot
IFERROR(..., FALSE)An empty cell or an address with no @ shows FALSE instead of #VALUE!

Shorter versions

If REGEXTEST gives #NAME?, your Excel doesn't have it yet; use the long formula, which works in every version.

Excel for Microsoft 365 (recent versions with REGEXTEST):
=REGEXTEST(A2,"^[^@\s]+@[^@\s]+\.[^@\s]+$")

Google Sheets:
=ISEMAIL(A2)
=REGEXMATCH(A2,"^[^@\s]+@[^@\s]+\.[^@\s]+$")

Use it on a whole list

  1. Put the formula in B2 and double-click the fill handle to copy it down the list.
  2. Filter column B for FALSE to see the bad addresses.
  3. To highlight them instead, use Home > Conditional Formatting > New Rule > Use a formula, with =NOT(...) around the formula.
  4. To stop bad entries being typed in, use Data > Data Validation > Custom and paste the formula (without the leading IFERROR if your Excel complains).
  5. Spaces at the edges are common in pasted lists. Clean them first with =TRIM(A2), or replace A2 with TRIM(A2) in the formula.

What a formula can't see

The next step after the formula

Keep the TRUE rows, save them as CSV, and run them through our Email Address Check API: it looks up each domain's mail servers, flags throwaway and role addresses, and suggests fixes for typos like gmial.com. It costs $0.01 per address, and you can try single addresses free 5 times a day on the listing page.

The product

Questions

Why does a@b.c come out TRUE?

Because it has a valid shape. The formula checks format only; it can't know that b.c isn't a real domain.

Does the long formula work in Google Sheets?

Yes, all the functions exist there too. In Sheets, ISEMAIL is shorter.

Can Excel check whether the email exists?

Not on its own. It would need a macro or Power Query calling an outside service, and even then only a mailbox-level service gets close.

Related

Updated 2026-12-01