Sunday, June 12, 2022

Choose function

This article describes the formula syntax and usage of the CHOOSE function in Microsoft Excel.

Description

Uses index_num to return a value from the list of value arguments. Use CHOOSE to select one of up to 254 values based on the index number. For example, if value1 through value7 are the days of the week, CHOOSE returns one of the days when a number between 1 and 7 is used as index_num.

Syntax

CHOOSE(index_num, value1, [value2], ...)

The CHOOSE function syntax has the following arguments:

  • Index_num    Required. Specifies which value argument is selected. Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number between 1 and 254.

    • If index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.

    • If index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the #VALUE! error value.

    • If index_num is a fraction, it is truncated to the lowest integer before being used.

  • Value1, value2, ...     Value 1 is required, subsequent values are optional. 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or text.

Remarks

  • If index_num is an array, every value is evaluated when CHOOSE is evaluated.

  • The value arguments to CHOOSE can be range references as well as single values.

    For example, the formula:

=SUM(CHOOSE(2,A1:A10,B1:B10,C1:C10))

evaluates to:

=SUM(B1:B10)

which then returns a value based on the values in the range B1:B10.

The CHOOSE function is evaluated first, returning the reference B1:B10. The SUM function is then evaluated using B1:B10, the result of the CHOOSE function, as its argument.

Examples

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Data

 

1st

Nails

2nd

Screws

3rd

Nuts

Finished

Bolts

Formula

Description

Result

=CHOOSE(2,A2,A3,A4,A5)

Value of the second list argument (value of cell A3)

2nd

=CHOOSE(4,B2,B3,B4,B5)

Value of the fourth list argument (value of cell B5)

Bolts

=CHOOSE(3,"Wide",115,"world",8)

Value of the third list argument

world

Example 2

Data

23

45

12

10

Formula

Description (Result)

Result

=SUM(A2:CHOOSE(2,A3,A4,A5))

Sums the range A2:A4. The CHOOSE function returns A4 as the second part of the range for the SUM function.

80

3 comments:

  1. I am indeed filled with satisfaction and joy at the moment, my credit profile is as good as ever. Initially, I thought it won’t possible but with the help of KENSTAR and his team it was. Having a high FICO score, clean records and all traces of late payments gone. I recommend Kenstar Cyber services to you all. Contact them now for all types of credit repair, CHEX system or DUI Fix (KENSTARCYBERSERVICES@GMAIL.COM). Thanks

    ReplyDelete
  2. Infidelity has been one of the major causes of conflict in marriages, relationships and courtship. Partners have been cheating on one another and covering their imperfections which would later result in fight and mistrust, the fear of knowing what your spouse is doing behind closed doors is a major problem. If you need to spy on your partner contact (hackerspyville@gmail.com) for help.

    ReplyDelete
  3. About 2 weeks ago I tried getting a loan but to no avail, I didn’t get an approval due to low credit score of 415. I came across a testimony on a comment session about a credit Expert called KENSTAR, helping people get their credit fixed in a week or more. I decided to give a try, to my greatest surprise he removed all negative items in my profile and increased my score up to 800. I advise you all to email him on KENSTARCYBERSERVICES@GMAIL.COM . He is truly the best in terms of credit repair services.

    ReplyDelete