![]() |
How do I automatically format subtotals in excel?
On the Data menu, I use the "Subtotal" tool frequently. However, in order to
make the subtotals "pop out" from the rest of the date when I print out the worksheet, I have to manually select and bold each subtotal row. Isn't there a way to somehow format the subtotal rows automatically? |
How about just a little work???
Use the outlining symbols to the left to show just the subtotal rows. Select those rows Edit|goto|Special|visible cells only format to your heart's content. Pcodding wrote: On the Data menu, I use the "Subtotal" tool frequently. However, in order to make the subtotals "pop out" from the rest of the date when I print out the worksheet, I have to manually select and bold each subtotal row. Isn't there a way to somehow format the subtotal rows automatically? -- Dave Peterson |
Or assuming your subtotal titles are in Col A, then select whole sheet and
do Format / Conditional Formatting, change cell value is to formula is and use =RIGHT($A1,5)="Total" then select Bold in the dialog box. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "Dave Peterson" wrote in message ... How about just a little work??? Use the outlining symbols to the left to show just the subtotal rows. Select those rows Edit|goto|Special|visible cells only format to your heart's content. Pcodding wrote: On the Data menu, I use the "Subtotal" tool frequently. However, in order to make the subtotals "pop out" from the rest of the date when I print out the worksheet, I have to manually select and bold each subtotal row. Isn't there a way to somehow format the subtotal rows automatically? -- Dave Peterson |
or if you need more extensive formating, the following changes Subtotals to
12pt Arial Bold, left aligned below a continuous medium line. Sub format_subtotals() Subtotal_column=6 For rowindex = 1 To ActiveSheet.UsedRange.Rows.Count If Cells(rowindex, subtotal_column).HasFormula = True Then 'row contains a subtotal so format it With Range(Cells(rowindex, 1), Cells(rowindex, subtotal_column)) .Borders(xlEdgeTop).LineStyle = xlContinuous .Borders(xlEdgeTop).Weight = xlMedium .Borders(xlEdgeTop).ColorIndex = xlAutomatic .Font.Bold = True .Font.Name = "Arial" .Font.Size = 12 .HorizontalAlignment = xlLeft End With Else 'do nothing End If Next rowindex Columns(subtotal_column).AutoFit Columns(subtotal_column).HorizontalAlignment = xlRight End Sub "Ken Wright" wrote in message ... Or assuming your subtotal titles are in Col A, then select whole sheet and do Format / Conditional Formatting, change cell value is to formula is and use =RIGHT($A1,5)="Total" then select Bold in the dialog box. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 -------------------------------------------------------------------------- -- It's easier to beg forgiveness than ask permission :-) -------------------------------------------------------------------------- -- "Dave Peterson" wrote in message ... How about just a little work??? Use the outlining symbols to the left to show just the subtotal rows. Select those rows Edit|goto|Special|visible cells only format to your heart's content. Pcodding wrote: On the Data menu, I use the "Subtotal" tool frequently. However, in order to make the subtotals "pop out" from the rest of the date when I print out the worksheet, I have to manually select and bold each subtotal row. Isn't there a way to somehow format the subtotal rows automatically? -- Dave Peterson |
All times are GMT +1. The time now is 08:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com