Extract Unique Values from Listobject Column

  • Dear Experts


    I have a listobject and I'd like to extract the unique values from a column and put them into an array.


    For example:


    The array is called arrCustomers.
    What is the correct procedure if I need to retrieve the unique values from Orders[CustomerID] and put them into arrCustomers?


    Thanks for your assistance.


    Maria



    Example Table


    [TABLE="width: 256"]

    [tr]


    [td]

    Date

    [/td]


    [td]

    Time

    [/td]


    [td]

    CustomerID

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    13:30:00

    [/td]


    [td]

    51

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    14:30:00

    [/td]


    [td]

    51

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    14:00:00

    [/td]


    [td]

    46

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    12:00:00

    [/td]


    [td]

    51

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    11:45:00

    [/td]


    [td]

    51

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    11:00:00

    [/td]


    [td]

    45

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    10:20:00

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    11:00:00

    [/td]


    [td]

    42

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    11:30:00

    [/td]


    [td]

    42

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    12:55:00

    [/td]


    [td]

    68

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    11:20:00

    [/td]


    [td]

    17

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    09:40:00

    [/td]


    [td]

    55

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    09:30:00

    [/td]


    [td]

    55

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    10:00:00

    [/td]


    [td]

    46

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    10:30:00

    [/td]


    [td]

    46

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]01.03.2016[/TD]

    [td]

    10:10:00

    [/td]


    [td]

    55

    [/td]


    [/tr]


    [/TABLE]

  • Re: Extract Unique Values from Listobject Column


    Try this. :cool:


    Bruce :cool:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!