VBA Choose Function: The Choose function in VBA chooses function selects the corresponding value from a list of arguments depending as per the specified index.

Syntax

Parameter

Index (required) – This parameter represents the index of the value that you want to return. It must be a positive integer value (greater than 0) and less than or equal to a number of specified choices.

Choose-1 (optional)…- This parameter represents a list of possible values to be returned.

Return

This function returns a value from the list of arguments depending upon the specified index. It returns Null if the index is less than or equal to 0 or is greater than the number of choices.

Example 1

Output

Your favorite language is VBA

VBA Choose Function

Example 2

Output

VBA Choose Function
VBA Choose Function

Example 3

Output

VBA Choose Function

Pin It on Pinterest

Share This