Finding excluded values in excel

bcmk29

Board Regular
Joined
Oct 20, 2022
Messages
55
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
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
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top