This needs reselecting after each filter/unfilterOriginally Posted by danovkos
[vba]
Option Explicit
Private WithEvents App As Application
Private Sub App_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim statusLine As String
On Error Resume Next
With Application.WorksheetFunction
statusLine = "Sum=" & .Subtotal(109, Target)
statusLine = statusLine & "; Average=" & Round(.Subtotal(101, Target), 1)
statusLine = statusLine & "; Non-blank=" & .Subtotal(103, Target)
statusLine = statusLine & "; Min=" & .Subtotal(105, Target)
statusLine = statusLine & "; Max=" & .Subtotal(104, Target)
End With
Application.StatusBar = statusLine
End Sub
Private Sub Workbook_Open()
Set App = Application
End Sub
[/vba]
This is workbook event code.
To input this code, right click on the Excel icon on the worksheet
(or next to the File menu if you maximise your workbooks),
select View Code from the menu, and paste the code