Sorting table breaks my count of unique values
Would love some help with this. I have looked on these forums and came across 2 ways of doing this but both lead to issues somehow.
I need to gather all the unique values (in this case names of individuals) that appear in a column.
The first method was to create an extra column with the below formula that produces a number starting with 1 the first time appears in the column.
IF($A2≠"",COUNTIF(B$1:B2,Person '2024-04-17')+ROW()÷10000,1000000)
I then entered the following formula in "People Unique A" column to get a list of all the names.
IF(SMALL(Table 1::D,ROW()−1)>2,"",INDEX(Person,MATCH(SMALL(Table 1::D,ROW()−1),Table 1::D,0)))
The issue here is that when I sort the first table, some of the cells in the extra column produce errors (second screenshot below).
The second method does not need that extra column and only uses IF(COUNTIF($B$1:$B1,Person)=0,Person,"") in the cells of the "People Unique B" column.
The problem this time is that it produces errors in the "People Unique B" column if I have more rows in that second table than in the first table. It also produces a 0 the first time it encounters an empty cell in the "Person" column of table 1 (as shown in the first screenshot).
Also, both methods make it impossible to sort the second table, but this is not really an issue for me right now.
iMac 27″