依原書「The Formulas Are Unnecessarily Long and Complicated」,以 student fees formula 示範「as simple as possible, as complex as necessary」。
Business logic 很簡單:Student Numbers × Load per Student × Fees per Load Unit = Total Fees,但若把兩個 VLOOKUP 全塞入同一 formula,使用者很難驗證。
| 形式 | 原書內容 |
|---|---|
| Business Equation | Student Numbers × Load per Student × Fees per Load Unit |
| Excel Formula | =B3*VLOOKUP($A12,Assumptions!$A$2:$B$7,2,0)*VLOOKUP($A12,Assumptions!$A$1:$C$7,3,0) |
把 lookup workings 拆成獨立、可命名的 calculation rows/blocks,再在 final line 只做簡單乘法。不是禁止 advanced functions,而是避免把多層邏輯藏在單一 cell 中。
| 設計 | Auditability | Maintainability |
|---|---|---|
| 一格長公式 | 較低 | 修改容易牽動多層邏輯 |
| 分離 workings | 較高 | 每一步可獨立檢查 |
公式「短」不是目的,可理解才是目的。模型應讓下一位使用者,也讓幾個月後的自己,能迅速看懂 calculation chain。
請將包含兩個 lookup 與一個 multiplication 的長公式拆成三個清楚 calculation steps,要求 output 完全相同,但每個 intermediate result 都可單獨 audit。
**問題:**使用更高階、更複雜的函數是否一定代表模型更專業?