Extracting consecutive letters from a cell and applying the IF function

searnold56

New Member
Joined
Mar 8, 2013
Messages
7
Hello everyone,

First timer here. I'm working on an email database and am looking to sort them into type. I am trying (without success) to use the IF function as follows.

If A1 contains the letters "isd" consecutively, then B1=TRUE
If A1 contains the letters "google", "yahoo", "hotmail", or "austin.rr" consecutively, then B2=true

HELP!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Probably not the most efficient formula, but this will work...

B1: =FIND("isd",A1)>0
B2: =OR(IFERROR(FIND("Hotmail",A1)>0,FALSE),IFERROR(FIND("Yahoo",A1)>0,FALSE),IFERROR(FIND("Google",A1)>0,FALSE),IFERROR(FIND("austin.rr",A1)>0,FALSE))
 
Upvote 0
Assuming you also want FALSE when one of those text string is not in the cell, put these formula in the indicated cells...

B1: =COUNTIF(A1,"*isd*")>0

B2: =COUNTIF(A1,"*google*")+COUNTIF(A1,"*yahoo*")+COUNTIF(A1,"*hotmail*")+COUNTIF(A1,"austin.rr")>0
 
Upvote 0
Assuming you also want FALSE when one of those text string is not in the cell, put these formula in the indicated cells...

B1: =COUNTIF(A1,"*isd*")>0

B2: =COUNTIF(A1,"*google*")+COUNTIF(A1,"*yahoo*")+COUNTIF(A1,"*hotmail*")+COUNTIF(A1,"austin.rr")>0

Ended up with:

=OR(NOT(ISERR(FIND("isd",$A19,1))),NOT(ISERR(FIND(".edu",$A19,1))))
&
=OR(NOT(ISERR(FIND("yahoo",$A19,1))),NOT(ISERR(FIND("gmail",$A19,1))),NOT(ISERR(FIND("hotmail",$A19,1))),NOT(ISERR(FIND("att",$A19,1))),NOT(ISERR(FIND("austin.rr",$A19,1))))

Tedious, but it's the only one I could get to work. Thank you for the input!
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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