How to check if an email address is valid in Excel
Excel formula
=REGEXTEST(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")Test the format with a pattern: =REGEXTEST(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$") in Excel 365, or REGEXMATCH with the same pattern in Google Sheets.
- Result on the example
- one result per row in
B2, filled down toB8 - Works in
- Microsoft 365 only
- Google Sheets
- Different formula, see below
See it work
The formula is already in B2, filled down to B8. Change any input and the result updates, or edit the formula to experiment.
How it works
The pattern reads: one or more characters that aren't @ or a space, then an @, then more of the same, then a dot and at least two letters at the end. That rejects a missing dot ("omar@contoso"), two @ signs, spaces, and a missing name before the @.
=REGEXTEST(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")ResultTRUE
A2"lena.park@northwind.example"The value in A2.
REGEXTEST(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")TRUEREGEXTEST: TRUE if the text contains a match for a regular expression.- text
A2"lena.park@northwind.example" - pattern
"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$"
- text
In Google Sheets
Google Sheets needs a different formula: =REGEXMATCH(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$"). On the same data it gives the same result. Here it is running in Google Sheets mode.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =AND(LEN(A2)-LEN(SUBSTITUTE(A2,"@",""))=1,ISNUMBER(FIND(".",A2,FIND("@",A2)+2)),ISERROR(FIND(" ",A2)),LEFT(A2)<>"@") | TRUE, FALSE, FALSE… | Works in every version: exactly one @, a dot at least one character after it, no spaces, and something before the @. Less strict than the pattern. |
Common mistakes
- A format check can't tell whether the mailbox exists. It only catches typos and junk.
- Patterns that are too strict reject real addresses. Plus signs, hyphens and long endings like .museum are all valid.
- Trailing spaces from imports fail the test. TRIM the column first.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Check if an email address is valid
B2, return TRUE when the email has a valid format (something, one @, a domain with a dot and an ending of 2 or more letters) and FALSE otherwise. Fill down to B8.Questions
Does Google Sheets have a built-in check?
Yes: =ISEMAIL(A2) returns TRUE for a valid format.
How do I stop invalid emails being typed in?
Use the formula as a custom Data Validation rule on the column.
How do I pull out the domain?
=TEXTAFTER(A2,"@") in Excel 365, or =MID(A2,FIND("@",A2)+1,99) in any version.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.