Extract a unique list of items with formula

GerryZ

Well-known Member
Joined
Jul 4, 2014
Messages
1,224
Office Version
  1. 365
Platform
  1. Windows
Hi all
the table on the top you can see each person have some fruits
and on the bottom table I need to extract unique list of names for each fruit
thank you!
Excel Workbook
ABCDE
1FRANKGEORGEJULIEMIKAELLUIS
2APPLEKIWIAPPLETANGERINEKIWI
3ORANGEORANGEKIWITANGERINEPEAR
4ORANGEORANGEORANGETANGERINEPEAR
5APPLEORANGEORANGEORANGEPEAR
6PEARORANGEORANGEORANGEKIWI
7PEARORANGEORANGEORANGEKIWI
8KIWI
9
10
11RESULT
12APPLEORANGEPEARKIWITANGERINE
13FRANKFRANKFRANKGEORGEMIKAEL
14GEORGELUISJUILIE
15JULIELUIS
16MIKAEL
17
Sheet
 
Hi GerryZ,

You can use this us formula at A13[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] =IFERROR(INDEX($A$1:$E$1,SMALL(IF(FREQUENCY(IF($A$2:$E$8=A$12,MATCH($A$1:$E$1,$A$1:$E$1,0)),ROW($A$2:$E$8)-ROW($A$2)+1),ROW($A$2:$E$8)-ROW($A$2)+1),ROWS($A$13:A13))),"") Use C-S-E copy down. Then copy formula from A13 to B13, copy down. Repeat steps for columns C, D, and E for your results. Actually this formula finds apples for Frank and Julie. FYI: the frequency function removes duplicate names[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
sorry!! errata corrige
this is the end result
thank you!
Excel Workbook
ABCDE
1FRANKGEORGEJULIEMIKAELLUIS
2APPLEKIWIAPPLETANGERINEKIWI
3ORANGEORANGEKIWITANGERINEPEAR
4ORANGEORANGEORANGETANGERINEPEAR
5APPLEORANGEORANGEORANGEPEAR
6PEARORANGEORANGEORANGEKIWI
7PEARORANGEORANGEORANGEKIWI
8KIWI
9
10
11RESULT
12APPLEFALSOPEARKIWITANGERINE
13FRANKFRANKFRANKGEORGEMIKAEL
14JULIEJULIELUISJULIE
15MIKAELLUIS
16LUIS
17
Sheet
 
Upvote 0
hi mike there is a problem i cannot read what you wrote
thank you anyway
 
Upvote 0
GerryZ,

Using Mike Szczesny's array formula:


Excel 2007
ABCDE
1FRANKGEORGEJULIEMIKAELLUIS
2APPLEKIWIAPPLETANGERINEKIWI
3ORANGEORANGEKIWITANGERINEPEAR
4ORANGEORANGEORANGETANGERINEPEAR
5APPLEORANGEORANGEORANGEPEAR
6PEARORANGEORANGEORANGEKIWI
7PEARORANGEORANGEORANGEKIWI
8KIWI
9
10
11RESULT
12APPLEORANGEPEARKIWITANGERINE
13FRANKFRANKFRANKGEORGEMIKAEL
14JULIEGEORGELUISJULIE
15JULIELUIS
16MIKAEL
17
Sheet1
Cell Formulas
RangeFormula
A13{=IFERROR(INDEX($A$1:$E$1,SMALL(IF(FREQUENCY(IF($A$2:$E$8=A$12,MATCH($A$1:$E$1,$A$1:$E$1,0)),ROW($A$2:$E$8)-ROW($A$2)+1),ROW($A$2:$E$8)-ROW($A$2)+1),ROWS($A$13:A13))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.



Copy the array formula into cell A13

Then copy A13 down to cell A17

Then copy A13:A17 To B13:E13
 
Last edited:
Upvote 0
hiker 95
thank you for the answer but the result is wrong
here below you can see the result of your formula, which is not ta same of above
I need a unique list of persons that have the fruit.
thank you!
Excel Workbook
ABCDE
12APPLEORANGEPEARKIWITANGERINE
13GEORGEFRANKFRANKGEORGEMIKAEL
14JULIEGEORGELUISJULIE
15JULIELUIS
16
17
Sheet
 
Upvote 0
@Mike szczesnay
@Hiker95
thank you all works perfectly
verywell
in the mean time I found onther formula watch this!!
Excel Workbook
ABCDE
1FRANKGEORGEJULIEMIKAELLUIS
2APPLEKIWIAPPLETANGERINEKIWI
3ORANGEORANGEKIWITANGERINEPEAR
4ORANGEORANGEORANGETANGERINEPEAR
5APPLEORANGEORANGEORANGEPEAR
6PEARORANGEORANGEORANGEKIWI
7PEARORANGEORANGEORANGEKIWI
8KIWI
9
10
11RESULT
12APPLEORANGEPEARKIWITANGERINE
13FRANKFRANKFRANKGEORGEMIKAEL
14JULIEGEORGELUISJULIE
15JULIELUIS
16MIKAEL
17
18
Sheet
 
Upvote 0
GerryZ,

Thanks for the feedback.

You are very welcome. Glad we could help.

And, come back anytime.
 
Last edited:
Upvote 0

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