Copy excel Filter's dropdown list into VBA array

salmanm2

New Member
Joined
Mar 20, 2009
Messages
4
Hi,

I've been trying for a while now to figure this out but with no joy.

My problem is dealing with large data sets from a factory log.

When inserting a filter into tables, the filter provides a drop down list of all the different entities in that column (which the user has the manual option to tick/untick his preferences). However, i need to store that list into an array for further work.

So far, to create a list of those entries i usually get it to put everything in ascending order and then run a loop from row_2 to row_max to store a figure every time the value changes. I know this works and its fast enough, but i'm sure there is a simpler way, which i'm hoping you guys may know of. As the drop down filter provides that list, i'm sure there is a VBA code to call up that list!!!


Would appreciate any feedback.

Thanks a mill

Mustafa
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Thanks Andrew,

This works perfectly, however i was still looking to save that collection as an Array. i should be able to just change that section to an array with a counter. right?

Salman
 
Upvote 0
Ok, i just tried it with an array, didn't work, but i tried using the collection as an array, and it works like a treat, thanks guys. great site by the way. Cheers

Mustafa
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,047
Members
449,064
Latest member
scottdog129

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