Hi,
Ive been searching and trying to work this one out all day but havent found a solution as yet. I have a named range with about 1000 lines so B4:b1004 which contains the data I would like to return in a validated list. In this list I only want to return the unique records no duplicates and sorted alphabetically. I want the list to work from the live data itself without being filtered. I'm sorry but I cant work out for the life of me how this can be done. i did find this explanation on the net but could not get it to work properly.
Step one Create module:
[vba]Public Function Asset( _
ByVal SourceValues As Range) As Variant
Dim Items As New Collection
Dim Row As Long
Dim Result As Variant
On Error Resume Next
For Row = 1 To SourceValues.Rows.Count
Items.Add SourceValues(Row), SourceValues(Row)
Next Row
On Error GoTo 0
ReDim Result(1 To Application.Caller.Rows.Count)
For Row = 1 To Application.Caller.Rows.Count
Result(Row) = ""
Next Row
For Row = 1 To Application.Min(Items.Count, Application.Caller.Rows.Count)
Result(Row) = Items(Row)
Next Row
UniqueValues = Application.Transpose(Result)
End Function[/vba]
Step 2 Define and Name List "Asset"
Step 3 Validation, List, source F3, select "Asset"
If anyone has a soloution or an idea of how this could work that would be great.
Thanks
MDY