Good morning,
I got this code and tested using sample sheet and worked
But then i change the range And start to display error 13 Type mismatch.
I read the following link but i can't identify the correlation of possible causes vs my code
https://msdn.microsoft.com/en-us/vba...XM04lwSTgmg)()
I need to see what's causing this error
This is the range what i changed
v = Range("T5:W" & Columns("T:W").Find("*", [T1], , , 1, 2).Row)
Then i changed to S5:W and SW
And this
Range("Y5").Offset(0, c - 1).Resize(.Count).Value = Application.Transpose(.Keys)
Changed to
Range("X5").Offset(0, c - 1).Resize(.Count).Value = Application.TRANSPOSE(.Keys)
Then above line is Highlited
Sub FilterDay()
Dim v, s, r&, c&, i&, j&, k&
v = Range("S5:W" & Columns("S:W").Find("*", [S1], , , 1, 2).Row)
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
For c = 1 To UBound(v, 2)
For r = 1 To UBound(v, 1)
If InStr(v(r, c), ",") Then
s = Split(v(r, c), ",")
For j = 0 To UBound(s) - 1
For k = j + 1 To UBound(s)
If s(j) > s(k) Then: Temp = s(k): s(k) = s(j): s(j) = Temp
Next k, j
.Item(Join(s, ",")) = ","
End If
Next r
Range("X5").Offset(0, c - 1).Resize(.Count).Value = Application.TRANSPOSE(.Keys)
.RemoveAll
Next c
End With
End Sub
Thanks in advance !!!!
Bookmarks