Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default how show sum & avg same time in status bar?

Thanks for any help.
In the status bar of my Excel 2002, I can show the sum of selected cells, or
average of selected cells, or a few more options. Is it possible to show the
sum and average of selected cells at the same time?
Like
Sum=10,000 Average=500
I switch back and forth between the two often enough it would be really
nifty to show both at the same time. There seems to be enough space on the
bar to show.
Thanks again.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 156
Default how show sum & avg same time in status bar?

As far as I know you can't show both, but here is a marco that can do
it for you...


Paste this code into the sheet level of your visual basic editor in the
excel file you'd like to use it.
You'll need to put this in each sheet level to have it work through the
whole workbook.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As String
Application.DisplayStatusBar = True
On Error Resume Next
x = CStr("Sum=" & Application.WorksheetFunction.Sum(Selection) & " " &
_
"Average=" & Application.WorksheetFunction.Average(Selection))
Application.StatusBar = x
End Sub



Sandy

Ian Elliott wrote:
Thanks for any help.
In the status bar of my Excel 2002, I can show the sum of selected cells, or
average of selected cells, or a few more options. Is it possible to show the
sum and average of selected cells at the same time?
Like
Sum=10,000 Average=500
I switch back and forth between the two often enough it would be really
nifty to show both at the same time. There seems to be enough space on the
bar to show.
Thanks again.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default how show sum & avg same time in status bar?

thanks!

"Sandy" wrote:

As far as I know you can't show both, but here is a marco that can do
it for you...


Paste this code into the sheet level of your visual basic editor in the
excel file you'd like to use it.
You'll need to put this in each sheet level to have it work through the
whole workbook.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As String
Application.DisplayStatusBar = True
On Error Resume Next
x = CStr("Sum=" & Application.WorksheetFunction.Sum(Selection) & " " &
_
"Average=" & Application.WorksheetFunction.Average(Selection))
Application.StatusBar = x
End Sub



Sandy

Ian Elliott wrote:
Thanks for any help.
In the status bar of my Excel 2002, I can show the sum of selected cells, or
average of selected cells, or a few more options. Is it possible to show the
sum and average of selected cells at the same time?
Like
Sum=10,000 Average=500
I switch back and forth between the two often enough it would be really
nifty to show both at the same time. There seems to be enough space on the
bar to show.
Thanks again.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default how show sum & avg same time in status bar?

thank you very much Sandy!


"Sandy" wrote:

As far as I know you can't show both, but here is a marco that can do
it for you...


Paste this code into the sheet level of your visual basic editor in the
excel file you'd like to use it.
You'll need to put this in each sheet level to have it work through the
whole workbook.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As String
Application.DisplayStatusBar = True
On Error Resume Next
x = CStr("Sum=" & Application.WorksheetFunction.Sum(Selection) & " " &
_
"Average=" & Application.WorksheetFunction.Average(Selection))
Application.StatusBar = x
End Sub



Sandy

Ian Elliott wrote:
Thanks for any help.
In the status bar of my Excel 2002, I can show the sum of selected cells, or
average of selected cells, or a few more options. Is it possible to show the
sum and average of selected cells at the same time?
Like
Sum=10,000 Average=500
I switch back and forth between the two often enough it would be really
nifty to show both at the same time. There seems to be enough space on the
bar to show.
Thanks again.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how show sum & avg same time in status bar?

Sandy/Ian

You can put this code once in the Thisworkbook module as such.........

Private Sub Workbook_SheetSelectionChange(ByVal Sh As _
Object, ByVal Target As Range)
Dim x As String
Application.DisplayStatusBar = True
On Error Resume Next
x = CStr("Sum=" & Application.WorksheetFunction.Sum(Selection) & " " & _
"Average=" & Application.WorksheetFunction.Average(Selection))
Application.StatusBar = x
End Sub

Will work on the active worksheet.


Gord Dibben MS Excel MVP


On 6 Oct 2006 11:02:20 -0700, "Sandy" wrote:

You'll need to put this in each sheet level to have it work through the
whole workbook.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show time stamp when a value is entered TVCCBJB Excel Discussion (Misc queries) 4 September 8th 06 10:29 PM
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 04:29 PM
Change to show time M Jones Excel Discussion (Misc queries) 2 June 2nd 05 12:16 AM
Show a time from one calculated cell as a decimal in another cell. KathyS Excel Worksheet Functions 1 January 20th 05 02:00 AM
How to show negative time (e.g. -10 hours) Arhippa Excel Worksheet Functions 3 January 19th 05 09:53 AM


All times are GMT +1. The time now is 01:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"