Hello and thanks for helping
I am trying to change the color of a cell in a column
to yellow if it is has duplicate data.
That part is done
HOWEVER
I want to don't want to change the color of any cell,
in that column, if it says "Monday"
so I guess all cells in a column with duplicate data,
Except cells with "Monday",
the cells should change to yellow
This is the code I have been using, and would like to adapt
Thanks again for helping
Thomas
I am trying to change the color of a cell in a column
to yellow if it is has duplicate data.
That part is done
HOWEVER
I want to don't want to change the color of any cell,
in that column, if it says "Monday"
so I guess all cells in a column with duplicate data,
Except cells with "Monday",
the cells should change to yellow
This is the code I have been using, and would like to adapt
Code:
Sub sbFindDuplicatesInColumn()
Dim lastRow As Long
Dim matchFoundIndex As Long
Dim iCntr As Long
lastRow = Range("F65000").End(xlUp).Row
For iCntr = 1 To lastRow
If Cells(iCntr, 3) <> "" Then
matchFoundIndex = WorksheetFunction.Match(Cells(iCntr, 3), Range("c1:c" & lastRow), 0)
' need something here to Don't do anything if the cells says Monday
If iCntr <> matchFoundIndex Then
Cells(iCntr, 3).Interior.ColorIndex = 6
End If
End If
Next
Thanks again for helping
Thomas