Is there anyway to find out which cell is being calculated?

J

J. Caplan

I have a few user defined formulas that are in a spreadsheet. When I open
Excel with automatic calculation turned on, it goes through each cell and
executes my formulas as expected.

What I need to know is which cell is being calculated? If I have 5 cells
with one of my formulas, I would expect my formula to be called 5 times
(which it is), but I want to know which cell is being calculated each time.

Application.ActiveCell only tells you the cell where the cursor is. It does
not change as Excel iterates through each cell to calculate them.
 
B

Barb Reinhardt

I believe you could put something like

Debug.print Application.Caller.Address

in your UDF and then look at the immediate window.
 
J

J. Caplan

That's it!! I knew it would be something simple, but I didn't even notice
the Caller property. Thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top