please i need some help with this code below
Dim i As Integer Dim lrow As Long Dim x As Integer
Sheet4.Activate lrow = Sheet4.Range("A" & Rows.count).End(xlUp).Row
For i = 2 To lrow
Cells(i, 1).Activate x = Application.VLookup(ActiveCell.Offset(0, 0).Value, Worksheets(2).Range("A16:B25"), 2, False) If x <> Cells(i, 2).Value Then Cells(i, 2).Interior.Color = RGB(255, 0, 0) Else End If Next i
i have cells to look for in sheet4 and lookup table is in sheet2 range Range("A16:B25")
when i run this code it keeps saying mismatch error
please help
Dim i As Integer Dim lrow As Long Dim x As Integer
Sheet4.Activate lrow = Sheet4.Range("A" & Rows.count).End(xlUp).Row
For i = 2 To lrow
Cells(i, 1).Activate x = Application.VLookup(ActiveCell.Offset(0, 0).Value, Worksheets(2).Range("A16:B25"), 2, False) If x <> Cells(i, 2).Value Then Cells(i, 2).Interior.Color = RGB(255, 0, 0) Else End If Next i
i have cells to look for in sheet4 and lookup table is in sheet2 range Range("A16:B25")
when i run this code it keeps saying mismatch error
please help