Dynamic Name Range in VBA?

D

Don

I have a dynamic range (below) that I want to pass onto a VBA Function that
I am writing. Can this be done or must the dynamic range be coded into the
function?

Alternatively, could I define a range name for the dynamic range and pass
that to the function?

=myfunction(OFFSET(Sheet3!$A$1,1,MATCH(B$1,Sheet3!$1:$1,0)-1,$A$1)/(OFFSET(Sheet3!$A$1,1,MATCH($A2,Sheet3!$1:$1,0)-1,$A$1)))

Don
 
D

Don

Correction, the range formula is wrong in my original note, this is the
correct one:

=myfunction(OFFSET(Sheet3!$A$1,1,MATCH(B$1,Sheet3!$1:$1,0)-1,$A$1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top