Formatting rows when using Subtotals

DavidC

New Member
Joined
Mar 17, 2002
Messages
26
I am preparing a macro for a report that includes subtotals using the subtotal command. However, it is difficult to look at, Excel does a lousy job of formatting it. Is there a way to automatically format the subtotal rows, so that it separates the groups a bit more nicely? Perhaps just to change the color of the subtotal rows? Thanks!
 
I copied and pasted that exact code into my VBA editor and I am still only getting one row. Could you tell me what line in the code you wrote actually controls the row insert? I have tried to manipulate it several times so that it will add rows after the remaining subtotals, but I have been unsuccessful.

Your help is greatly appreciated.

Regards,

Larry
This message was edited by Larry on 2002-04-10 07:22
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
On 2002-04-10 07:21, Larry wrote:
I copied and pasted that exact code into my VBA editor and I am still only getting one row. Could you tell me what line in the code you wrote actually controls the row insert? I have tried to manipulate it several times so that it will add rows after the remaining subtotals, but I have been unsuccessful.

Your help is greatly appreciated.

Regards,

Larry
This message was edited by Larry on 2002-04-10 07:22


A row is inserted after each sub-total by the following line :-

.Offset(1, 0).Insert
 
Upvote 0
In what column do your sub-total headings appear?

Suggest that you re-post and ask someone to look at your workbook.
 
Upvote 0
My subtotals appear in column A.

Thanks for your help,

Larry
This message was edited by Larry on 2002-04-11 08:16
 
Upvote 0
Larry,

try conditional formatting

Highlight row 1

select conditional formatting and then "formula is"

enter : =right($A1,5)="Total"

then pick your formats and click "ok" out

copy the formatting down to the end of your data range

this should only format your lines with totals/subtotals in them

_________________
Hope this helps,
Chris
:)
This message was edited by Chris Davison on 2002-04-13 01:07
 
Upvote 0
Hello,

How to bring every subtotal figure to a new sheet at continuous rows ( meaning A1,A2,A3…) automatically?



Glass
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,377
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top