Values only once when multiple values

Nebula2121

New Member
Joined
Apr 1, 2016
Messages
32
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Current
[/TD]
[TD]Desired Result
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Apple
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Apple
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Mango
[/TD]
[TD]Mango
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]Mango
[/TD]
[TD]Peach
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]Mango
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]Peach
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]Banana
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]Banana
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need the value only listed once (preferably in Alpha Order) from a data set column that lists that value multiple times. Refer to table for Current Set and the Desired Result; how do I get to the Desired Result?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hey,

Excel has an inbuilt Remove duplicates tool in the Data ribbon tab. Then just sort the column alphabetically ! :)
 
Last edited:
Upvote 0
One simple way it to copy the the list to column B, use Excel's built-in Remove Duplicate Functionality, and then sort that list.
If you wanted VBA to do it, you can turn on your Macro Recorder and record yourself performing the steps above, and then you will have the VBA required to do that.
 
Upvote 0
You could use COUNTIF as such:

=IF(COUNTIF($A$1:A1,A1)=1,A1,"") and drag down the B column.

It will leave spaces however but it will generate a unique list.

Then you can just tidy the spaces up pretty easily by sorting again.
 
Upvote 0
You can create a pivot table, drag the field from column A in Row Lables

8cb50c321ceb387d7e1642d6716fc76e.jpg
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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