Excel CHOOSE function with formula examples

The tutorial explains the syntax and basic uses of the CHOOSE function and provides a few non-trivial examples showing how to use a CHOOSE formula in Excel.

CHOOSE is one of those Excel functions that may not look useful on their own, but combined with other functions give a number of awesome benefits. At the most basic level, you use the CHOOSE function to get a value from a list by specifying the position of that value. Further on in this tutorial, you will find several advanced uses that are certainly worth exploring.

Excel CHOOSE function - syntax and basic uses

The CHOOSE function in Excel is designed to return a value from the list based on a specified position.

The syntax of the CHOOSE function is as follows:

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

Where:

Index_num  (required) - the position of the value to return. It can be any number between 1 and 254, a cell reference, or another formula.

Value1, value2, …   - a list of up to 254 values from which to choose.  Value1 is required, other values are optional. These can be numbers, text values, cell references, formulas, or defined names.

Here's an example of a CHOOSE formula in the simplest form:

=CHOOSE(3, "Mike", "Sally", "Amy", "Neal")

The formula returns "Amy" because index_num is 3 and "Amy" is the 3rd value in the list:
Using the CHOOSE function in Excel

Excel CHOOSE function - 3 things to remember!

CHOOSE is a very plain function and you will hardly run into any difficulties implementing it in your worksheets. If the result returned by your CHOOSE formula is unexpected or not the result you were looking for, it may be because of the following reasons:

  1. The number of values to choose from is limited to 254.
  2. If index_num is less than 1 or greater than the number of values in the list, the #VALUE! error is returned.
  3. If the index_num argument is a fraction, it is truncated to the lowest integer.

How to use CHOOSE function in Excel - formula examples

The following examples show how CHOOSE can extend the capabilities of other Excel functions and provide alternative solutions to some common tasks, even to those that are considered unfeasible by many.

Excel CHOOSE instead of nested IFs

One of the most frequent tasks in Excel is to return different values based on a specified condition. In most cases, this can be done by using a classic nested IF statement. But the CHOOSE function can be a quick and easy-to-understand alternative.

Example 1. Return different values based on condition

Supposing you have a column of student scores and you want to label the scores based on the following conditions:

Result Score
Poor  0 - 50
Satisfactory 51 - 100
Good 101 - 150
Excellent over 151

One way to do this is to nest a few IF formulas inside each other:

=IF(B2>=151, "Excellent", IF(B2>=101, "Good", IF(B2>=51, "Satisfactory", "Poor")))

Another way is to choose a label corresponding to the condition:

=CHOOSE((B2>0) + (B2>=51) + (B2>=101) + (B2>=151), "Poor", "Satisfactory", "Good", "Excellent")

A CHOOSE formula as an alternative to nested IFs

How this formula works:

In the index_num argument, you evaluate each condition and return TRUE if the condition is met, FALSE otherwise. For example, the value in cell B2 meets the first three conditions, so we get this intermediate result:

=CHOOSE(TRUE + TRUE + TRUE + FALSE, "Poor", "Satisfactory", "Good", "Excellent")

Given that in most Excel formulas TRUE equates to 1 and FALSE to 0, our formula undergoes this transformation:

=CHOOSE(1 + 1 + 1 + 0, "Poor", "Satisfactory", "Good", "Excellent")

After the addition operation is performed, we have:

=CHOOSE(3, "Poor", "Satisfactory", "Good", "Excellent")

As the result, the 3rd value in the list is returned, which is "Good".

Tips:

  • To make the formula more flexible, you can use cell references instead of hardcoded labels, for example:

    =CHOOSE((B2>0) + (B2>=51) + (B2>=101) + (B2>=151), $E$1, $E$2, $E$3, $E$4)

  • If none of your conditions is TRUE, the index_num argument will be set to 0 forcing your formula to return the #VALUE! error. To avoid this, simply wrap CHOOSE in the IFERROR function like this:

    =IFERROR(CHOOSE((B2>0) + (B2>=51) + (B2>=101) + (B2>=151), "Poor", "Satisfactory", "Good", "Excellent"), "")

Example 2. Perform different calculations based on condition

In a similar fashion, you can use the Excel CHOOSE function to perform one calculation in a series of possible calculations/formulas without nesting multiple IF statements inside each other.

As an example, let's calculate the commission of each seller depending on their sales:

Commission Sales
5% $0 to $50
7% $51 to $100
10% over $101

With the sales amount in B2, the formula takes the following shape:

=CHOOSE((B2>0) + (B2>=51) + (B2>=101), B2*5%, B2*7%, B2*10%)

CHOOSE formula to perform different calculations based on condition

Instead of hardcoding the percentages in the formula, you can refer to the corresponding cell in your reference table, if there is any. Just remember to fix the references using the $ sign.

=CHOOSE((B2>0) + (B2>=51) + (B2>=101), B2*$E$2, B2*$E$3, B2*$E$4)

Excel CHOOSE formula to generate random data

As you probably know, Microsoft Excel has a special function to generate random integers between the bottom and top numbers that you specify - RANDBETWEEN function. Nest it in the index_num argument of CHOOSE, and your formula will generate almost any random data you want.

For example, this formula can produce a list of random exam results:

=CHOOSE(RANDBETWEEN(1,4), "Poor", "Satisfactory", "Good", "Excellent")

Excel CHOOSE formula to generate random data

The formula's logic is obvious: RANDBETWEEN generates random numbers from 1 to 4 and CHOOSE returns a corresponding value from the predefined list of four values.

Note. RANDBETWEEN is a volatile function and it recalculates with every change you make to the worksheet. As the result, your list of random values will also change. To prevent this from happening, you can replace formulas with their values by using the Paste Special feature.

CHOOSE formula to do a left Vlookup

If you have ever performed a vertical lookup in Excel, you know that the VLOOKUP function can only search in the left-most column. In situations when you need to return a value to the left of the lookup column, you can either use the INDEX / MATCH combination or trick VLOOKUP by nesting the CHOOSE function into it. Here's how:

Supposing you have a list of scores in column A, student names in column B, and you want to retrieve a score of a particular student. Since the return column is to the left of the lookup column, a regular Vlookup formula returns the #N/A error:

Excel VLOOKUP cannot look to the left.

To fix this, get the CHOOSE function to swap the positions of columns, telling Excel that column 1 is B and column 2 is A:

=CHOOSE({1,2}, B2:B5, A2:A5)

Because we supply an array of {1,2} in the index_num argument, the CHOOSE function accepts ranges in the value arguments (normally, it doesn't).

Now, embed the above formula into the table_array argument of VLOOKUP:

=VLOOKUP(E1,CHOOSE({1,2}, B2:B5, A2:A5),2,FALSE)

And voilà - a lookup to the left is performed without a hitch!

VLOOKUP/CHOOSE formula to do a left lookup

CHOOSE formula to return next working day

If you are not sure whether you should go to work tomorrow or can stay at home and enjoy your well-deserved weekend, the Excel CHOOSE function can find out when the next work day is.

Assuming your working days are Monday to Friday, the formula goes as follows:

=TODAY()+CHOOSE(WEEKDAY(TODAY()),1,1,1,1,1,3,2)

CHOOSE formula to return the next working day after today

Tricky at first sight, upon a closer look the formula's logic is easy to follow:

WEEKDAY(TODAY()) returns a serial number corresponding to today's date, ranging from 1 (Sunday) to 7 (Saturday). This number goes to the index_num argument of our CHOOSE formula.

Value1 - value7 (1,1,1,1,1,3,2) determine how many days to add to the current date. If today is Sunday - Thursday (index_num 1 - 5), you add 1 to return the next day. If today is Friday (index_num 6), you add 3 to return next Monday. If today is Saturday (index_num 7), you add 2 to return next Monday again. Yep, it's that simple :)

CHOOSE formula to return a custom day/month name from date

In situations when you want to get a day name in the standard format such as full name (Monday, Tuesday, etc.) or short name (Mon, Tue, etc.), you can use the TEXT function as explained in this example: Get day of week from date in Excel.

If you wish to return a day of the week or a month name in a custom format, use the CHOOSE function in the following way.

To get a day of the week:

=CHOOSE(WEEKDAY(A2),"Su","Mo","Tu","We","Th","Fr","Sa")

To get a month:

=CHOOSE(MONTH(A2), "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

Where A2 is the cell containing the original date.

CHOOSE formula to return a custom day/month name from date

I hope this tutorial has given you some ideas of how you can use the CHOOSE function in Excel to enhance your data models. You are welcome to download our Excel CHOOSE function examples to have a closer look and probably reverse-engineer them for your needs. I thank you for reading and hope to see you on our blog next week!

You may also be interested in:

5 Responses to "Excel CHOOSE function with formula examples"

  1. berbagi73 says:

    nice tips... thank's for share.

  2. Meni Porat says:

    You can both simplify the formula and "improve" it by "dynamic coding".
    The following formula:
    =CHOOSE((B2>0)+(B2>=51)+(B2>=101)+(B2>=151),$E$1,$E$2,$E$3,$E$4)

    is better than:
    =CHOOSE((B2>0)+(B2>=51)+(B2>=101)+(B2>=151),"Poor", "Satisfactory", "Good", "Excellent")

    A reference to a cell is always better than "hard coding".

    The same principle applies to the commission example, too.

    Best Regards,
    Meni Porat

  3. Faisal says:

    Hi,
    I need help to all of you
    actually i am creating a incentive calculator for my Sales team
    according to our incentive policy
    if a sales person achive his monthly target then the total unit multiply with the rate,

    here is 2 different situation apply

    1st situation
    if a person achive his monthly target >100%
    for example
    a person sale a product 110unit
    100 unit is a monthly target
    the 100 unit multiply with 100% slab and rest of the 10 unit multiply with >100% or 110% slab.
    the slab are also mention here
    <80% <89% <99% 100% 110%
    56 62.3 69.3 70 87.5 105

    kindly suggest me some better option for the calculating of these incentive

    • Doug says:

      Faisal:
      If I understand your question here's the formula for the calculation:
      =IF(M32<=80,(M32*56),IF(M32<=89,(M32*62.3),IF(M32<=99,(M32*69.3),IF(M32100,(M32*87.5))))))
      Enter this into an empty cell and enter the achieved amount in M32. If you want to enter the achieved amount in another cell, change the "M32" addresses in the formula to that cell's address.

  4. abdul jabbar says:

    Why it always says ''error'' when i put 5 choices?

Post a comment



Unfortunately, due to the volume of comments received we cannot guarantee that we will be able to give you a timely response. When posting a question, please be very clear and concise. We thank you for understanding!
Excel add-ins and Outlook tools - Ablebits.com
Ultimate Suite 2018.4 Summer Offer