Extract Unique Values

YasserKhalil

Well-known Member
Joined
Jun 24, 2010
Messages
852
Hello everybody
I have data in range (A1:A5) the value A and in range(A6:A10) the value B and in range(A11:A15) the value C

Three values in column A : A,B and C

In column B different values
A
s
A
f
A
d
A
d
A
f
B
r
B
q
B
u
B
t
B
x
C
n
C
m
C
k
C
p
C
p

<tbody>
</tbody>

I want to extract unique values of Column A to Column E
The result should be :
E1 : A E2: B E3: C

In F1 ,G1 and H1 the values should be : s f d
In F2 , G2 ,H2, I2 and J2 the values should be : r q u t x
In F3,G3,H3 and I3 the values should be: n m k p

I want the solution to be in formulas

Thanks advanced
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
solution for Excel 2010 onwards:

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">E1</th><td style="text-align:left">=IFERROR(<font color="Blue">INDEX(<font color="Red">$A$1:$A$15,AGGREGATE(<font color="Green">15,6,ROW(<font color="Purple">$A$1:$A$15</font>)/(<font color="Purple">MATCH(<font color="Teal">$A$1:$A$15,$A$1:$A$15,0</font>)=ROW(<font color="Teal">$A$1:$A$15</font>)</font>),ROWS(<font color="Purple">E$1:E1</font>)</font>)</font>),""</font>)</td></tr></tbody></table></td></tr></table><br />

and drag down

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">F1</th><td style="text-align:left">=IFERROR(<font color="Blue">INDEX(<font color="Red">$B$1:$B$15,AGGREGATE(<font color="Green">15,6,ROW(<font color="Purple">$B$1:$B$15</font>)/(<font color="Purple">(<font color="Teal">$E1=$A$1:$A$15</font>)*(<font color="Teal">MATCH(<font color="#FF00FF">$B$1:$B$15,$B$1:$B$15,0</font>)=ROW(<font color="#FF00FF">$B$1:$B$15</font>)</font>)</font>),COLUMNS(<font color="Purple">$F1:F1</font>)</font>)</font>),""</font>)</td></tr></tbody></table></td></tr></table><br />

and drag down and across





Excel 2013
ABCDEFGHIJ
1AsAsfd
2AfBrqutx
3AdCnmkp
4Ad
5Af
6Br
7Bq
8Bu
9Bt
10Bx
11Cn
12Cm
13Ck
14Cp
15Cp
Sheet8
 
Upvote 0
then its a good reason to get office 2013 ;)

no problem, try then:

<b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">E1</th><td style="text-align:left">{=IFERROR(<font color="Blue">INDEX(<font color="Red">$A$1:$A$15,SMALL(<font color="Green">IF(<font color="Purple">(<font color="Teal">MATCH(<font color="#FF00FF">$A$1:$A$15,$A$1:$A$15,0</font>)=ROW(<font color="#FF00FF">$A$1:$A$15</font>)</font>),ROW(<font color="Teal">$A$1:$A$15</font>)</font>),ROWS(<font color="Purple">E$1:E1</font>)</font>)</font>),""</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />

<b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">F1</th><td style="text-align:left">{=IFERROR(<font color="Blue">INDEX(<font color="Red">$B$1:$B$15,SMALL(<font color="Green">IF(<font color="Purple">(<font color="Teal">(<font color="#FF00FF">$E1=$A$1:$A$15</font>)*(<font color="#FF00FF">MATCH(<font color="Navy">$B$1:$B$15,$B$1:$B$15,0</font>)=ROW(<font color="Navy">$B$1:$B$15</font>)</font>)</font>),ROW(<font color="Teal">$B$1:$B$15</font>)</font>),COLUMNS(<font color="Purple">$F1:F1</font>)</font>)</font>),""</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />



I'm using Office 2007 Sir
 
Upvote 0

Forum statistics

Threads
1,214,665
Messages
6,120,803
Members
448,990
Latest member
rohitsomani

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top