how can i shorten up a range with usedrange in a range? or how to properly use last row used xlup? something like:
set source = range ("E3:E4000").usedrange or set source = range ("E3").end.xlup
set source = range ("E3:E4000").usedrange or set source = range ("E3").end.xlup
Code:
Set source = Range("E3:E4000")
source.Interior.Color = xlNone
For Each cell In source
If Application.WorksheetFunction.CountIf(source, cell) > 1 Then
cell.Interior.Color = RGB(255, 0, 0)
cell.Offset(0, -1).Interior.Color = RGB(255, 0, 0)
cell.Offset(0, -2).Interior.Color = RGB(255, 0, 0)