If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Using IF Statements with mutliple sheets

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-20-04, 12:50
palto1 palto1 is offline
Registered User
 
Join Date: Mar 2004
Posts: 68
Using IF Statements with mutliple sheets

Hello, I have a spreadsheet that contains 5 sheets. I labled these each as a "Page" for the user. I would like to add a function that calculates the number of pages only if a value exists in a field on that 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 With Quote
  #2 (permalink)  
Old 09-20-04, 13:35
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Howdy, Grace.
Quote:
Originally Posted by palto1
Hello, I have a spreadsheet that contains 5 sheets. I labled these each as a "Page" for the user. I would like to add a function that calculates the number of pages only if a value exists in a field on that 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?
It depends on what you want to achieve; you can use a combination of IF and AND/OR statements, or nested IF. Let's take your example

=IF(AND('PAGE2'!R20<>0,'PAGE3'!R20<>0,'PAGE4'!R20< >0,'PAGE5'!R20<>0),"2","1")

The above says that if all four cells are empty on those pages, then put 2, otherwise 1.

=IF(OR('PAGE2'!R20<>0,'PAGE3'!R20<>0,'PAGE4'!R20<> 0,'PAGE5'!R20<>0),"2","1")

The above says that if any of the cells are empty, then put 2, otherwise 1/

And if that doesn't work, we can use nested IF statements.
=IF('PAGE2'!R20<>0,"2","1")
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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