Hi everyone,
I'm working in a function to filter data from an array and then show a list of the non-repeated data, but i can't find the error in my code, if anyone could help me i really appreciate it!
This is the code:
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Option Base 1
Function LISTFI(DAT As Range)
Dim r As Long, ri As Long, i As Long, n As Long
n = DAT.Rows.Count
r = 1
ri = 1
Dim L(1 To 1000, 1)
L(1, 1) = DAT(1, 1)
For r = 2 To n
For i = 1 To r
If DAT(r, 1) <> L(i, 1) Then
ri = ri + 1
L(ri, 1) = DAT(r, 1)
GoTo NDL
Else: End If
Next i
NDL:
Next r
LISTFI = L
End Function
'::::::::::::::::::::::::::::::::::::::::::::::::::::::
After this in the worksheet , drag down the formula, and selecting the resuled array press {F2} and then {ctrl} + {shift} + {enter}.
I attached the workbook, any advice is welcome...
Bookmarks