i have lots of data in column a and i want to check for duplicates. what code would i need to use so that everytime a duplicate is found it turns the cell red
i have lots of data in column a and i want to check for duplicates. what code would i need to use so that everytime a duplicate is found it turns the cell red
Will this work for you.
Sub hsv() Dim cl As Range For Each cl In Columns(1).SpecialCells(2) If WorksheetFunction.CountIf(Columns(1), cl) > 1 Then cl.Interior.ColorIndex = 3 Next cl End Sub
Kind regards, Harry.
Use in Conditional formattin: =COUNTIF($A$1:$A$1000, $A1)>1
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks