Creating A Validation List From Unique Values in A Column (Filtered and unfiltered)

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,570
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I am looking for a VBA solution that can analyze a column (A) in a worksheet (F_FUNC) to create a list of unique values. This list of unique values will form the list of a cell validation list. I know I can step through each cell in the column, and compile a unique value list in a column on another worksheet, and define that range of values for the validation list. But I'm wondering if thereis a more efficient method.

On a side not, how would this same process work on a filtered list? For example, if I filtered a single value in column A, how would I create a validation list of the unique values in column B as a result of the filter?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
If you are using 365, use the UNIQUE function and create the list in another range.
 
Upvote 1
Thanks RoryA, I'll give it a try. But before I put too much effort into trial and error, would this work if the data is filtered?

I found this option as well, but again, fear it won't work on filtered data. (
)
 
Upvote 0
would this work if the data is filtered
Yes, you can handle that by adding in SUBTOTAL, or adding the same criteria into a FILTER function inside the UNIQUE function.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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