J
Juan
I frequently use this function: "=subtotal(9,[range address of cells to be
subtotaled])". This takes 13 keystrokes, not counting the range, which I
usually enter with the mouse.
What I need is a macro that will enter this: "=subtotal(9," and then
let me provide the range (with the mouse or the keyboard) and the closing
")".
I tried this subprocedure: ActiveCell.Formula = "=subtotal(9,". But that
produces an error.
The most workable solution that I've found is this: ActiveCell.Formula =
"=subtotal(9,x)"
Then, when this macro puts this into a cell, I edit the cell (F2), backspace
out the ")" and the "x", and then use the mouse to enter the actual range and
the ")". This is about 6 keystrokes (including the shortcut CTRL + S to run
the macro). That's better than 13 key strokes, but it would be even better
if the macro would start the function and just leave it for me to enter the
range.
Surely, there's a way to do it. But I don't know what it is.
Juan C.
subtotaled])". This takes 13 keystrokes, not counting the range, which I
usually enter with the mouse.
What I need is a macro that will enter this: "=subtotal(9," and then
let me provide the range (with the mouse or the keyboard) and the closing
")".
I tried this subprocedure: ActiveCell.Formula = "=subtotal(9,". But that
produces an error.
The most workable solution that I've found is this: ActiveCell.Formula =
"=subtotal(9,x)"
Then, when this macro puts this into a cell, I edit the cell (F2), backspace
out the ")" and the "x", and then use the mouse to enter the actual range and
the ")". This is about 6 keystrokes (including the shortcut CTRL + S to run
the macro). That's better than 13 key strokes, but it would be even better
if the macro would start the function and just leave it for me to enter the
range.
Surely, there's a way to do it. But I don't know what it is.
Juan C.