IF formula with inclusion / exclusion criteria for text?

Copper Contributor

Hi all,

I'm struggling with some text based formula prep. 

I would like to figure out how to put a formula together that tells me if there are normal regular non-golden/silver apples (in singular or plural) in column A. If yes, I want column B to say yes. If there are golden/silver AND normal apples, column B should still say yes. However, if there's only golden/silver apple(s) in column A (and/or other non-apple products), I would like column B to say no.

I can find normal regular non-golden/silver apples if they are not the first item in the list, but it doesn't work if they are the only thing on the list, or the first item on the list. 

=IF(COUNTIF(A2,"*, Apple*"), "yes","no")

Any suggestions?

Many thanks in advance!

 

 AB
1ProductsDo we have regular apples?
2Pears x2, Apples x4, Grapes x2yes
3Golden Apples x4, Apples x3yes
4Golden Apples x1, Silver Apples x2no
5Apple x1, Golden Apple x1yes
6Pear x3, Grapes x2no
7Silver Apple x1no
8  

 

 

1 Reply
I was going to suggest something else but actually like your approach and just add the case that Apple is how it starts:
=IF(COUNTIF(A2,"*, Apple*") + (Left(A2,5)="Apple"), "yes","no")