Forum

Using the new Dynam...
 
Notifications
Clear all

Using the new Dynamic Array Functions within VBA

3 Posts
2 Users
0 Reactions
226 Views
(@zentec)
Posts: 2
New Member
Topic starter
 

Using the data found in the excel-dynamic-arrays.xlsx workbook from https://www.myonlinetraininghub.com/excel-dynamic-arrays I have successfully used  all of the new Dynamic Array functions within VBA apart from the FILTER function.

Every time I try to use FILTER I get the "Subscript out of range" error. Has anyone managed to use this worksheet function in VBA?

 
Posted : 15/01/2020 8:09 am
(@debaser)
Posts: 836
Member Moderator
 

If you're trying to use Worksheetfunction.Filter, the second argument needs to be an array of True/False values and oriented the correct way (ie if you are filtering a column, you need a vertical array, whereas for a row, you need a horizontal one).

 
Posted : 15/01/2020 12:42 pm
(@zentec)
Posts: 2
New Member
Topic starter
 

Thank you.

I created a Filter array of True and False values based on test criteria and then used that array as the second argument and it worked perfectly.

 
Posted : 16/01/2020 6:12 am
Share: