|If you didn't change the code to look at Column D, then the code is going insert rows at every change in data in Column A.|
That's what I meant when I said "Assuming your data starts in A1, this should work."
I meant the "customer codes" when I said "data".
Since you didn't say where your "customer codes" were listed, the best I could do was offer generic code.
Try this for your specific situation:
'Determine length of data in column D
lastCode = Range("D" & Rows.Count).End(xlUp).Row
'Loop through range in Reverse order, inserting 2 Rows at each change
For nxtCode = lastCode To 6 Step -1
If Cells(nxtCode + 1, 4) <> Cells(nxtCode, 4) Then
Rows(nxtCode + 1 & ":" & nxtCode + 2).Insert
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.