Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default IN A MACRO HOW CAN I INSERT BLANK LINES AFTER EACH PART NUMBER 3RD

TRI-MARK CORP 10 12423363-001
TRI-MARK CORP 11 12423363-001
TRI-MARK CORP 9 12423363-002
TRI-MARK CORP 10 12423363-002
TRI-MARK CORP 8 12423365
TRI-MARK CORP 9 12423365
TRI-MARK CORP 10 12423365
TRI-MARK CORP 10 12423362-003
TRI-MARK CORP 11 12423362-003
TRI-MARK CORP 12 12423362-003
TRI-MARK CORP 11 12423362-004
TRI-MARK CORP 12 12423362-004

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default IN A MACRO HOW CAN I INSERT BLANK LINES AFTER EACH PART NUMBER 3RD

Sub linin()
n = Cells(Rows.Count, "C").End(xlUp).Row
For i = n To 2 Step -1
If Cells(i, 3).Value < Cells(i - 1, 3).Value Then
Cells(i, 3).EntireRow.Insert
End If
Next
End Sub

--
Gary''s Student - gsnu200721
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
Auto insert of blank lines Robert Excel Discussion (Misc queries) 5 November 28th 07 10:32 PM
macro to insert blank line when lines sum to zero TCoats Excel Discussion (Misc queries) 0 July 2nd 07 05:08 PM
Macro not recognizing blank lines as blank pm Excel Discussion (Misc queries) 9 May 22nd 07 04:16 PM
Macro to insert blank lines Terry Pinnell Excel Discussion (Misc queries) 6 October 21st 05 11:21 PM
how to automatically insert blank lines in between non-blank lines No Name Excel Programming 2 November 17th 03 03:40 PM


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