Executing a macro from a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

1. There is some way to make that excel, starting from a conditional
structure in a cell, execute automatically a macro???

Something like this:
A B
1
2 1 =if(A2=1,macro1(),macro2())
 
No, functions can return a value, they cannot change the format or run a
macro.

You can use event code to do it, but not a worksheet function.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hi

No, impossible. This is a limitation by design. A macro could change the
cell itself, the sheet, excel, and therefore mess up the original logic and
the order of calculations.

But Excel has several "calculate" events that you might use to create a
simiular effect.

HTH. Best wishes Harald
 
Back
Top