I have a column of cells in one worksheet I want to verify against a column in another worksheet.
If there is a match, then I would like to add a comment.
However, when I try running the code, it does not add the comment as intended.
Comments highly appreciated!
Sub Checktabfour()
Dim i As Long
Dim j As Long
Dim k As Long
j = Sheets(5).Range("C" & Rows.Count).End(xlUp).Row
k = Sheets(4).Range("B" & Rows.Count).End(xlUp).Row
For i = 9 To k
If Cells(i, "B").Value <> "" And Cells(i, "B").Value = Sheets(5).Range("C" & j).Value Then
Cells(i, "D").Value = "Yes"
End If
Next i
End Sub