Subtotal Function

S

Steven

I would like to start the function:
=Subtotal(9,
and then have the system wait for my highlighting of the cells and then I
hit ENTER and it will accept the formula.

Is that possible?

Thank you,

Steven
 
R

Rick Rothstein

??? Excel works that way now (at least on my XL2003 version)... right after
you type the comma, just click/drag the range you want and then hit the
Enter key.
 
S

Steven

I want to do it in a macro and set a shortcut key so I do not actually have
to type the: =Subtotal(9,

I just want to hit the shortcut key and then highlight ....... and hit ENTER.

Thank you
 
R

Rick Rothstein

Perhaps this will suffice instead...

Dim R As Range
Set R = Application.InputBox("Select a range to subtotal..", Type:=8)
ActiveCell.Formula = "=SUBTOTAL(9," & R.Address & ")"
 
S

Steven

Thank you very much. It seems like a little thing but I am so tired of
typing =Subtotal(9,.........) and I do not like using =Sum() that much
anymore. This will save me 5 seconds each time I have to use an =Subtotal()
and will trememdous brain stress. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top