Excel Custom Function - What cell is being Calculated

Brad McIntyre 101 Reputation points
2021-03-26T13:08:38.747+00:00

Thank you for taking the time to read my question

I have a custom function that I've created. I'm wondering if it's possible to tell what cell is being calculated by the function.

Thanks!

Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,638 questions
0 comments No comments
{count} votes

Accepted answer
  1. Brad McIntyre 101 Reputation points
    2021-03-29T12:19:44.78+00:00

    Hi,

    This is what I was able to find.

    With Application.Caller
    myFunc = .Row & "--" & .Column
    End With

    Put this in the UDF and you'll know what cell is currently being worked on.

    Thanks,
    Brad

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Emi Zhang-MSFT 21,626 Reputation points Microsoft Vendor
    2021-03-29T04:20:45.163+00:00

    Hi @Brad McIntyre ,
    You can use Find option in Excel to help you, please follow these steps:

    Press Ctrl + F- select Options > >- Look in: Formulas- enter the custom function name you need to find:
    82089-166.gif

    Hope it's helpful.*************************************************************************
    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments