案例01|Formula vs Function:SUM 與 Noncontiguous Subtotals

案例02|MAX/MIN/AVERAGE:Inventory Spread 與 Blank vs Zero

案例03|COUNT/COUNTA:Wedding Invitations、12-Month Forecast 與 Headcount

案例04|ROUND/ROUNDUP:Call Center 的 Stepped Cost 五年預測

案例05|IF/IFERROR:Actual vs Budget 的 -10% Variance Alert

案例06|COUNTIF/SUMIF:Region Sales 與 Range-Mismatch Error Check

案例07|VLOOKUP vs XLOOKUP:Region Abbreviation Mapping 與 Insert-Column Risk

案例08|SUMIFS 與進階函數:多條件彙總與「找更簡單的方法」

核心表格

核心主題 主要觀點/方法 實務用途 重要條件/限制/延伸
Formula vs Function Formula 是任意 Excel calculation;function 是 Excel 預先定義的 calculation 選擇最清楚的建模方法 知道更多 functions 不等於模型更好;應優先可讀、可 audit
SUM 可加總 contiguous/noncontiguous ranges Totals、subtotals、financial statements 若 range 同時包含明細與 subtotal,可能 double count
MAX/MIN 找最大、最小值;MAX−MIN 可衡量 spread Inventory volatility、range analysis 拆成 intermediary calculations 往往比一條長公式更容易 audit
AVERAGE 計算 mean;忽略 blank,但會把 0 納入 Monthly averages、run-rate calculations Blank 與 zero 的商務含義必須區分
COUNT/COUNTA COUNT 只數 numerical values;COUNTA 數所有 non-empty cells Elapsed months、headcount、records ?、TBD 等 placeholders 是否應計入取決於 business definition
ROUND/ROUNDUP/ROUNDDOWN 真正改變計算值,而不是只改 number format Staffing、capacity、cash-flow corkscrew、報表 不可分割的資源常需要 ROUNDUP
IF/IFERROR IF 根據 logical test 切換 output;IFERROR 捕捉 formula errors Scenario logic、variance alerts、error handling Threshold 應放在 input cell;不要用 IFERROR 掩蓋未理解的錯誤
COUNTIF/SUMIF 按單一 criteria 計數或加總 Region/product summaries、management reporting Criteria range 與 sum range 必須 row-for-row 對齊
VLOOKUP/HLOOKUP 依 lookup field 回傳 table 中對應值 Mapping、assumption retrieval Hard-coded index 容易被插欄/插列破壞;exact match 常應指定 0/FALSE
XLOOKUP Separate lookup/return arrays 較 robust 的 mapping 原書以 2022 年 Microsoft 365 可用性為背景
SUMIFS/Advanced Functions 當單一 criteria 不足時,改用真正支援多 criteria 的 function 多維彙總與 dashboard data 公式太長時應重新找更適合工具,而不是持續堆 nested logic

Formula 與 Function 不完全相同

原書先區分兩個常被混用的詞:

因此 =MAX(A1:B20) 是「含有 function 的 formula」。

原書的核心觀點不是要背越多 functions 越好,而是:面對同一問題通常有數種做法,應選最清楚、最容易讓別人理解、最容易 audit 的那一種。

SUM:最簡單的函數也會被用錯

SUM 可處理連續 range,也可處理 noncontiguous cells。原書 Figure 7-3 的例子中,row 8 與 row 15 已經是 subtotals,因此 full-year total 使用 =SUM(B8,B15);如果把明細與 subtotal 一起全部加總,就會 double count。

這個例子提醒:function 本身正確,不代表 range selection 正確。

MAX、MIN 與 Inventory Spread