Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default multiple sheets - IF statement?

Hello, I have a spreadsheet that contains 5 sheets. I
would like to add a function that calculates the number of
pages only if a value exists in a field on a page. I
can't seem to use the IF statement because I actually need
an IF/ELSE statement. How can I do this.

My example is as follows:

On page 1: =IF('PAGE2'!R20<0,"2","1") but if there is a
page 3 or 4 or 5, etc. that contains values, then how do I
use this IF statement?

Please let me know if you do not understand what I am
trying to ask.

Thank you very much,
Grace
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default multiple sheets - IF statement?

What about the COUNTIF function - will it work for you?
If it is always the same cell (regardless of the page),
then:
=IF(COUNTIF('PAGE2'!R20:'PAGE5'!R20,"<0")1,"2"," 1")
(this checks to see if any of the cells on any of the
pages is non-zero - and makes the answer 2 if yes, 1 if
no. Not sure if that is what you want to do, but
hopefully you can see how it might be used).

The other alternative (like an IF-THEN-ELSE) is nested IFs:

=IF('PAGE2'!R20<0,IF('PAGE3'!R20<0,"3","2"),"1")
(So if the first condition is true, it evaluates the 2nd
IF function; if the first condition is false it gives the
result "1". This is more flexible than the suggestion
above but makes for a long, complicated function (esp.
after you add enough IFs to take care of all your pages)!!!

K Dales



-----Original Message-----
Hello, I have a spreadsheet that contains 5 sheets. I
would like to add a function that calculates the number

of
pages only if a value exists in a field on a page. I
can't seem to use the IF statement because I actually

need
an IF/ELSE statement. How can I do this.

My example is as follows:

On page 1: =IF('PAGE2'!R20<0,"2","1") but if there is

a
page 3 or 4 or 5, etc. that contains values, then how do

I
use this IF statement?

Please let me know if you do not understand what I am
trying to ask.

Thank you very much,
Grace
.

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
Using IF statement with sheets Ty Charts and Charting in Excel 0 May 10th 11 03:29 PM
How to update data from multiple sheets to one specific sheets Khawajaanwar Excel Discussion (Misc queries) 4 January 15th 10 07:31 AM
If statement with vlookup link to multiple sheets Rechie Excel Discussion (Misc queries) 4 August 26th 09 12:26 PM
With statement on many sheets Rob Excel Discussion (Misc queries) 8 August 24th 06 03:24 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM


All times are GMT +1. The time now is 10:56 PM.

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

About Us

"It's about Microsoft Excel"