Google Sheets intermediate regex email-validation formulas

How to Check for Valid Email Addresses in Google Sheets?

Validate Email Format is a Google Sheets function that checks if the content of cell a1 matches the pattern of a valid email address.. Formula Genius generates and validates this formula automatically from a plain-English prompt.

Ensuring that email addresses are correctly formatted is crucial for data integrity. Use REGEXMATCH to easily validate email formats in your spreadsheets.

The Formula

Prompt

"Check whether a cell contains a valid email address format using REGEXMATCH"

Google Sheets
=REGEXMATCH(A1, "^[\w-\.]+@[\w-]+\.[a-z]{2,}{{formula}}quot;)

This formula checks if the content of cell A1 matches the pattern of a valid email address.

Step-by-Step Breakdown

  1. The REGEXMATCH function evaluates a string against a regular expression.
  2. The pattern '^[\w-\.]+@[\w-]+\.[a-z]{2,}{{breakdownItems}}#039; defines the structure of a valid email.
  3. The '^' asserts the start of the string, ensuring the email begins correctly.
  4. [\w-\.]+ matches one or more word characters, hyphens, or dots before the '@'.
  5. @ indicates the presence of the '@' symbol, which separates the local part from the domain.
  6. [\w-]+ matches one or more word characters or hyphens in the domain name, followed by a '.' and a top-level domain.

Edge Cases & Warnings

  • Input with multiple '@' symbols will return FALSE.
  • Email addresses without a domain (e.g., 'user@') will return FALSE.
  • Invalid characters in the local part (e.g., 'user!name@example.com') will return FALSE.

Examples

Prompt

"user@example.com"

Google Sheets
TRUE
Prompt

"invalid-email@.com"

Google Sheets
FALSE

Frequently Asked Questions

What does REGEXMATCH do?

REGEXMATCH checks if a string matches a specified regular expression.

Can I use this formula for other formats?

Yes, you can modify the regex pattern to validate other formats.

What if my email has special characters?

You may need to adjust the regex pattern to accommodate special characters.

Can't find what you need?

Describe any formula in plain English and Formula Genius will generate, explain, and validate it — instantly.

defines the structure of a valid email." },{ "@type": "HowToStep", "position": 3, "text": "The '^' asserts the start of the string, ensuring the email begins correctly." },{ "@type": "HowToStep", "position": 4, "text": "[\\w-\\.]+ matches one or more word characters, hyphens, or dots before the '@'." },{ "@type": "HowToStep", "position": 5, "text": "@ indicates the presence of the '@' symbol, which separates the local part from the domain." },{ "@type": "HowToStep", "position": 6, "text": "[\\w-]+ matches one or more word characters or hyphens in the domain name, followed by a '.' and a top-level domain." }], "tool": { "@type": "SoftwareApplication", "name": "Formula Genius", "url": "https://formulagenius.co", "applicationCategory": "Productivity", "operatingSystem": "Web" } }
Google Sheets intermediate regex email-validation formulas

How to Check for Valid Email Addresses in Google Sheets?

Validate Email Format is a Google Sheets function that checks if the content of cell a1 matches the pattern of a valid email address.. Formula Genius generates and validates this formula automatically from a plain-English prompt.

Ensuring that email addresses are correctly formatted is crucial for data integrity. Use REGEXMATCH to easily validate email formats in your spreadsheets.

The Formula

Prompt

"Check whether a cell contains a valid email address format using REGEXMATCH"

Google Sheets
=REGEXMATCH(A1, "^[\w-\.]+@[\w-]+\.[a-z]{2,}{{formula}}quot;)

This formula checks if the content of cell A1 matches the pattern of a valid email address.

Step-by-Step Breakdown

  1. The REGEXMATCH function evaluates a string against a regular expression.
  2. The pattern '^[\w-\.]+@[\w-]+\.[a-z]{2,}{{breakdownItems}}#039; defines the structure of a valid email.
  3. The '^' asserts the start of the string, ensuring the email begins correctly.
  4. [\w-\.]+ matches one or more word characters, hyphens, or dots before the '@'.
  5. @ indicates the presence of the '@' symbol, which separates the local part from the domain.
  6. [\w-]+ matches one or more word characters or hyphens in the domain name, followed by a '.' and a top-level domain.

Edge Cases & Warnings

  • Input with multiple '@' symbols will return FALSE.
  • Email addresses without a domain (e.g., 'user@') will return FALSE.
  • Invalid characters in the local part (e.g., 'user!name@example.com') will return FALSE.

Examples

Prompt

"user@example.com"

Google Sheets
TRUE
Prompt

"invalid-email@.com"

Google Sheets
FALSE

Frequently Asked Questions

What does REGEXMATCH do?

REGEXMATCH checks if a string matches a specified regular expression.

Can I use this formula for other formats?

Yes, you can modify the regex pattern to validate other formats.

What if my email has special characters?

You may need to adjust the regex pattern to accommodate special characters.

Can't find what you need?

Describe any formula in plain English and Formula Genius will generate, explain, and validate it — instantly.