Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Statement writing problem Clay Excel Worksheet Functions 4 March 15th 07 05:55 PM
writing a statement newexceluser Excel Worksheet Functions 1 July 21st 06 10:15 PM
Help writing an IF statement cynichromantique Excel Worksheet Functions 6 April 1st 06 12:51 AM
when writing an IF statement what is the syntax for "Not Equal to. NEEDTOKNOW Excel Discussion (Misc queries) 1 December 10th 04 05:45 PM
when writing an IF statement what is the syntax for "Not Equal to. NEEDTOKNOW Excel Discussion (Misc queries) 1 December 10th 04 05:32 PM


All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"