View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default The 'other' status bar - that displays the sum of the selection

There are a couple of different ideas. Here is just one option. This
displays the Count and Sum of your selection in the Lower Left corner (The
"Status Bar") and resets it after 5 Seconds. Maybe this will give you some
ideas to work with. HTH

Sub Demo()
Const z1 = "Count: # Sum: ##"
Dim s

With WorksheetFunction
s = Replace(z1, "##", .Sum(Selection))
s = Replace(s, "#", .Count(Selection))
End With

Application.StatusBar = s
Application.OnTime Now + TimeSerial(0, 0, 5), "ResetStatusBar"
End Sub

Sub ResetStatusBar()
Application.StatusBar = False
End Sub


--
Dana DeLouis
Win XP & Office 2003


"Rob" wrote in message
...
Hi
When you select cells in excel, the sum (or average or count etc.) is
displayed near the bottom right of the screen. I want to perform my own
calculation on the selected cells, and have the result displayed in the
same
way. Does anyone know how to set this value?
Thanks
Rob