I have been following this question quite deeply and trying to match Cell(r,2)
on one sheet to an array I compiled below cycling through rows in column 2 on another sheet but I keep getting a False value returned from the function.
Public Break_List(1 To 1000, 1 To 100) As Variant
If IsInArray(Cells(r, 2), Break_List) = True Then
Sub Store_Break_Categories()
Sheets("BackEnd").Select
Break_No_of_Rows = 0
'For c = 10 To 15
counter = 0
If Cells(2, 3) <> "" Then
lastrow = Cells(65000, 3).End(xlUp).Row
For r = 2 To lastrow
counter = counter + 1
'Break_List(counter, c - 9) = Cells(r, c)
Break_List(counter, 1) = Cells(r, 3)
Next r
End If
If counter > Break_No_of_Rows Then Break_No_of_Rows = counte
End Sub
This is the function I have integrated from the above question
Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean
IsInArray = Not IsError(Application.Match(stringToBeFound, arr, 0))
End Function
Thank you
The Application.Match is not going to magically look through 100 columns. If you want to look through the first column then,
If you want to look through all columns then,