Article ID: 150363
Article Last Modified on 10/11/2006
=Sum_Visible_Cells(A1:A5)
Function Sum_Visible_Cells(Cells_To_Sum As Object)
Application.Volatile
For Each cell In Cells_To_Sum
If cell.Rows.Hidden = False Then
If cell.Columns.Hidden = False Then
total = total + cell.Value
End If
End If
Next
Sum_Visible_Cells = total
End Function
Note that if you hide or unhide cells after you enter the formula into the
worksheet, the formula will not recalculate automatically, even if
Calculation is set to automatic. You can make the formulas recalculate if
Calculation is set to automatic and you take any of the following actions:
176476 OFF: Office Assistant Not Answering Visual Basic Questions
Additional query words: 5.00c 8.00 XL98 XL97 XL7 XL5 XL
Keywords: kbdtacode kbhowto kbprogramming KB150363