ARUNCHENNAI
Board Regular
- Joined
- Apr 24, 2017
- Messages
- 66
I want to highlight the duplicate row & strike the contents.
What to modify in the below code, to get the result
Thanks in advance.
Arun
What to modify in the below code, to get the result
Code:
Dim ma As Workbook
Dim mas As Worksheet
Sub test()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Set Master File
Set ma = ThisWorkbook
Set mas = ma.Worksheets("Master_Dept")
Dim myrng, mycel, c_rng As Range
Set myrng = mas.Range("G8:G500")
For Each mycel In myrng
If WorksheetFunction.CountIf(myrng, mycel.Value) > 1 Then
mycel.Interior.ColorIndex = 3
End If
Next mycel
End Sub
Thanks in advance.
Arun