rpaulson
Well-known Member
- Joined
- Oct 4, 2007
- Messages
- 1,428
I know I can do this with CF, but CF wont work because when I paste to HMTL I loose formatting.
Trying to Highlite Duplicates in Range via VBA.
Thanks for looking,
Ross
Trying to Highlite Duplicates in Range via VBA.
Code:
For r = 5 To 10
myRange = Range(Cells(r, "D"), Cells(r, "H"))
For Each cell In myRange
If WorksheetFunction.CountIf(myRange, cell.Value) > 1 Then cell.Interior.ColorIndex = 6
Next cell
Next r
Thanks for looking,
Ross