Formula Help

volpinex

New Member
Joined
Sep 2, 2019
Messages
4
Hello,
I need to build a formula which looks up a cell in which there is an email address and if the prefix is E followed by 6 digits and the suffix @gmail.com it returns "TRUE".
For example if in A1 we have E123456@gmail.com the Formula returns true but if it contains E12345k@gmail.com it returns "FALSE".
Thank you for your help.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi Volpinex,

Does this work for you?

Volpinex.xlsx
AB
1EmailCheck
2E123456@gmail.comTRUE
3E123456@googlemail.comFALSE
4X123456@gmail.comFALSE
5E99@gmail.comTRUE
6E9XX9@gmail.comFALSE
Sheet1
Cell Formulas
RangeFormula
B2:B6B2=AND(LEFT(A2,1)="E",ISNUMBER(MID(A2,2,SEARCH("@",A2,2)-2)+0),RIGHT(A2,10)="@Gmail.com")
 
Upvote 0
Welcome to Mr. Excel.

What about

Book1 (version 1).xlsb
AB
1E123456@gmail.comTRUE
2Jackson@yahoo.comFALSE
3Smith@gmail.comFALSE
4X123456@gmail.comFALSE
5E777666@gmail.comTRUE
6E555@gmail.comFALSE
Sheet7
Cell Formulas
RangeFormula
B1:B6B1=IF(AND("E"=LEFT(A1,1),"gmail.com"=RIGHT(A1,9),ISNUMBER(1*MID(A1,2,6))),"TRUE","FALSE")
 
Upvote 0
How about

=IF(AND(LEFT(A2,1)="E",ISNUMBER(--MID(A2,2,6)),RIGHT(A3,10)="@gmail.com"),"TRUE","FALSE")
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top