Insert Row when data is different

  • Thread starter Thread starter tratliff
  • Start date Start date
T

tratliff

I have a range of @ 8000 rows. This range contains data for differen
customers. Each customer can and will appear on more than one row.

What i want is to insert 6 blank rows when a new customer begins.

Hope this makes sense!

Please help!!

Thanks.

Tiffan
 
Tiffany

Sub InsertRow_At_Change()
Dim i As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i - 1, 1) <> Cells(i, 1) Then _
Cells(i, 1).Resize(6, 1).EntireRow.Insert
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub


Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top