Address of Formula

T

Tommy

How can I get the cell address of the formula that calls a custom function?

Public Function Test(ByVal r As Range) As Integer
'How can I determine what cell contained the formula that called the
function
End Function

For instance, if the SQRT(range) is called and the formula is on the same
row as one of the values in the range, it will compute the SQRT of the number
stored on on the same row. I want to be able to do the same type thing.
 
D

Dave Peterson

Public Function Test(ByVal r As Range) As Integer
msgbox application.caller
'How can I determine what cell contained the formula that called the
function
 

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