Address of Formula

  • Thread starter Thread starter Tommy
  • Start date Start date
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.
 
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
 
Back
Top