question1.png
Hello everyone
! Im new to excel MACRO and working on a project.
I need to highlight "expired" names that are not duplicates. How can I tell my code to highlight non duplicate "expired" names?
In the example above, I DO NOT want Lauren highlighted because she is a duplicate.
Sub Test2()
Dim count, i As Long
count = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
i = 2
Do While i <= count
If Cells(i, 3).Value Like "Expired" Then
Range(Cells(i, 1), Cells(i, 5)).Interior.Color = RGB(230, 98, 76)
ElseIf Cells(i, 3).Value Like "New" Then
Range(Cells(i, 1), Cells(i, 5)).Interior.Color = RGB(118, 234, 62)
End If
i = i + 1
Loop
End Sub
Bookmarks