View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Is there anyway to find out which cell is being calculated?

I believe you could put something like

Debug.print Application.Caller.Address

in your UDF and then look at the immediate window.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"J. Caplan" wrote:

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.