Hi, I'm using Excel (Microsoft 365 on a Mac)
I'm using the formula
=IFERROR(INDEX($B$2:$B$9, MATCH(0,COUNTIF($D$1:D1, $B$2:$B$9), 0)),"")
B1 = Fruit, B2 etc = Apple, Orange, Apple, Banana, Banana, Apple, Pineapple, Peach
D1 = Unique, D2 has the above formula
I copied the example from...