Check if an email address is valid
=REGEXMATCH(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")Google Sheets · result on the sample sheet: 6 rows (B2:B7)
Describe what you need and get a working REGEXMATCH formula for Google Sheets, tested on real data before you copy it. REGEXMATCH checks whether text contains a match for a regular expression and returns TRUE or FALSE.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=REGEXMATCH(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")Google Sheets · result on the sample sheet: 6 rows (B2:B7)
=REGEXMATCH(TO_TEXT(A2),"^2026")Google Sheets · result on the sample sheet: 6 rows (B2:B7)
=FILTER(A2:B10,REGEXMATCH(B2:B10,F1))Google Sheets · result on the sample sheet: 4 rows (E3:F6)
=SUMPRODUCT(--REGEXTEST(A2:A11,D1))Excel · result on the sample sheet: 5
=EXACT(A2,UPPER(A2))Excel · result on the sample sheet: 6 rows (B2:B7)
=SUMPRODUCT(--ISNUMBER(SEARCH(" "&E1&" "," "&A2:A10&" ")))Excel · result on the sample sheet: 5
=SUMPRODUCT(--((ISNUMBER(SEARCH(E1,A2:A10))+ISNUMBER(SEARCH(E2,A2:A10)))>0))Excel · result on the sample sheet: 6
=FILTER(A2:B9,REGEXMATCH(A2:A9,E1))Google Sheets · result on the sample sheet: 5 rows (E2:F6)
You describe the task in plain English, and it writes the formula, using REGEXMATCH where that's the right tool, for your table or a sample one. The formula is run in our engine in Google Sheets mode before you see it, so you get its result, not just a guess.
REGEXMATCH checks whether text contains a match for a regular expression and returns TRUE or FALSE.
Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the REGEXMATCH function page has a practice exercise.