Thread
:
Macro to insert blank lines
View Single Post
#
2
Don Guillett
Posts: n/a
Macro to insert blank lines
try
Sub InsertRow()
For i = cells(rows.count,"a").End(xlUp).Row To 2 Step -1
If Cells(i, 1).Value < Cells(i - 1, 1).Value Then
Rows(i).Insert
End If
Next
End Sub
--
Don Guillett
SalesAid Software
"Terry Pinnell" wrote in message
...
I wonder if anyone already has a macro for the following operation I
perform quite often please? I insert blank lines in a long table
whenever a particular column changes. A typical example is in a list
containing a Year column, sorted by Year. It improves readability to
add a blank line between the 1972 and 1973 sections, 1973 and
1974...etc.
--
Terry, West Sussex, UK
Reply With Quote