Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
need help creating "AutoSubtotal" toolbar button
Similar to how the AutoSum toolbar button enters a =SUM formula into a
cell, I'm trying to create an "AutoSubtotal" button that would enter a =SUBTOTAL formula into a cell. (I'm not trying to do DataSubtotal. I just want to enter a =SUBTOTAL formula into the cell.) I thought this would work, but it doesn't. Any help would be greatly appreciated. Sub AutoSubtotal() If ActiveCell.Offset(-1, 0).Formula = "" Then End Else ActiveCell.Formula = "=subtotal(9," & _ Range(ActiveCell.Offset(-1, 0).End(xlUp), _ ActiveCell.Offset(-1, 0)) & ")" End If End Sub (I need the cell to actually contain a formula, so I can't use WorksheetFunction.) Many thanks, Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
toolbar "button" for hiding/unhiding sheets | Excel Worksheet Functions | |||
Creating a "Next" button to move the user to the next sheet | Excel Discussion (Misc queries) | |||
Diff. change headline in "Formatting" or "Outlining" toolbar? | Excel Discussion (Misc queries) | |||
Add "Equation 3.0" button to Excel toolbar. | Setting up and Configuration of Excel | |||
Any way to use toolbar button to delete cells and move cells "up"? | Excel Discussion (Misc queries) |