Easy Explanation Notes with Examples

Return different values based on condition

To return different values based on condition e.g. student’s result based on numbers obtained, use the CHOOSE function.

For example, you want student grade corresponding to score obtained.

For that, type the CHOOSE function with the following conditions:


2- Result.

Explanation. The CHOOSE function has two arguments i.e. index number argument which uses to specify a value from a list and secondly value argument which is a list of values to be selected corresponding to the index number.

In the above example, index number argument is:
index_num = ((B9>=90)+(B9>=80)+(B9>=70)+(B9>=60)+(B9>=50)) where, you set each condition like (B9>=90) means the value in B9 is greater than or equal to 90 and so on.

Once you specify the index_num then mention the list to return if the specified conditions are true:

value1, [value2], … = “Fail”,”Poor”,”Fair”,”Good”,”Excellent”

Copyright © 2016 - 2018 Explainry.com | All Rights Reserved