Multiple Sum Functions on status bar

  • Thread starter Christopher Kennedy
  • Start date
C

Christopher Kennedy

Is there any way to force count & sum to show up on the status bar at
the same time?

If not, can a toolbar be coded, and display those two variables as
calculated by VBA?


Thanks!
 
B

Bob Phillips

Here is one idea

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.DisplayStatusBar = True
On Error Resume Next
Application.StatusBar = "Average=" & Application.Average(Selection) & _
"; " & _
"Count=" & Application.CountA(Selection) & "; " & _
"Count nums=" & Application.Count(Selection) & _
"; " & _
"Sum=" & Application.Sum(Selection) & "; " & _
"Max=" & Application.Max(Selection) & "; " & _
"Min=" & Application.Min(Selection)
End Sub

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

Jack Sons

Bob,

I really would like to have the status bar shouw count and sum at the same
time. I put your code in a sheet module, a normal module and the this
workbook module, but neither gave any result. I still get or sum or count in
the status bar, but not both at the same time. What did I do wrong?

Jack Sons
The Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top