why below line isn't filtering array blanks
Code: Select all
v = Filter(Application.Transpose(Evaluate("IF(--LEFT(A2:A" & p & ",3)=" & c & ",A2:A" & p & ","""")")), "", False)
Adeel
Code: Select all
v = Filter(Application.Transpose(Evaluate("IF(--LEFT(A2:A" & p & ",3)=" & c & ",A2:A" & p & ","""")")), "", False)
Code: Select all
v = Application.Transpose(Evaluate("IF(--LEFT(A2:A" & p & ",3)=" & c & ",A2:A" & p & ","""")"))
Code: Select all
Sub nnn()
Dim p As Long
Dim s
Dim n As Long
Dim c
Dim v
Dim k As Long
ActiveSheet.UsedRange.Offset(, 1).Clear
p = Cells(Rows.Count, 1).End(xlUp).Row
s = Evaluate("=UNIQUE(LEFT(A2:A" & p & ",3))")
n = 3
For Each c In s
v = Filter(Application.Transpose(Evaluate("IF(--LEFT(A2:A" & p & ",3)=" & c & ",A2:A" & p & ",""x"")")), "x", False)
k = k + 1
Cells(2, n + k).Resize(UBound(v) + 1, 1).Value = Application.Transpose(v)
Next c
End Sub
Code: Select all
Cells(2, 1).Resize(500000).Value = "65780"