Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I create a macro to auto insert rows?
I have a 1000+ list and i want to enter a blank row after each entry that
does not equal the prior one. The repeated entries are not evenly spaced. Can a macro look at a value, determine if it's equal to the prior, and if not, insert a row? thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I create a macro to auto insert rows?
Try this:
Sub Macro1() For i = 1 To 40 j = i + 1 If Not (Cells(i, 1) = Cells(j, 1)) Then Rows(j).Select Selection.Insert i = i + 1 End If Next End Sub -- Gary''s Student "aashish" wrote: I have a 1000+ list and i want to enter a blank row after each entry that does not equal the prior one. The repeated entries are not evenly spaced. Can a macro look at a value, determine if it's equal to the prior, and if not, insert a row? thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert rows based on specific value | Excel Worksheet Functions | |||
Vb macro stops when I try to create more than 89 charts | Charts and Charting in Excel | |||
Macro Help In Excel | Excel Discussion (Misc queries) | |||
Insert rows | Excel Worksheet Functions | |||
How do I insert the date using a macro | Excel Discussion (Misc queries) |