If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. 


Thread Tools  Display Modes 
#1




Insert lines at each change in value
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)? 
Ads 
#2




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)? 
#3




Insert lines at each change in value
Thank You!
"Zone" wrote: > 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)? > > 
#4




Insert lines at each change in value
Glad it worked for you. James
LisaVH wrote: > Thank You! > > "Zone" wrote: > > > 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)? > > > > 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Automatically Insert DATE, so that DATE will NOT change  Cie  Excel Worksheet Functions  4  April 4th 05 05:51 PM 
Make default insert sheet to have grid lines  Bruce Roberson  New Users to Excel  4  January 20th 05 01:27 AM 
insert a space in a phone #. change (123)4567890 to (123) 45678  leo  Excel Worksheet Functions  6  January 15th 05 02:57 AM 
How do I change the default color of the tag for insert c...  [email protected]  Excel Discussion (Misc queries)  1  December 18th 04 12:01 AM 
How do I change the default color of the tag for insert c...  ntwrkengnr  Excel Discussion (Misc queries)  1  December 17th 04 07:34 PM 