Microsoft excel 2003 macros

B

Bob Greenblatt

Can a logical statement invoke a macro? If so how can you do it?
If you mean: can an if statement cause a macro to be executed? Sure. Just
remember that a macro called in this way can ONLY return a value, it can not
change the environment - like selecting another cell, changing the value of
another cell, etc. to call a macro in this way construct the if statement
like:
=if(macro(arguments),macrotocalliftrue(arguments),macroiffalse(arguments))

Arguments are optional foe each macro. Make sure the function is properly
constructed to return a single value to the cell.
 

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