Tom-
i want to feed a range into a function in VBA. lets say the range is cells(A1:B10), 20 cells conservatively. i named the range "grid".
now i want to write a function in VBA, lets call it "Mz", and feed it "grid" as an input. so when i write the worksheetfunction "=Mz(grid)" in any cell, the workbook understands this. (i want to feed the function this range rather than have to feed it 20 individual cells).
my question is, how do i break the range down inside the function so that i can address each of the cells individually? like perhaps into an array?
lets say array dat1... (option base 1)
dim dat1() as double
redim dat1(10,2) - or - redim dat1(20,1) probably the latter here.
or if there is a better way of breaking these down besides into an array can you please enlighten me?
thanks for your help,
-tad
Bookmarks