Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Formatting a subtotal line with a macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Formatting a subtotal line with a macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Formatting a subtotal line with a macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotal To Include Item Description On Subtotal Line Tickfarmer Excel Discussion (Misc queries) 2 February 23rd 10 07:56 PM
Copy Cell From Subtotal Line To Detail Line Tickfarmer Excel Discussion (Misc queries) 2 November 5th 09 02:40 PM
sort macro, subtotal and add lines after subtotal David Excel Discussion (Misc queries) 1 August 29th 09 10:56 AM
ON SUBTOTAL LINE CARRY FORWARD DENOMINATOR FROM PREVIOUS LINE Pam M Excel Worksheet Functions 1 January 22nd 09 07:15 AM
How do you add a blank line automatically after the Subtotal line MVSD Guy Excel Worksheet Functions 0 April 20th 06 01:04 AM


All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"