Hi,
I've been given this VBA to highlight new database codes added to a list... I also want it to add move the cells to right down, if that makes sense.
I've attached a before and after example.
[VBA]Private Sub CommandButton2_Click()
Range("E5").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
LRA = Cells(Rows.Count, "D").End(xlUp).Row
LRB = Cells(Rows.Count, "E").End(xlUp).Row
j = 3 '
For i = 3 To LRB
comp = Application.Match(Range("e" & i), Range("D3" & LRA), 0)
If IsError(comp) Then Range("e" & i).Interior.ColorIndex = 6
Next i
End With
End Sub[/VBA]