View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Zone Zone is offline
external usenet poster
 
Posts: 269
Default Insert lines at each change in value

Lisa, How about this? Copy the sub into a standard module and run it.
It assumes you want to work with the active worksheet. It also
assumes that your property numbers are in column A and that you don't
want to look any higher than row 2. HTH, James

Sub InsertAtChange()
Dim r As Long
For r = Cells(65536, "a").End(xlUp).Row To 3 Step -1
If Cells(r, "a") < "" And Cells(r, "a") < Cells(r - 1, "a")
Then
Rows(r).EntireRow.Insert
End If
Next r
End Sub

LisaVH wrote:
I need to insert a line at each change in "property Number" in a very long
list of data. Can I set it up to automatically insert a line at each change
(like subtotal, but without the subtotal data)?