I am trying to highlight duplicate entries in a column in red. Below is my code for which myCell is a cell defined in the code by an input box. I am unfortunately getting a run time error 5 at the following part of my code.
Any suggestions:
Many Thanks
Any suggestions:
Code:
Range("myCell").EntireColumn.Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTIF(myCell.EntireColumn, (1, myCell.column))>1"
Selection.FormatConditions(1).Font.ColorIndex = 3
Many Thanks