Home

VBA CSE array UDF and dynamic arrays

Rodolfo_Oviedo
Occasional Visitor
CSE = Ctr+Shift+Enter
UDF = User Defined Function
In a row, I have a some inputs of a VBA CSE row array UDF located in the same row. The array function is copied down. The inputs of each copy are in the corresponding row. Now, all array functions have an additional common argument which is a big range located in another sheet, which has a name assigned. Each instance of the array UDF passes this big range to VBA, which is time inefficient. I wonder if using dynamic arrays can avoid such inefficiency. Can I enter the row array UDF only in the first row with the named range common argument, and dynamic column arrays in the place of the other arguments?
1 Reply
Depends on how you pass the large range. If the declaration is of type Range or Variant, you are just passing an object reference. Whether the range is one cell or 10000 makes no difference for the time it takes to pass the object pointer.
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies