Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Add Average Function to a toolbar with an exclusive icon?

A student recently asked if the AVERAGE function could be added to the
toolbar as am icon.
This was a good question. I am familiar with customizing toolbars. Also, I
know in the newer Excel versions that the AutoSum icon has the varioius
function listed in the dropdown box.
She wanted to add an icon similar to the AutoSum button that she could
exclusively use for the AVERAGE function. I did not see where this was
possible.

Is this possible? Thanks in advance for any assistance.
Jugglertwo


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Add Average Function to a toolbar with an exclusive icon?

Never have found such a button.

User could assign a macro to a button if the Autosom dropdown is too unwieldy.

Sub Average_Range()
Set rng = Selection
Set rng1 = rng.Offset(rng.Rows.Count, 0).Resize(1, 1)
rng1.Formula = "=Average(" & rng.Address & ")"
End Sub


Gord Dibben MS Excel MVP

On Mon, 2 Apr 2007 19:02:09 -0700, Jugglertwo
wrote:

A student recently asked if the AVERAGE function could be added to the
toolbar as am icon.
This was a good question. I am familiar with customizing toolbars. Also, I
know in the newer Excel versions that the AutoSum icon has the varioius
function listed in the dropdown box.
She wanted to add an icon similar to the AutoSum button that she could
exclusively use for the AVERAGE function. I did not see where this was
possible.

Is this possible? Thanks in advance for any assistance.
Jugglertwo


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Add Average Function to a toolbar with an exclusive icon?

How about if you wanted the average to appear in the cell of your choice, to
more or less emulate the Autosum average functionality, instead of:

Set rng1 = rng.Offset(rng.Rows.Count, 0).Resize(1, 1)

For example, you select a cell then click AutosumAverage. You're then able
to select the range to average.

Personally, I think going through Autosum is sufficient but I'm just
curious.

Biff

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Never have found such a button.

User could assign a macro to a button if the Autosom dropdown is too
unwieldy.

Sub Average_Range()
Set rng = Selection
Set rng1 = rng.Offset(rng.Rows.Count, 0).Resize(1, 1)
rng1.Formula = "=Average(" & rng.Address & ")"
End Sub


Gord Dibben MS Excel MVP

On Mon, 2 Apr 2007 19:02:09 -0700, Jugglertwo
wrote:

A student recently asked if the AVERAGE function could be added to the
toolbar as am icon.
This was a good question. I am familiar with customizing toolbars. Also, I
know in the newer Excel versions that the AutoSum icon has the varioius
function listed in the dropdown box.
She wanted to add an icon similar to the AutoSum button that she could
exclusively use for the AVERAGE function. I did not see where this was
possible.

Is this possible? Thanks in advance for any assistance.
Jugglertwo




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Add Average Function to a toolbar with an exclusive icon?

Sub Average_Range()
Dim i As Long
Dim rng As Range
For i = ActiveCell.Row To 1 Step -1
If Cells(i, ActiveCell.Column).Value = "" Then
i = i + 1
Exit For
End If
Next i
Set rng = Range(Cells(i, ActiveCell.Column), ActiveCell.Offset(-1, 0))
ActiveCell.Formula = "=Average(" & rng.Address(False, False) & ")"
End Sub


--
HTH

Bob

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

"T. Valko" wrote in message
...
How about if you wanted the average to appear in the cell of your choice,
to more or less emulate the Autosum average functionality, instead of:

Set rng1 = rng.Offset(rng.Rows.Count, 0).Resize(1, 1)

For example, you select a cell then click AutosumAverage. You're then
able to select the range to average.

Personally, I think going through Autosum is sufficient but I'm just
curious.

Biff

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Never have found such a button.

User could assign a macro to a button if the Autosom dropdown is too
unwieldy.

Sub Average_Range()
Set rng = Selection
Set rng1 = rng.Offset(rng.Rows.Count, 0).Resize(1, 1)
rng1.Formula = "=Average(" & rng.Address & ")"
End Sub


Gord Dibben MS Excel MVP

On Mon, 2 Apr 2007 19:02:09 -0700, Jugglertwo
wrote:

A student recently asked if the AVERAGE function could be added to the
toolbar as am icon.
This was a good question. I am familiar with customizing toolbars. Also,
I
know in the newer Excel versions that the AutoSum icon has the varioius
function listed in the dropdown box.
She wanted to add an icon similar to the AutoSum button that she could
exclusively use for the AVERAGE function. I did not see where this was
possible.

Is this possible? Thanks in advance for any assistance.
Jugglertwo






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
How can I add an icon to the toolbar to resize a spreasheet? Linds Excel Discussion (Misc queries) 2 September 7th 06 11:00 PM
Disappearing toolbar icon Slam Excel Discussion (Misc queries) 0 July 6th 06 02:54 PM
toolbar icon description Michael Abraham New Users to Excel 1 February 19th 06 03:18 PM
Odd toolbar icon behaviour Bernard Liengme Excel Discussion (Misc queries) 0 February 22nd 05 09:28 PM
Fax Icon on my File menu and toolbar Timsr Excel Discussion (Misc queries) 1 December 10th 04 12:09 AM


All times are GMT +1. The time now is 09:48 AM.

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"