I have a spreadsheet with 25 columns and 811 rows. The values in column "AA" are numeric and indicate a group ID of all possible duplicate records. I need to insert a blank row after each unique value in column "AA". Any suggestions?
Thanks.
Printable View
I have a spreadsheet with 25 columns and 811 rows. The values in column "AA" are numeric and indicate a group ID of all possible duplicate records. I need to insert a blank row after each unique value in column "AA". Any suggestions?
Thanks.
attach please a small sample file with data and desired result
Code:Sub Insert_Rows_after_groups()
For i = Cells(Rows.Count, "AA").End(xlUp).Row To 2 Step -1
If Cells(i - 1, "AA") <> Cells(i, "AA") Then Cells(i, 1).EntireRow.Insert
Next i
End Sub
Sample file attached. Test Tab= data that needs the blank rows inserted. Test result Tab = data with blank rows following groups of unique values in column AA.
missing "<>" in mancubus code
Code:Sub Insert_Rows_after_groups()
For i = Cells(Rows.Count, "AA").End(xlUp).Row To 2 Step -1
If Cells(i - 1, "AA") <> Cells(i, "AA") Then Cells(i, 1).EntireRow.Insert
Next i
End Sub
Works beautifully! Thank you so very much.
you are welcome.would you mind marking the thread as solved from "thread tools"?
Absolutely! Thanks again.