I am looking for a Macro that will insert an entire row across a number of collumns when there is a change in one column's data.
Example:
A B C
1 X Y
2 X Z
3 Y A
Change into
A B C
1 X Y
2 X Z
3 Insert Blank Row
4 Y A
Hopefully this is clear.
I am looking for a Macro that will insert an entire row across a number of collumns when there is a change in one column's data.
Example:
A B C
1 X Y
2 X Z
3 Y A
Change into
A B C
1 X Y
2 X Z
3 Insert Blank Row
4 Y A
Hopefully this is clear.
Dear slepchen:
I do understand but a macro is very specific and I would need to know what this criteria is
How about:
![]()
Sub dural() n = Cells(Rows.Count, 1).End(xlUp).Row i = 2 LoopTop: If Cells(i, 1) <> Cells(i - 1, 1) Then Cells(i, 1).EntireRow.Insert n = Cells(Rows.Count, 1).End(xlUp).Row i = i + 1 End If i = i + 1 If i > n Then Exit Sub GoTo LoopTop End Sub
Gary's Student
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks