# Nested or statement

#### doug firr

##### Board Regular
I'd like to check whether a string of text in a cell contains either "something" or "somethingelse".

IF(ISNUMBER(FIND(\$F\$5,D8)),\$F\$4,0) OR IF(ISNUMBER(FIND(\$F\$6,D8)),\$F\$4,0)

The result should either output the contents of cell F4 if True or 0 otherwise.

I've tried a few nestings with no luck: IF(ISNUMBER(FIND(or(\$F\$5,D8),(\$F\$6,D8)),\$F\$4,0)) - too many arguments.

I want to say "find either the text in F5 or the text in F6, if you find either output whats in F4".

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

#### XOR LX

##### Well-known Member
Hi,

Couple of possibilities:

=IF(SUMPRODUCT(COUNTIF(D8,"*"&\$F\$5:\$F\$6&"*")),\$F\$4,0)

=IF(ISNUMBER(LOOKUP(67^11,FIND(\$F\$5:\$F\$6,D8))),\$F\$4,0)

Regards

#### doug firr

##### Board Regular

What do ^ and "*" do?

#### XOR LX

##### Well-known Member
Yes. What you used is perfectly good. I was just offering some slightly unusual alternatives

^ is the symbol for "to the power of" and * represents a wildcard when used in conjunction with certain (i.e. search) functions.

Regards

Replies
5
Views
194
Replies
4
Views
109
Replies
5
Views
153
Replies
4
Views
177
Replies
8
Views
315