Guzzlr
Well-known Member
- Joined
- Apr 20, 2009
- Messages
- 982
- Office Version
- 2021
- Platform
- Windows
Code:
'********** Step Through Rows Backwards *****************
lastrow = Cells(Rows.Count, "C").End(xlUp).Row
For myrow = lastrow To 6 Step -1
Columns("B:C").Select
Selection.FormatConditions.AddUniqueValues
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).DupeUnique = xlDuplicate
With Selection.FormatConditions(1).Font
.Color = 0
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Next myrow
Hello All.
I'm attempting to find matching numbers and highlight them in columns B&C. The code above I used the recorder, which is working, but does not seem like an efficient way. I feel if the numbers in column C extended a long way down, the code would take a long time to run, It appears this way, the program is running one line at a time, finds a matching number, and then starts all the way down at the bottom again to find another set of matching numbers.
Is there a better way to do this?
Thanks for the help