Microsoft Excel Question:
Download Questions PDF

Is it possible to call a macro from the condition true or false side of a worksheet formula? i.e. If(A2="OK",Run macro1,run macro2)?

Answer:

Basically, the answer is No. You can write functions in VBA that you can call from worksheet cells, but these functions can only return a value. They can't modify other cells or alter any part of the Excel environment. (You may be able to use a worksheet change event to call the macro.)

Download MS Excel Interview Questions And Answers PDF

Previous QuestionNext Question
Some of the functions that we want our macros to accomplish are not possible without first unprotecting the worksheet/workbook with the password?Is there a way to protect the macros I create so people can not see or alter them?