I'm trying to find the presence of each cell value in Column R from Input sheet against Column D in admin sheet and format it based on the result. But, the find always results empty, can you please help or correct me where i'm wrong.
VBA Code:
Finding Excluded values 13
Range("R2").Activate
'List = tblInput.Range(ActiveCell, ActiveCell.Offset(lr, 0))
List1 = tblInput.Range("R2:R" & lr)
'Loop Through Rows
For Item = 1 To UBound(List1)
searchvalue = List1(Item, 1)
Set findcell1 = tblAdmin.Range("D2:D1114").Find(What:=searchvalue, After:=ActiveCell, LookIn:=xlFormulas2, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If Not findcell1 Is Nothing Then
strfirstaddress = ActiveCell.Address
findcell1.Select
'loop through rows to find repeated values
Do
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 7697919
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.Color = -16777024
.TintAndShade = 0
End With
tblInput.Range(ActiveCell, ActiveCell.Offset(lr, 0).Row).FindNext(After:=ActiveCell).Activate
Loop Until strfirstaddress = ActiveCell.Address
With ActiveCell
Cells(1, .Column).Select
End With
'Range("R2:R" & lr).Select
Else
End If
Next Item