Try this...
Data Range
|
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
1 |
Data |
|
|
|
|
|
|
|
----- |
Count |
Uniques |
2 |
I |
H |
R |
M |
A |
D |
R |
Z |
|
11 |
I |
3 |
H |
K |
A |
X |
G |
R |
V |
I |
|
|
H |
4 |
|
|
|
|
|
|
|
|
|
|
R |
5 |
|
|
|
|
|
|
|
|
|
|
M |
6 |
|
|
|
|
|
|
|
|
|
|
A |
7 |
|
|
|
|
|
|
|
|
|
|
D |
8 |
|
|
|
|
|
|
|
|
|
|
Z |
9 |
|
|
|
|
|
|
|
|
|
|
K |
10 |
|
|
|
|
|
|
|
|
|
|
X |
11 |
|
|
|
|
|
|
|
|
|
|
G |
12 |
|
|
|
|
|
|
|
|
|
|
V |
13 |
|
|
|
|
|
|
|
|
|
|
|
Enter this array formula** in J2. This will return the count of the unique entries in the range. This number will also be used for an error trap in the extraction formula.
=SUM(IF(A2:H3<>"",1/COUNTIF(A2:H3,A2:H3)))
Enter this array formula in K2. There must be a cell above the 1st formula cell and this cell must not contain an entry that is also in the data range.
=IF(ROWS(K$2:K2)>J$2,"",INDEX(A$2:H$3,MIN(IF(A$2:H$3<>"",IF(ISNA(MATCH(A$2:H$3,K$1:K1,0)),ROW(A$2:H$3)-ROW(A$2)+1))),MOD(MIN(IF(A$2:H$3<>"",IF(ISNA(MATCH(A$2:H$3,K$1:K1,0)),(ROW(A$2:H$3)-ROW(A$2)+1)*10^5+(COLUMN(A2:H3)-COLUMN(A2)+1)))),10^5)))
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
Copy down until you get blanks.
Bookmarks