ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Writing IF Statement (https://www.excelbanter.com/excel-worksheet-functions/145246-writing-if-statement.html)

Angie

Writing IF Statement
 
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

Bob Phillips

Writing IF Statement
 
=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)

"Angie" wrote in message
...
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




Ron Rosenfeld

Writing IF Statement
 
On Tue, 5 Jun 2007 07:56:03 -0700, Angie
wrote:

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

bj

Writing IF Statement
 
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

"Angie" wrote:

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


Angie

Writing IF Statement
 
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.

"bj" wrote:

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

"Angie" wrote:

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



All times are GMT +1. The time now is 08:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com