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
Highlighted
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
User Defined Function not showing with up "="
katrina bethea in Excel on
5 Replies
Creating A Sublist
zjohnson in Excel on
5 Replies
vba sending email w/ attachment
katrina bethea in Excel on
7 Replies
VBA - Splitting worksheet by Dept
Zia Siddique in Excel on
12 Replies
Userform Listbox HELP
R3d3mpt10n in Word on
1 Replies
'Calling' a function from within a Word document
PMHunt1955 in Word on
2 Replies