I have a subtotal Macro that I have created for a subtotal function on my ToolBar Menu (thanks to texasalynn) as follows:
Sub AutoSubtotal_Formula()
Dim x As String
Dim y As String
x = ActiveCell.Offset(-1, 0).End(xlUp).Address
y = ActiveCell.Offset(-1, 0).Address
ActiveCell = "=SUBTOTAL(9," & x & ":" & y & ")"
End Sub
Is it possible to adjust this macro to input in Active Cell the same as above: ActiveCell = "=SUBTOTAL(9," & x & ":" & y & ")"
BUT can I have the Macro leave the cursor in the range criteria, thus I need the macro to input ="=SUBTOTAL(9,)" and leave the cursor in between the comma and ending ) * would this allow me to select my range everytime I used the Subtotal Function from my ToolBar much similar to the Auto Sum Function?
Any advice or Help would be much appreciated
Thanks in Advance,
"SEEN"
Sub AutoSubtotal_Formula()
Dim x As String
Dim y As String
x = ActiveCell.Offset(-1, 0).End(xlUp).Address
y = ActiveCell.Offset(-1, 0).Address
ActiveCell = "=SUBTOTAL(9," & x & ":" & y & ")"
End Sub
Is it possible to adjust this macro to input in Active Cell the same as above: ActiveCell = "=SUBTOTAL(9," & x & ":" & y & ")"
BUT can I have the Macro leave the cursor in the range criteria, thus I need the macro to input ="=SUBTOTAL(9,)" and leave the cursor in between the comma and ending ) * would this allow me to select my range everytime I used the Subtotal Function from my ToolBar much similar to the Auto Sum Function?
Any advice or Help would be much appreciated
Thanks in Advance,
"SEEN"