English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

is it possible in ms excel that particular macro will run only if some codition is satisfied, i mean say for example if A1=B1, then only the macro should run otherwise the macro should not run, or say if A1=10, then only macro should run. ? is it possible?

2007-12-26 02:38:58 · 3 answers · asked by manekankit 1 in Computers & Internet Programming & Design

jgoulden answered to use if, but i m not getting where should i type. i am using buttons for macro

2007-12-26 03:26:39 · update #1

3 answers

jgouldens if statement should work.
you are just missing the name of your macro

-click Tools
-click Macro
-Click Macros

this will give you a list of macros. just put the macro name in where jgoulden wrote macro1.
since you dont need 2 macros, you can just replace it with a zero.

2007-12-26 13:25:38 · answer #1 · answered by expletive_xom 7 · 0 0

You do not say what you want the macro to do, so I am wondering if a simple conditional formatting or an IF function will do instead of using a macro.

2007-12-26 10:43:43 · answer #2 · answered by Anonymous · 0 0

Sure, just use an IF statement:

IF ( A1 = B1 , MACRO_1, MACRO_2 )

MACRO_1 runs if the condition is satisfied; MACRO_2 is invoked if it is not.

2007-12-26 10:45:16 · answer #3 · answered by jgoulden 7 · 0 0

fedest.com, questions and answers