简体   繁体   中英

How can I return unique values horizontally on Excel

I have a table that looks like this from A1-A10

**Animal**
Zebra
Zebra
Zebra
Giraffe
Giraffe
Monkey
Monkey
Cat
Cat

I want to return ONLY the unique values HORIZONTALLY in a row - and have them sorted alphabetically

like this:

Cat   Giraffe   Monkey   Zebra

Currently I have this formula in D3: but this returns unique values vertically

=IFERROR(LOOKUP(2, 1/(COUNTIF($D$2:D2, $A$2:$A$10)=0), $A$2:$A$10), "")

Zebra
Monkey
Giraffe
Cat

With Microsoft365:

=TRANSPOSE(SORT(UNIQUE(A2:A10)))

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM