Hi Ket,
No sorry I don't think it is possible to save the extra mouse click
without using code.
However, if you want to use code, you could put the following in you
personal.xls file & assign it to a toolbar button:
(I have just adapted this from a recorded macro & have not inserted an
error checking so it is not bullet proof)
Sub InsertSubtotal()
Application.ScreenUpdating = False
Dim SubTotalCell As Range
Set SubTotalCell = ActiveCell
Dim SubTotalRange As String
SubTotalCell.End(xlUp).Select
SubTotalRange = Range(Selection, Selection.End(xlUp)).Address
With SubTotalCell
.Value = "=SUBTOTAL(9," & SubTotalRange & ")"
.Style = "Comma"
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
End With
.Columns.AutoFit
End With
SubTotalCell.Select
Application.ScreenUpdating = True
End Sub
To add this to a toolbar button:
[alt + t + c], choose the Commands tab, select the Macros category
click & drag the "custom button" onto one of your toolbars (eg next t
the sum button), right click on the new button, choose "assign macro"
select "insertsubtotal" from the list.
Nb: this is just a simple version which subtotals all continuous dat
in the same column above the active cell.
btw, thanks for your request as I've been meaning to put something lik
this together for myself but have never got around to it until now!
hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience..