hi ,
When i try to run the code below i get, " Run time error 13,Type mismatch" error and when i Debug the code this line Highlighted;
I would Appreciate any help on this please.
Thanks
When i try to run the code below i get, " Run time error 13,Type mismatch" error and when i Debug the code this line Highlighted;
Code:
[J2].Resize(.Count).Value = WorksheetFunction.Transpose(.Keys)
Code:
Sub ezuh1()
Application.ScreenUpdating = False
Dim x, y(), i&, j&, k, s, t$, u&, bu As Boolean
x = Range("A1", Cells(Rows.Count, 1).End(xlUp)).Value
With CreateObject("Scripting.Dictionary")
.CompareMode = 3
For i = 1 To UBound(x): .Item(x(i, 1)) = 1: Next i
x = Range("C1", Cells(Rows.Count, 3).End(xlUp)).Value
ReDim y(1 To UBound(x), 1 To 5)
For i = 1 To UBound(x)
t = x(i, 1)
For Each k In .Keys
s = Split(k)
For j = 0 To UBound(s)
If InStr(t, s(j)) Then bu = True: Exit For
Next j
If bu = False Then
u = u + 1: y(i, u) = k: t = t & " " & k
.Remove k
End If
bu = False
Next k
u = 0
Next i
[J2].Resize(.Count).Value = WorksheetFunction.Transpose(.Keys)
End With
[d1:H969].Value = y()
Application.ScreenUpdating = True
End Sub
I would Appreciate any help on this please.
Thanks