Case Function
The CASE function returns a result based on a series of conditions. If the first condition is met, it returns the first value, otherwise, it tests the second and subsequent conditions. An optional expression may be entered as the last option. If none of the cases are true, the function returns zero unless a default argument is supplied as the last argument.
Syntax
CASE(condition1,value1,<condition2,value2,<expression>>)
Example
CASE(c16=1,"retained earnings",c17=1,"partners' capital",C18=1,"proprietors' capital")
If cell C16 is equal to one, the cell displays Retained Earnings. If cell C17 is equal to one, the cell displays Partners' Capital, and if cell C18 is equal to one the cell displays Proprietors' Capital. If none of the above conditions are true, the default value is zero.