GESTEP function
Returns 1 if a number is greater than or equal to a threshold (step), otherwise 0. Default threshold is 0.
Available in Excel 2007 and later (Excel 2003 needed the Analysis ToolPak add-in), Microsoft 365, Excel for the web, Excel for Mac
Excel 2007 and laterWorks in Google Sheets
Syntax
GESTEP(number, [step])| Argument | What it means | |
|---|---|---|
number | Required | The value to test. |
step | Optional | The threshold. If omitted, Excel uses 0. |
Returns: 1 if number ≥ step, otherwise 0.
How GESTEP works
GESTEP ("greater than or equal to step") is a unit-step function: it returns 1 once a value reaches a threshold and 0 below it. Engineers use step functions to model switches turning on at a certain time; in everyday spreadsheets it is a compact way to count how many people hit a target or to switch a bonus on.
The threshold is inclusive, so a value exactly equal to step returns 1. Without step, the threshold is 0, which makes GESTEP(x) a quick test for "not negative". Only numbers are accepted; text returns #VALUE!.
=--(A2>=B2) does the same thing in plain Excel, and COUNTIF with ">="&target counts values above a threshold across a range.
Examples
1Did the salesperson hit target?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Rep | Sales | Target | |
| 2 | Ana | 52000 | 50000 | 1 |
Result: 1
52,000 is at least 50,000, so GESTEP returns 1. Multiply by a bonus amount, e.g. =GESTEP(B2,C2)*500, to pay the bonus only when the target is met.
2Count passes with a sum of steps
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Student | Score | ||
| 2 | Ben | 68 | 2 | |
| 3 | Cara | 49 | ||
| 4 | Dev | 50 |
Result: 2
The pass mark is 50 and it is inclusive: 68 passes, 49 fails and exactly 50 passes, giving 2.
3Default step of zero
| A | B | |
|---|---|---|
| 1 | Temperature (°C) | |
| 2 | -3 | 0 |
Result: 0
Without step, the threshold is 0. -3 is below zero, so the result is 0 (frost).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | number or step is non-numeric text. | Convert with VALUE or test with ISNUMBER. |
Tips
- GESTEP returns 1/0, not TRUE/FALSE, which makes it easy to multiply or add.
- For a strict "greater than" test use
=--(A2>B2)instead.
Google Sheets
GESTEP also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
GESTEP in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | GETRIN |
| Dutch | GROTER.DAN |
| Finnish | RAJA |
| French | SUP.SEUIL |
| German | GGANZZAHL |
| Hungarian | KÜSZÖBNÉL.NAGYOBB |
| Italian | SOGLIA |
| Norwegian (Bokmål) | GRENSEVERDI |
| Polish | SPRAWDŹ.PRÓG |
| Portuguese (Brazil) | DEGRAU |
| Portuguese (Portugal) | DEGRAU |
| Russian | ПОРОГ |
| Spanish | MAYOR.O.IGUAL |
| Swedish | SLSTEG |
| Turkish | BESINIR |