you can pass the calling cell's address and worksheet name as additional parameters to your function.
Here's an example:
Public Function CountT(iRow As Integer, callerAddress As String, callerSheet As String) As Integer Debug.Print "Caller Address: " & callerAddress Debug.Print "Caller Worksheet: " & callerSheet ' Your function logic here ' For example, return the row count based on the provided parameters CountT = iRow End Function