PC Review


Reply
Thread Tools Rate Thread

add xtra rows to before the subtotal rows.

 
 
=?Utf-8?B?SmFuaXM=?=
Guest
Posts: n/a
 
      24th Sep 2007
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 With Quote
 
 
 
 
=?Utf-8?B?SmFuaXM=?=
Guest
Posts: n/a
 
      24th Sep 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you subtotal data in rows? hdf Microsoft Excel Worksheet Functions 8 25th Aug 2008 09:35 PM
Auto subtotal every 100 rows =?Utf-8?B?VGlmZmFueQ==?= Microsoft Excel Misc 3 20th Jun 2007 01:39 PM
Collapsing Subtotal Rows =?Utf-8?B?R2VhciRIZWFk?= Microsoft Excel Misc 0 24th Feb 2007 05:07 PM
How does one copy subtotal rows? A-B Microsoft Excel Discussion 2 13th Nov 2005 02:29 PM
using SUBTOTAL() on rows that have been hidden doco Microsoft Excel Worksheet Functions 2 7th Jun 2005 07:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 AM.