Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default add xtra rows to before the subtotal rows.

I need to add 24 rows to each group in column "H" that are the same. It is
stopping
on the Do Until. My last row is 1442. I want it to stop there. I don't
know how to tell it to keep going until the end.
tia,

Private Sub PutARowIn()
Range("H12").Select
Do Until ActiveSheet.Rows.Value = 1442
If ActiveCell.Value = ActiveCell.Offset(-1, 0).Value Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Insert
ActiveCell.Offset(2, 0).Select
End If
Loop
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default add xtra rows to before the subtotal rows.

see repost

"Janis" wrote:

I need to add 24 rows to each group in column "H" that are the same. It is
stopping
on the Do Until. My last row is 1442. I want it to stop there. I don't
know how to tell it to keep going until the end.
tia,

Private Sub PutARowIn()
Range("H12").Select
Do Until ActiveSheet.Rows.Value = 1442
If ActiveCell.Value = ActiveCell.Offset(-1, 0).Value Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Insert
ActiveCell.Offset(2, 0).Select
End If
Loop
End Sub

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
Insert Rows vs SUM() and SUBTOTAL() TKS_Mark Excel Discussion (Misc queries) 0 October 7th 09 07:33 PM
Can you subtotal data in rows? hdf Excel Worksheet Functions 8 August 25th 08 09:35 PM
Format subtotal rows nihad[_2_] Excel Programming 2 January 11th 06 05:26 PM
using SUBTOTAL() on rows that have been hidden doco Excel Worksheet Functions 2 June 7th 05 07:18 PM
Hiding Rows within a Subtotal SharonInGa[_2_] Excel Programming 0 March 30th 05 07:35 PM


All times are GMT +1. The time now is 03:36 PM.

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"