- Picture and text skills
- Case
You can use Index_num to return a number in a numeric parameter list.
Use function CHOOSE to return any of up to 29 values based on index number to be selected. For example, if the value
1 to 7 represent the 7 days of a week. When a number between 1 and 7 is used as Index_num, the function CHOOSE returns one of the days.
Syntax
CHOOSE(Index_num,value1,value2,...)
Index_num is the parameter value used to indicate the serial number of the parameter to be selected.
Index_num must be a number between 1 and 29, or a formula or cell reference containing the numbers 1 to 29 .
• If Index_num is 1, function CHOOSE returns value1; if it is 2, function CHOOSE returns value2, and so on.
• If Index_num is less than 1 or greater than the list The serial number of the last value in , the function CHOOSE returns the error value #VALUE!.
• If Index_num is a decimal, then in Will be truncated before use.
Value1,value2,... are 1 to 29 numeric parameters, and the function CHOOSE is based on Index_num, from which it selects a value or performs the corresponding operation.
Parameters can be numbers, cell references, defined names, formulas, functions, or text.
Description
• If Index_num is an array, each value will be calculated when the function CHOOSE is calculated.
• The numeric parameters of the function CHOOSE can not only It can be a single value or a range reference.
For example, the following formula:
=SUM(CHOOSE(2,A1:A10,B1:B10,C1:C10))
Equivalent to:
=SUM(B1:B10)
Then returns a value based on the values in the range B1:B10.
Function CHOOSE is calculated first and returns reference B1:B10. The function SUM then performs the sum calculation using B1:B10.
The result of function CHOOSEis the parameter of function SUM.
Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/cha-zhao-he-yin-yong-han-shu-qiao-yong-CHOOSE-han-shu-shai-xuan-shu-ju.html
评论列表(196条)
测试