IF conditional on certain text existing in a cell.


Posted by Jon on May 17, 2001 8:46 PM

I need to prune a bunch of email addresses based on domain name. I figured I would make the next cell a 1 if it contains the desired domain. I got it to work if that's all the cell contains with something like:
if(a1)="abc.com"1,0
But the cell will obviously have more than just abc.com, so how do I tell it to look for abc.com and don't worry about the rest of the cell? Sorry if this is too easy! Thanks !



Posted by David Hawley on May 17, 2001 8:53 PM

Hi Jon

You can use the FIND function for this.

=IF(ISERR(FIND("abc.com",A1)),0,1)

Dave

OzGrid Business Applications