Thread
:
Calculating Only Visiable Data
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Calculating Only Visiable Data
Glad to help. Subtotal is better but you asked for VBA
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"paddy_nyr" wrote in message
reenews.net...
"Don Guillett" wrote in message
...
Sub avervisible()
mysum = 0
On Error Resume Next
For Each c In Range("a1:a" & Cells(Rows.Count, "a").End(xlUp).Row)
If c.EntireRow.Hidden < True Then
mysum = mysum + c.Value
mc = mc + 1
End If
Next
MsgBox mysum
MsgBox mc
MsgBox mysum / mc
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"paddy_nyr" wrote in message
Thanks Don that did it.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett