12.1 Use formulas to handle association

 

Here below is an Excel file book1.xlsx, which stores employees’ meal data. Part of the data is as follows:

imagepng

The task is to calculate the values in column C according to the following pricing rules:

imagepng

Since there are only a few rows in this table, we can enumerate them in the formula directly. Enter in cell C2:

=spl("=case(?1,""breakfast"":10,""lunch"":15,""supper"":20)",B2)

imagepng

Then drag C2 down to every relevant row:

imagepng


esProc Desktop and Excel Processing
11.13 Auto-aggregating in the case of multiple columns - unfixed number
12.2 Single column association