Hi everyone
I've spent most of today trying to upload my file so have now given up! I will keep going as I was before!
Below is the code that inserts 6 rows when the data in column B changes. I now need to insert a further two when the data in column C changes
Sub insertblankrow()
Dim fr As Long
Dim i As Long
fr = Cells(Rows.Count, 3).End(xlUp).Row
For i = fr To 2 Step -1
If Cells(i, 2).Value <> Cells(i - 1, 2).Value Then
Rows(i).Insert
Rows(i).Insert
Rows(i).Insert
Rows(i).Insert
Rows(i).Insert
Rows(i).Insert
End If
Next i
End Sub
This is the code (below) I was given but I think it doesn't work because of the pre existing blank rows created during the last macro. I get an error to do with If block.
If Cells(i, 2).Value <> Cells(i - 1, 2).Value Then Rows(i & ":" & i + 1).Insert
OMG have managed to upload attachment - have deleted most of it so suspect it was size causing probs. I hope this helps to understand my query.
I've included the steps I'm using to approach this (not sure if they're clear with most of the w/book missing) and would be grateful if someone could check them over, just in case I'm living in cloud cuckoo land!
Thanks again in anticipation!
Bookmarks