S
Sean Bartleet
Hi,
I have a list in rng1 (C1:C10) is there a formula that I can copy to E1:E?
that will list all the unique values in list 1. For example if I have the
numbers 1,1,2,2,3,3,4,4,5,5 in rng1 I would like the resulting list in E1:E5
to read 1,2,3,4,5.
Ideally this should also be able to sort the list, but I can do that with a
dummy list created using the small command and picking up on the row number
to get each successive kth smallest value but this will require a hidden
column which is undesirable.
I can do this with two dummy lists but the formulas are nasty. With my list
in C1:C10 I can extract unique entries to column D using the array formula
in cell D1 "=IF(COUNTIF($C$1:C1,C1)=1,C1,"")" copying this down to Cells
D210 I get the unique values. Then I can eliminate blank cells using a
formula I found at http://cpearson.com/excel/duplicat.htm long ago in cell
E1
"=IF(ROW()-ROW($E$1:$E$9)+1>ROWS($D$1:$D$10)-COUNTBLANK($D$1:$D$10),"",INDIR
ECT(ADDRESS(SMALL((IF($D$1:$D$10<>"",ROW($D$1:$D$10),ROW()+ROWS($D$1:$D$10))
),ROW()-ROW($E$1:$E$9)+1),COLUMN($D$1:$D$10),4)))" Again an array formula
copied down to cells E2:E10
In fact the numbers in cells C1:C10 come from a union of two lists in cells
A1:A6 and B1:B4 using the formula in cell C1
"=IF(CELL("row",A1)<=ROWS($A$1:$A$6),SMALL($A$1:$A$6,CELL("row",A1)),SMALL($
B$1:$B$4,CELL("row",A1)-ROWS($A$1:$A$6)))" copied down to cells C2:C10
(thanks to Ivano)
This is a bit clumsy and requires two dummy rows. Is there any easier way to
do this using formulas? What I am really looking for is a sorted set of
unique numbers resulting from the union of two lists or numbers.
Any assistance will be appreciated.
Thanks.
Sean Bartleet
I have a list in rng1 (C1:C10) is there a formula that I can copy to E1:E?
that will list all the unique values in list 1. For example if I have the
numbers 1,1,2,2,3,3,4,4,5,5 in rng1 I would like the resulting list in E1:E5
to read 1,2,3,4,5.
Ideally this should also be able to sort the list, but I can do that with a
dummy list created using the small command and picking up on the row number
to get each successive kth smallest value but this will require a hidden
column which is undesirable.
I can do this with two dummy lists but the formulas are nasty. With my list
in C1:C10 I can extract unique entries to column D using the array formula
in cell D1 "=IF(COUNTIF($C$1:C1,C1)=1,C1,"")" copying this down to Cells
D210 I get the unique values. Then I can eliminate blank cells using a
formula I found at http://cpearson.com/excel/duplicat.htm long ago in cell
E1
"=IF(ROW()-ROW($E$1:$E$9)+1>ROWS($D$1:$D$10)-COUNTBLANK($D$1:$D$10),"",INDIR
ECT(ADDRESS(SMALL((IF($D$1:$D$10<>"",ROW($D$1:$D$10),ROW()+ROWS($D$1:$D$10))
),ROW()-ROW($E$1:$E$9)+1),COLUMN($D$1:$D$10),4)))" Again an array formula
copied down to cells E2:E10
In fact the numbers in cells C1:C10 come from a union of two lists in cells
A1:A6 and B1:B4 using the formula in cell C1
"=IF(CELL("row",A1)<=ROWS($A$1:$A$6),SMALL($A$1:$A$6,CELL("row",A1)),SMALL($
B$1:$B$4,CELL("row",A1)-ROWS($A$1:$A$6)))" copied down to cells C2:C10
(thanks to Ivano)
This is a bit clumsy and requires two dummy rows. Is there any easier way to
do this using formulas? What I am really looking for is a sorted set of
unique numbers resulting from the union of two lists or numbers.
Any assistance will be appreciated.
Thanks.
Sean Bartleet