Hi,
As stated the answer is no. You have asked for A function which counts all
the occupied rows and columns in a worksheet. There is no function that will
do both at once, rows and columns. Also, there is no built in function which
will calculate the number of occupied rows in all columns at once.
What you could do is insert a new column A and a new row in position 1,
enter the formula =COUNTA(B2:IV2) in A2 and copy it down as far as you want
65536 or 1,048,576 (2007). Then in A1 enter the formula =SUM(A2:A65536)
This will count the number of rows that have anything on them. You can do
something similar for columns.
Also, none of these formulas consider whether the cells are formatted if
that is important.