Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Insert blank row macro after a break in a group

Sub InsertRow_At_Change()
'Sandy Mann July 1st, 2007
Dim LastRow As Long
Dim X As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row 'assumes column A
Application.ScreenUpdating = False

For X = LastRow To 3 Step -1
If Cells(X, 1).Value < Cells(X - 1, 1).Value Then
If Cells(X, 1).Value < "" Then
If Cells(X - 1, 1).Value < "" Then
Cells(X, 1).entirerow.Insert Shift:=xlDown
End If
End If
End If
Next X
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 5 Nov 2009 10:01:02 -0800, Andy
wrote:

I want a blank row inserted in a list after the group breaks. Can anyone
supply me macro code to do this? Thanks.


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
macro to insert blank line when lines sum to zero TCoats Excel Discussion (Misc queries) 0 July 2nd 07 05:08 PM
Macro to copy previous row and insert two blank rows dd Excel Discussion (Misc queries) 1 April 30th 07 11:25 PM
Insert blank line macro laidebug Excel Worksheet Functions 1 April 14th 06 11:56 PM
Macro To Insert Blank Row? rtidrtid Excel Discussion (Misc queries) 1 February 3rd 06 03:00 PM
Macro to insert blank lines Terry Pinnell Excel Discussion (Misc queries) 6 October 21st 05 11:21 PM


All times are GMT +1. The time now is 02:46 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"