Correction....
Code should be
Function UniqNonBlank(rng As Range, sortCol As Long, ref As Long, col As Long)
Dim a, i As Long, ii As Long, w, txt As String
a = rng.Value: ReDim w(1 To UBound(a, 2))
With CreateObject("System.Collections.SortedList")
For i = 1 To UBound(a, 1)
txt = Format$(a(i, sortCol), String(20, "0"))
For ii = 1 To UBound(a, 2)
w(ii) = a(i, ii): txt = txt & Chr(2) & a(i, ii)
Next
If Len(Replace(txt, Chr(2), "")) Then
If Not .Contains(txt) Then .Item(txt) = w
End If
txt = ""
Next
UniqNonBlank = .GetByIndex(ref - 1)(col)
End With
End Function
Bookmarks