![]() |
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 |
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 . |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com