Match Values and Highlite row
Public Sub Hilite()
Dim LastRow As Long
Dim i As Long
With Worksheets("Sheet1")
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
For i = 1 To LastRow
If IsError(Application.Match(.Cells(i, "B").Value,
Worksheets("Sheet2").Columns(1),0) Then
.Cells(i, "B").Resize(,5).Interior.Colorindex = 38
End If
Next i
End Sub
--
__________________________________
HTH
Bob
"K" wrote in message
...
Hi all, I have list of 6 digit numbers in Column A of Sheet2 like see
below
A …….col
665544
564788
658977
457896
335566
789456
etc……..
I want macro which should match Sheet1 Range("B2:B100") values in
Sheet2 Column A values (as shown above) and if value match then do
nothing but the value which don’t match then macro should higlight
that value cell row in Sheet1 from row B to F. Please can any friend
can help
|