Formatting a subtotal line with a macro
Record a macro when you
show only the subtotals that you want to see/format.
Then select that range
edit|goto (or hit F5 or ctrl-g)
Special|visible cells only
and change the format
Stop recording.
DJDKAL wrote:
This is what I've got.....
Sub sort_and_subtotal_quantities()
'
' sort_and_subtotal_quantities Macro
' Macro recorded 11/16/2009 by Daniel Kalfayan
'
' Keyboard Shortcut: Ctrl+q
'
Application.Goto Reference:="DATA"
Selection.Sort Key1:=Range("B5"), Order1:=xlAscending, Key2:=Range("A5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5, 8), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Range("A2").Select
End Sub
I would like to format the subtotal line to be bold and highlighted yellow
with a bigger font......how do i go about doing that?
"Per Jessen" wrote:
Hi
Look at this:
ActiveCell.Font.Bold = True
Regards,
Per
"DJDKAL" skrev i meddelelsen
...
I already have in use a macro that runs a sort and subtutal function. I
would like to format the subtotal row using visual basic since there is
already a macro in place.
.
--
Dave Peterson
|