ELSE.IF macro

Used with IF, ELSE, and END.IF to control which functions are carried out in a macro. ELSE.IF signals the beginning of a group of formulas in a macro sheet that will be carried out if the preceding IF or ELSE.IF function returns FALSE and if logical_test is TRUE. Use ELSE.IF with IF, ELSE, and END.IF when you want to perform multiple actions based on a condition. This method is preferable to using GOTO because it makes your macros more structured.

Syntax

ELSE.IF(logical_test)

Logical_test    is a logical value that ELSE.IF uses to determine what functions to carry out next—that is, where to branch.

 

Remarks

 

For more information about ELSE, ELSE.IF, END.IF, and IF, and for examples of these functions, see form 2 of the IF function.

Related Functions

ELSE   Specifies an action to take if an IF function returns FALSE

END.IF   Ends a group of macro functions started with an IF statement

IF   Specifies an action to take if a logical test is TRUE

Return to index