Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Subtotal To Include Item Description On Subtotal Line | Excel Discussion (Misc queries) | |||
Copy Cell From Subtotal Line To Detail Line | Excel Discussion (Misc queries) | |||
sort macro, subtotal and add lines after subtotal | Excel Discussion (Misc queries) | |||
ON SUBTOTAL LINE CARRY FORWARD DENOMINATOR FROM PREVIOUS LINE | Excel Worksheet Functions | |||
How do you add a blank line automatically after the Subtotal line | Excel Worksheet Functions |