I'm looking for something that is able to start searching in row 9 of column C for cells that do not equal cells 2 rows below. E.g. C9 <> C11, C10 <> C12, etc. Then Copy a cell from another sheet and paste it into Column A in the same row where there was the first discrepancy. E.G. if C9 <> C11, then paste from Sheet2 into A11. The purpose is to insert a new header after already formatting and sorting the data, below is one of the many variations I have tried, receiving only errors or blank inputs.
Any help would be greatly appreciated.
Dim iRow2 As Integer, iCol2 As Integer, iRow3 As Integer, iCol3 As Integer
Dim oRng2 As Range
Dim oRng3 As Range
Dim qqq As Range
Set oRng2 = Range("C9:C80")
Set oRng3 = Range("A9:A80")
iCol2 = oRng2.Column
iCol3 = oRng3.Column
For Each qqq In oRng2
Do
If qqq.Cells(oRng2, 3) <> qqq.Cells(oRng2 + 2, 3) Then
ThisWorkbook.Worksheets("Sheet1").Range("N1").Copy Destination = Sheets("Sheet2").Range(oRng2 + 2, 1)
End If
Loop While Not Cells(iRow2, iCol2).Text = ""
Next