Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
RCF RCF is offline
external usenet poster
 
Posts: 1
Default EXCEL 2003 - SUBTOTALS

After using the subtotal command, I want to format the spreadsheet by
inserting blank lines before and after each subtotal and grand total. How
can I do this without manually inserting blank lines; or how can I create a
template with blank lines inserted after each subtotal?
--
RCF
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default EXCEL 2003 - SUBTOTALS

Does this work for you?

Option Compare Text
Sub insert_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "C").Value Like "*Total*" Then 'edit "C" to suit
Rows(RowNdx + 1).EntireRow.Insert
Rows(RowNdx).EntireRow.Insert
End If
Next RowNdx
End Sub


Gord Dibben MS Excel MVP

On Thu, 25 Mar 2010 08:34:02 -0700, RCF
wrote:

After using the subtotal command, I want to format the spreadsheet by
inserting blank lines before and after each subtotal and grand total. How
can I do this without manually inserting blank lines; or how can I create a
template with blank lines inserted after each subtotal?


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
Excel 2003 Subtotals Dan Excel Discussion (Misc queries) 1 September 4th 08 07:44 PM
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) AndyCotgreave Excel Discussion (Misc queries) 3 October 24th 07 11:32 AM
Subtotals in Excel 2003 GARY Excel Discussion (Misc queries) 0 March 8th 07 12:50 AM
Subtotals in Excel 2003 GARY Excel Discussion (Misc queries) 1 March 7th 07 11:37 PM
Subtotals in Excel 2003 GARY Excel Discussion (Misc queries) 0 March 7th 07 10:46 PM


All times are GMT +1. The time now is 05:31 AM.

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

About Us

"It's about Microsoft Excel"