Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default add rows

Hi

Try the following macro

Sub insertblankrows()
Dim i As Long, lr As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = lr To 2 Step -1
If Cells(i, 1) < Cells(i - 1, 1) Then
Rows(i).Insert
i = i - 1
End If
Next i
End Sub


Copy the Code above
Alt+F11 to invoke the VB Editor
InsertModule
Paste code into white pane that appears
Alt+F11 to return to Excel

To use
Select sheet containing the PT's
Highlight the macro name
Run


--
Regards
Roger Govier

"REGENT" wrote in message
...
What function can I use to add a row to a large spreadsheet at each change
in
a value of a specified column

Desperate - the manual process is overwhelming.
--
REGENT




 
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
Counting characters in multiple rows when rows meet specific criteria news.virginmedia.com Excel Worksheet Functions 3 June 28th 08 09:03 PM
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 13th 07 11:05 PM
How do I view the maximum rows in Excel 2007 (Million Rows)? shanth Excel Discussion (Misc queries) 2 January 15th 07 05:45 PM
Excel 2003 -Rows hidden. Scrolling unhides rows ! How do I stop th Excellent1975 Excel Discussion (Misc queries) 0 June 21st 06 08:01 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM


All times are GMT +1. The time now is 02:28 PM.

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

About Us

"It's about Microsoft Excel"