Running Macro's from Formula

R

Richard

Hello,
I am trying to get a macro to run from the result of a IF
formula. Can this be done?

Many Thanks

Richard
 
G

greg mansius [MSFT]

No. In order for any code to run in this situation you would need to write a
custom function.

Can you provide some details on what you want the "macro" to do based on
your IF statement?
 
H

Harlan Grove

greg mansius said:
No. In order for any code to run in this situation you would need to write a
custom function.
....

Maybe an event handler, but VBA functions called as udfs from cell formulas
can't & won't run macros nor change anything in Excel. They could fire other
applications using Shell which could in turn take over Excel via Automation
so as to give the appearance that the function was performing the actions,
but that requires some nontrivial programming.
 

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