I have got a multisheets database where both rows and columns may be
hidden according to a given criteria. Only blanks rows and columns
should be hidden.
Now I need a formula to check if there is no "valuable" data hidden.
Checking test might be:
SUBTOTAL(9,reference) = SUBTOTAL(109,reference)
The problem is that it works for rows only and not for the columns.
Any ideas?
Thanks in advance
Tomek
You could try playing around with the cell width value of columns
since a hidden column will return zero.
For example:
E1:G3 contains your data
E F G
1 1 10 20
2 2 11 30
3 3 12 40
A1:A3 contains the column letters of your data, i.e. A1=E, A2=F, A3=G
Now put the following in B1 and copy down to B3
=IF(CELL("width",INDIRECT(A1&"1"))=0,"Hidden","Visible")
Now put the following in C1 and copy down to C3
=SUM(INDIRECT(A1&"1"):INDIRECT(A1&"3"))
Column B will tell you whether your data columns are hidden or not,
and column C will tell you the aggregate value of the columns. You
could modify C1 etc formulae to only show a total if column B1 etc is
"Hidden".
Hide say column F with Format Column Width to zero, and press F9 to
recalculate to test. For some reason you have to do this since the
formulae don't appear to re-act when you first set widths to zero.
The above won't alert you to a hidden column which contains positive
and negative data that aggregates to zero. You might want to modify
things with array formua formulae to test for that condition.
HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________