User defined function to return cell address and cell value

Can someone help with this ?

I have a user defined function that uses the following fomula in a worksheet cell
both the cell address and cell value are used in further calcualtions within the function to Get the Result

can this be altered some how to
and still return the cell address and value
Who is Participating?
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
To add to what Chris posted:

Public Function GetResult(Source As Range)
    MsgBox Source.Value
    MsgBox Source.Address
    GetResult = 123
End Function

Use like so:


Chris BottomleyConnect With a Mentor Software Quality Lead EngineerCommented:
This would be normal:> =GetResult(E2)

How is getresult defined ... use getResult(rng as range)

rng as a range can be used in the function to get contents and address.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.