Application.ThisCell (Excel)

Returns the cell in which the user-defined function is being called from as a Range object.

Users should not access properties or methods on the Range object when inside the user-defined function. Users can cache the Range object for later use and perform additional actions when the recalculation is finished.


Dim rngThisCell As Range
Set rngThisCell = Application.ThisCell