Function Choose()

Choose()

This function is used to perform an action from a defined list of actions, based on the index number provided to the function.


Syntax:

= Choose (Index_number, Option1, Option2, ..., OptionX)

Index_number: This is the numeric value that is passed on to the function to choose from the list of actions provided to the function
Option1,2...X: List of actions / outputs / results from which one should be choosen a result based on the Index number


Example:

Let us take an example where the function in cell 'B1' is written as -

= Choose (A1,"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten")

Now, let us apply validation to cell A1, so that this cell should accept only values between 1 and 10. Learn here about applying data validation.

This is just to avoid any errors in cell B1 where Choose() function is used, as we have defined only from 1 to 10.

Now you can input any value in cell A1 and you would see the results in cell B1. The cell B1 will give text name of the number entered in cell A1. Such as:
  • If cell A1 = 1 then the cell B1 will show - One
  • If cell A1 = 3 then the cell B1 will show - Three
  • If cell A1 = 7 then the cell B1 will show - Seven
  • If cell A1 = 5 then the cell B1 will show - Fice
Here is a snapshot of the same example (i have used cell C1 and D1 to optimize the space taken by the screen shot):



Application:

This function is generally used where the limitations of If() function creep in. As we know that If() cannot be used more than 7 times in a cell. Now, if really need to have more than 7 options, then choose is the best option available.

It can also be used to hard-code a list of options within a cell. For example, a worksheet has a drop-down menu from which a selection can be made. The drop-downs, as you would know, gives only the index of option selected and not the selection as such. In such cases, this function can be used to manipulate the index number provided to fetch the text of the option selected.
Share on Google Plus

About Dhakkanz

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Sunday, July 26, 2009

Function Choose()

Choose()

This function is used to perform an action from a defined list of actions, based on the index number provided to the function.


Syntax:

= Choose (Index_number, Option1, Option2, ..., OptionX)

Index_number: This is the numeric value that is passed on to the function to choose from the list of actions provided to the function
Option1,2...X: List of actions / outputs / results from which one should be choosen a result based on the Index number


Example:

Let us take an example where the function in cell 'B1' is written as -

= Choose (A1,"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten")

Now, let us apply validation to cell A1, so that this cell should accept only values between 1 and 10. Learn here about applying data validation.

This is just to avoid any errors in cell B1 where Choose() function is used, as we have defined only from 1 to 10.

Now you can input any value in cell A1 and you would see the results in cell B1. The cell B1 will give text name of the number entered in cell A1. Such as:
  • If cell A1 = 1 then the cell B1 will show - One
  • If cell A1 = 3 then the cell B1 will show - Three
  • If cell A1 = 7 then the cell B1 will show - Seven
  • If cell A1 = 5 then the cell B1 will show - Fice
Here is a snapshot of the same example (i have used cell C1 and D1 to optimize the space taken by the screen shot):



Application:

This function is generally used where the limitations of If() function creep in. As we know that If() cannot be used more than 7 times in a cell. Now, if really need to have more than 7 options, then choose is the best option available.

It can also be used to hard-code a list of options within a cell. For example, a worksheet has a drop-down menu from which a selection can be made. The drop-downs, as you would know, gives only the index of option selected and not the selection as such. In such cases, this function can be used to manipulate the index number provided to fetch the text of the option selected.

Function Choose()SocialTwist Tell-a-Friend

0 comments:

Post a Comment