Ghost Sheet

Cap a value with MIN in one formula

How do I limit a pension match to a share of salary?

It opens in your workspace. Write the formula in the sheet; when it matches, new data arrives and your formula is checked again.
D2Type a formula for D2, starting with =

Click the sheet or the button: the task opens in your workspace, ready to type

ABCDEFG
1NameSalaryPays inEmployer matchCap (share of salary)0.06
2Grace Obi64,4001,610Match rate0.5
3Tomas Novak76,4003,056
4Lena Park46,800936
5Omar Haddad77,6003,802
6Ravi Menon55,000660
7Eli Brooks41,8001,672
8Nora Kelly60,500908
9Felix Wong48,4001,258
10Maya Singh61,6003,388
11Owen Reyes70,800708
12Iris Lund49,8001,145
13
14
15
16
17
18
19
dashed: the answer to reachblack: matchesblue: right after new datared: wrong

Why it works

What it does
MIN of two values is the smaller one, so MIN(amount, cap) never goes above the cap. Many pay and bonus rules are “X, but no more than Y”; build them in one formula and keep each rule in its own cell.
The shape of the formula
=MIN(what they pay, cap share * salary) * match rate
How to remember it
MIN is a ceiling: the result can touch it but not pass it.
The usual mistake
Matching everything that is paid in. People who pay above the cap get matched past the rules.

Keep practicing

Updated