Apple numbers: How can I create a filtered column (B) with only unique values from column (A)?

This answer by user Barry to the question "Need distinct list from a column" on Apple's Support Communities describes a way to accomplish this in Numbers.app:

Table 1 (left) with values and Table 2 (right) with unique values Table 1 (left) with values and Table 2 (right) with unique values.


Table 1 contains one formula, entered in D2:

D2: IF(COUNTIF(C$1:C2,C2)=1,MAX(D$1:D1)+1,"")

Table 2 contains 2 formulas, entered in A2 and B2:

A2: IF(ROW()−1>MAX(Table 1::D),"",INDEX(Table 1::C,MATCH(ROW()−1,Table 1::D,0)))

B2: COUNTIF(Table 1::C,A2)

Drag Down to fill the formulas in all rows. The index column can then be hidden.