Writing IF Statement

A

Angie

Is there anyway to write an if statement for a range without identifing each
cell?
Ex: If cells A1:AA1 = "test","proceed to next sheet","stop".

Thanks,
Angie
 
B

Bob Phillips

=IF(ISNUMBER(MATCH("test",A1:AA1,0))","proceed to next sheet","stop")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Ron Rosenfeld

Is there anyway to write an if statement for a range without identifing each
cell?
Ex: If cells A1:AA1 = "test","proceed to next sheet","stop".

Thanks,
Angie

Perhaps something like:

=IF(COUNTIF(A1:AA1,"test")>0,"proceed to next sheet","stop")


--ron
 
B

bj

if you want all of them to say test
=if(or(A1:AA1<>"test"),"proceed to next sheet","stop")
entered as an array control-shift-Enter
if you want any of them ot say test then
=if(or(A1:AA1="test"),"proceed to next sheet","stop")
entered as array
 
A

Angie

Thanks so much, but I'm having trouble with one piece.

Using the same example, A1 has the following formula:
=If a2=sheet1!a2,"test","redo"

C1 has the array =if(or(A1:AA1="test"),"proceed to next sheet","stop")

The problem is the array appears to only work if Row A changes on the active
sheet not sheet1. If sheet1!a2 changes and a2 = redo (active sheet) then c1
doesn't change to "stop". c1 only changes to "stop" if row a on the active
sheet changes.

I hope this makes sense. Thanks again.
 
Top