The List1 is upper case as list2 is not, I accounted for this in the code.
the apostrophe need to be removed or there would not be a match for Ocean's 13
Sub Button1_Click()
Dim wb As Workbook, bk As Workbook
Dim ws As Worksheet, sh As Worksheet
Dim MyArr As Variant
Dim Rng As Range, c As Range
Set wb = Workbooks("List2.csv")
Set bk = Workbooks("List1.xlsx") 'make as .xlsm if this is the workbook with the code
Set ws = wb.Sheets(1) 'List2 sheets1
Set sh = bk.Sheets(1) 'list1 sheets1
With sh
.Range("D:D").Replace _
What:="'", Replacement:="", _
SearchOrder:=xlByColumns, MatchCase:=True
MyArr = .Range("D1:D" & .Cells(Rows.Count, "D").End(xlUp).Row).Value
End With
With ws
Set Rng = .Range("G1:G" & .Cells(.Rows.Count, "G").End(xlUp).Row)
For Each c In Rng.Cells
If IsNumeric(Application.Match(UCase(c), MyArr, 0)) Then
c.Offset(, 1) = 1
End If
Next c
End With
End Sub
Bookmarks