Perhaps I'm misunderstanding something but wouldn't this run macro1 every
time the sheet is calculated even if the value of A1 doesn't change? Am I
incorrect in thinking that for a formula such as this:
=if(A1=1, Foo(),"")
that foo will only be called when a change in A1( or it's precedents) occurs
and A1=1? This is very different behavior. Given that the original
question concerned an attempt to call a macro in a formula such as the
above, I'm attempting to construct a solution that will behave as much like
this formula as possible (it's possible that this is more restrictive than
is really needed but it's a worthwhile exercise nonetheless, IMO).
Now that I think of it, it will be necessary to test if foo() should be
called in the open event as well since the formula above would also be
recalculated when the book is opened. There's probably other times too but
I can't think of any off the top of my head.
Is there a way that one can tell in the Calculate event if a given cell is
being recalculated by Excel?
Regards,
Dave