Array containing duplicates

davidepstein22

New Member
Joined
Aug 27, 2012
Messages
27
Hi all,

I have an array function that returns text separated by commas (e.g. "Dave, Tom, Dave, Mike...") and it contains duplicates when there is more than 1 match (i.e. Dave). What functions should I wrap around the array to remove the duplicates?

Thank you!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi all,

I have an array function that returns text separated by commas (e.g. "Dave, Tom, Dave, Mike...") and it contains duplicates when there is more than 1 match (i.e. Dave). What functions should I wrap around the array to remove the duplicates?

Thank you!

3
Dave Dave
Tom Tom
Dave Mike
Mike

<colgroup><col width="64" style="width:48pt" span="3"> </colgroup><tbody>
</tbody>

In C1 control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(1-($A$2:$A$5=""),MATCH($A$2:$A$5,$A$2:$A$5,0)),ROW($A$2:$A$5)-ROW($A$2)+1),1))

In C2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($C$2:C2)>$C$1,"",INDEX($A$2:$A$5,SMALL(IF(FREQUENCY(IF(1-($A$2:$A$5=""),MATCH($A$2:$A$5,$A$2:$A$5,0)),ROW($A$2:$A$5)-ROW($A$2)+1),ROW($A$2:$A$5)-ROW($A$2)+1),ROWS($C$2:C2))))
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,260
Members
449,149
Latest member
mwdbActuary

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