Is it possible to set Status Bar to view Avg AND Sum at same time

  • Thread starter Thread starter Mel
  • Start date Start date
M

Mel

Is it possible to set the Status Bar so you can view multiple items? I would
like to view both the Average and the Sum of a group of highlighted cells at
all times, without having to change it back and forth on the status bar.
 
Yes, but in Excel 2007 (average, count, count number, min, max, sum - all at
once). I am sorry about Excel 2003.
 
Hi,

In 2003 your only solution is to write vba code and create 6 buttons to
display the desired calculations. Here is some quick code not fully tested.

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
With Application.CommandBars("Calculations")
If Target.Count > 1 Then
On Error Resume Next
Dim S, A, C, M, N, O
S = WorksheetFunction.Sum(Target)
A = WorksheetFunction.Average(Target)
C = WorksheetFunction.Count(Target)
M = WorksheetFunction.Max(Target)
N = WorksheetFunction.Min(Target)
O = WorksheetFunction.CountA(Target)
.Controls(1).Caption = "Sum: " & S
.Controls(2).Caption = "Avg: " & A
.Controls(3).Caption = "Count: " & C
.Controls(4).Caption = "Max: " & M
.Controls(5).Caption = "Min: " & N
.Controls(6).Caption = "CountA: " & O
Else
.Controls(1).Caption = "Sum: "
.Controls(2).Caption = "Avg: "
.Controls(3).Caption = "Count: "
.Controls(4).Caption = "Max: "
.Controls(5).Caption = "Min: "
.Controls(6).Caption = "CountA: "
End If
End With
End Sub

You will need to create a toolbar, here named Calculations and add to that 6
buttons. Code will populate those buttons with calculation results when a
selection is made.
 

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

Back
Top