Hi All,
I have two arrays which I want to compare, using Match.
The code below is what i have so far, but it is failing on the Redim Preserve ArrNot(k) line, with error "Run-time error '13' Type Mismatch"
All arrays are defined as Variant.
Just not sure how to proceed with debugging.
Cheers,
Skimmer333
'compare 2 arrays. Values in Arr and NOT in ArrResults need to output
l = 0
k = 0
On Error GoTo Output
For l = LBound(Arr)))To UBound(Arr())
j = Application.Match(Arr(l), ArrResults(), 0)
Next l
Output:
ReDim Preserve ArrNot(k)
ArrNot(k) = Arr(l)
k = k + 1
Range("J1").Select
If l = UBound(Arr()) Then
For k = 1 To UBound(ArrNot())
ActiveCell.Value = ArrNot(k)
Next k
Else
Resume Next
End If
Bookmarks