Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - SUM Function & Toolbar button

Status
Not open for further replies.

Fherrera

Technical User
Joined
May 11, 2004
Messages
129
Location
CA
Hi,

First, you know when you have a few numbers in excel in a column. ie:

1
2
3
4
5

If you select the cell below 5 and click the greek E in the toolbar for SUM(), it automatically enters the sum formula for those previous cells. But before it finalizes the formula it selects the cells and lets you change the range... Is there a way to duplicate this "selecting the range and let the user change it" before comitting the formula in VBA?

Second, is it possible to add a custom "commandbuttom" or anything to an already existing menu button. Like if i wanted to make an AutoAverage button and place it beside the SUM button in the already existing toolbar?

Thank you.
 
I guess it is possible to add any button to an already existing toolbar. Not a hard thing to do.. BUT, how does one add a listbox/command button combo in the form of a combobox might work? Similar to how you can type in/select the font name in the format toolbar, how do I add one of those?

Thanks
 
Take a look at the CommandBarControls.Add method for the named parameter Type (msoControlDropdown, msoControlComboBox,...)

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi Fherrera,

It would be possible to write an Auto-Average function which mimiced the Auto-Sum - although I'm not sure about previewing it - but I believe that the functionality is built-in in Excel XP. Do you need a reason to upgrade?

Incidentally the pedant in me obliges me to say that the 'Greek E' is a Greek S (sigma)

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Unfortunately not. I'm using Excel 97 :D And yes, IT IS sigma. I could not for the life of me remember. THanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top