Hi,
Try this UDF...
Function SumVisible(RefRange As Range)
Dim UsedCell As Range, temp As Double
Application.Volatile
For Each UsedCell In RefRange
If Not UsedCell.EntireRow.Hidden And Not UsedCell.EntireColumn.Hidden Then
If IsNumeric(UsedCell.Value) Then
temp = temp + UsedCell.Value
End If
End If
Next UsedCell
SumVisible = temp
End Function
Bye,
Jay
EDIT: Added Application.Volatile to make it more accurate, but hiding and unhiding rows and columns is not a trappable event, I believe, so be careful when (if) using this.
This message was edited by Jay Petrulis on 2002-04-26 09:29