Whilst using this code does the job, is there a way of avoiding having to create the two formula's on the worksheet to
populate the array directly. Thanks.
populate the array directly. Thanks.
VBA Code:
Public Function fncGetUnique(rngRange As Range) As Variant
Dim arr() As Variant
Range("C2").Formula2 = "=SORT(UNIQUE(" & rngRange.Address & ",FALSE,FALSE))"
Range("D2").Formula2 = "=CountA(C2#)"
arr = Range("C2").Resize(Range("D2").Value, 1)
fncGetUnique = arr
End Function