#128 — Use Formulas to Handle Association in Excel

#128 — Use Formulas to Handle Association in Excel

Problem description & analysis:

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

Task: Calculate the values in column C according to the following pricing rules 👇

Solution:

Since there are only a few rows in this table, we can enumerate them in the formula directly. Use SPL XLL and enter in cell C2:

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

The result is:

Then drag C2 down to every relevant row:


Download esProc Desktop for FREE and enhance your Excel workflow using SPL XLL!! 🚀✨⬇️

✨SPL download address: esProc Desktop FREE Download

✨Plugin Installation Method: SPL XLL Installation and Configuration

✨References to other rich Excel operation cases: Desktop and Excel Data Processing Cases

✨YouTube FREE courses: SPL Programming