View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PatrickA PatrickA is offline
external usenet poster
 
Posts: 5
Default Formula for IF a total goes to 3 pages do not have on 2nd page

Tex,

There is probably a more sophisticated way, but...

Can you pinpoint a cell or range of cells on page 3 that will have
data in it/them if there are enough items on your list to run to page
3?

Say you can. Name that cell or range "Teller"

If you can, the formula =ISTEXT(Teller) will return the value FALSE if
there was no text in the cell or range, and TRUE if there is. (You
can also check for numbers, nulls, etc. Search the Help if you need
to.)

So, in the cell where you want the total to appear (or not appear) on
p 2, you could use Format | Conditional Formatting to format the text
in the cell. Instead of using "Cell value is...", use Formula is and
enter the formula =ISTEXT(Teller)=FALSE, and set a format of "White
text on a white background" or whatever.

If there is no text in Teller, voila, no total on p2.

Then in the cell where you want the total to appear (or not appear) on
p 3, use =ISTEXT(Teller)=TRUE...

Get it?

Again, not sophisticated, but there you go.

Another approach would be a pair of IF formulas...

P2: =IF(ISTEXT(Teller)=TRUE,"",SUM(B27:B30))

P3 =IF(ISTEXT(Teller)=TRUE,SUM(B27:B30),"")

Look up IF formulas if you are not familiar with the syntax, and
adjust what you are summing accordingly.

Hope that helps.

Patrick