• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

OR tests - Constant vs. many cells

polarisking

Member
I carried this over from the "old" site:

Original Post:

I want to test multiple cells vs. a constant. Rather than doing

=OR(A1<>99,f1<>99,g1<>99)

is there a context for testing something like =99<>or(a1,f1,g1) (this obviously doesn't work)?

Thanks in advance

NARAYANK991 answered:
Try this :

=OR(N(OFFSET($A$1,,{0,5,6},1,1))<>99)

This will return TRUE if even one of A1 , F1 or G1 is NOT 99 ; if all 3 of them are 99 , then the formula will return FALSE.

Polarisking responded:

What you presented works fine for data elements that are linear - I'm looking for an "elegant" solution where multiple cells might not be either in the same row or column.
Perhaps it has to be done using brute force, e.g. =or(Cell1<>X, Cell2<>X, Cell...<>X, Celln<>X)
 
Hi, polarisking!

Tried this?
=OR(N(OFFSET(A1,{x1,x2,x3,...},{y1,y2,y3,...},1,1))<>99)
where x(i),y(i) are the coordinates of the referenced cells, offset in rows/cols.

Regards!
 
Back
Top