Return a list of unique values

redhots4

Board Regular
Joined
Aug 30, 2004
Messages
131
Office Version
  1. 365
Platform
  1. MacOS
I have a list that contains resource names and those names appear on the list multiple times. The list does not have a fixed length and may be between 10 and 1500 rows or more.

What function or VB code would examine that list and return a list of unique names; one in which each name appears only once and in alpha order?

TIA!! Shawn
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You could use advanced filter to return a list of the unique entries in a range, and then simply sort the results.
 
Upvote 0
Data>Filter>Advanced Filter
Select "Filter to new location"
Select "Unique values only"


lenze
 
Upvote 0
Here's a formula approach...

Assuming that A2:A10 contains the data, try the following formulas which need to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

B2:

=INDEX(A2:A10,MATCH(0,COUNTIF(A2:A10,"<"&A2:A10),0))

B3, copied down:

=IF(COUNTIF(A$2:A$10,">"&B2),INDEX(A$2:A$10,MATCH(COUNTIF(A$2:A$10,"<="&B2),COUNTIF(A$2:A$10,"<"&A$2:A$10),0)),"")

If you have Excel 2003 or later, convert the data into a list:

Code:
Data > List > Create List

Otherwise, use a dynamic named range. Either one will allow the range to adjust automatically as data is added or removed.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,203,328
Messages
6,054,754
Members
444,748
Latest member
knowak87

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