When you use Cells(X,Y) to refer to a range, the X represents the row and the Y
represents the column.
And rows are numbered (1, 2, ..., 65536) and columns are usually lettered (A, B,
...., IV) <but there's a setting that can show numbers (1, 2, ..., 256).
And this won't work:
Rows("j:j").Select
But if you could use:
rows(j & ":" & j).select
or even
rows(j).select
But it's not necessary to select most things to work with them.
I wasn't sure what column contained the key value, so I guessed column A.
Try this against a copy of the worksheet.
Option Explicit
Sub testme()
Dim wks As Worksheet
Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long
Set wks = Worksheets("sheet1")
With wks
FirstRow = 2 'headers in 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For iRow = LastRow To FirstRow + 1 Step -1
If .Cells(iRow, "A").Value = .Cells(iRow - 1, "A").Value Then
'do nothing
Else
.Rows(iRow).Resize(2).Insert
.Rows(1).Copy _
Destination:=.Cells(iRow + 1, "A")
End If
Next iRow
End With
End Sub