Custom function on toolbar

  • Thread starter Thread starter bb3
  • Start date Start date
B

bb3

I frequently need to calculate standard deviations (and standard
errors) in my spreadsheets. I can input the functions manually, but
wonder if it is possible to put a custom standard deviation button
(linked to a macro?) on the toolbar, thereby saving a lot of mouse
clicking. Since it is already done for the "SUM" function, I assume
it is possible to do with more complex formulas, but I can't figure
out how to program the selected cell range in the macro. I would
appreciate any advice.
 
Sub SetSel()
Dim cell As Range
For Each cell In Selection
cell.Formula = "your formula"
Next cell
End Sub

cell.row will give you the cell's row
cell.column will give you the cell's column
cell.address will give you the cell's address

Hope this helps, James
 
Back
Top