OR Function

  • Thread starter Thread starter M
  • Start date Start date
M

M

I have a workbook (sheet) that contains various text values in a column. I
need to exclude from the final sheet any rows in which the text column
includes certain values (like names of certain countries).

I can do a FIND or SEARCH to determine if the column contains a text value I
want to exclude but I don't seem to be able to string the FINDs together
with an OR statement to combine and flag all the rows that need to be
deleted.

When I use =OR(FIND "xxxx",xxx),(FIND "yyyy",xxx) etc. it always comes back
false (or #value) because all the find criteria are not true and never would
be.

My understanding is that the OR function is supposed to return a "TRUE" if
any of the statements are true, but it seems to return a false (#value) if
any statement isn't true.

My workaround is to set up multiple columns of finds but this seems pretty
crude.

Would appreciate any tips.

Thanks,

M
 
Hi
try something like
=IF(OR(ISNUMBER(FIND("text1",A1)),ISNUMBER(FIND("text1",A1))),"X","")
 
M,

Try this

=OR(ISNUMBER(FIND("Bob",A:A)),ISNUMBER(FIND("Alan",A:A)))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
=OR(ISNUMBER(FIND("Bob",A:A)),ISNUMBER(FIND("Alan",A:A)))
...

While FIND may operate on entire columns, and ISNUMBER too, are you sure OR can
handle ranges this large? While =OR(B:B) with col B filled with the array
formula =ISNUMBER(FIND(A1,A:A)) returns TRUE, the array formula

=OR(ISNUMBER(FIND(A1,A:A)))

returns FALSE under XL8/98 SR-2 running on the machine I'm currently using.
 
Harlan,

I think you are right. It is getting late here and I am to bed, but it does
seem to error. I did test it, so I will do a set of tests tomorrow to
double-check.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top