重建原書 Figure 4-5~4-7 的 dynamic link/hard-coded input 例子,示範 input 改變後文字與成本應自動更新。
原書例子中,billable hours 從 15 改為 20;Team Leader cost 會由 1,200 改成 1,600。依此可反推出 hourly rate 為 80。
| 項目 | Base | What-if | 來源 |
|---|---|---|---|
| Billable Hours | 15 | 20 | 原書 |
| Team Leader Hourly Rate | 80 | 80 | 由 1,200÷15 與 1,600÷20 推得 |
| Team Leader Cost | 1,200 | 1,600 | 原書 |
成本使用 linked formula,例如 =B3*$C$2;說明文字可用 ="Calculations based on "&C2&" hours of billable time spent.",使文字也隨 input 更新。
| Hours | Rate | Cost | Dynamic Text |
|---|---|---|---|
| 15 | 80 | 1,200 | Calculations based on 15 hours of billable time spent. |
| 20 | 80 | 1,600 | Calculations based on 20 hours of billable time spent. |
若成本或說明文字直接 hard-code 15 或 1,200,input 改變後不同位置可能互相矛盾。原書因此要求 calculation cells 儘量 link,只有真正的 input cells 才 hard-code。
請只根據 15→20 hours、80/hour、1,200→1,600 cost,說明哪些 cells 應是 inputs、哪些應是 formulas,並指出 hard-coding 會造成什麼維護風險。
**問題:**若 billable hours 改為 25、rate 不變,cost 為何?