Hi
Just started on VBA and I need to compare 2 cells on the same row (adjacent) in the two columns (column names: "Title" and "Author")
The only real difference is if both cells contain the SAME letters then, for the Author column, I want to clear the contents where there is a match, then continue on to compare the next row and complete the same action.
Note:Its similar in nature to mtt23's thread on VBA Code - Compare Adjacent Cells In two columns
Sub hide_cs()
Dim n As Long
n = 17 ' Started from row 17
Do While Rows(n).Columns("K").Value <> ""
If InStr(ucase(Rows(n).Columns("K").Value), "C") > 0 And InStr(ucase(Rows(n).Columns("L").Value), "C") > 0 Then Rows(n).EntireRow.Hidden = True
n = n + 1
Loop
End Sub
I've attached a sample file. Any Suggestions welcome!
Bookmarks