# How to show pass or fail based on a score in Excel

Compare the score with a pass mark kept in a cell: =IF(B2>=$F$1,"Pass","Fail").

**Excel:** `=IF(B2>=$F$1,"Pass","Fail")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Student | Score | Result |  | Pass mark | 65 |
| Ava | 78 |  |  |  |  |
| Ben | 64 |  |  |  |  |
| Cleo | 65 |  |  |  |  |
| Dan | 91 |  |  |  |  |
| Eve | 47 |  |  |  |  |
| Finn | 70 |  |  |  |  |

Formula in C2, filled to C7: `=IF(B2>=$F$1,"Pass","Fail")`

Result: Pass; Fail; Pass; Pass; Fail; Pass

## How it works

`B2>=$F$1` is TRUE when the score is at least the pass mark, so Cleo's 65 passes. IF returns the first label for TRUE and the second for FALSE. Keeping the pass mark in `F1` lets you change it once instead of editing every formula.

## Other ways

- `=IF(B2<$F$1,"Fail","Pass")`: The same rule written from the failing side.
- `=IF(B2>$F$1,"Pass","Fail")`: Use > only when a score equal to the mark should fail. (Cleo, exactly on the pass mark, fails.)

## Common mistakes

- > versus >= decides what happens exactly on the mark. Check the boundary case before you fill down.
- An empty score counts as 0 and shows "Fail". Add a blank check: `=IF(B2="","",IF(B2>=$F$1,"Pass","Fail"))`.
- A score typed as text ("70") is greater than any number in a comparison, so it always passes. Convert the column to numbers first.

## Questions

**How do I require a pass in every subject?**

Use AND: `=IF(AND(B2>=$F$1,C2>=$F$1),"Pass","Fail")`, or `MIN(B2:D2)>=$F$1` for many columns.

**How do I count how many passed?**

Count the labels: `=COUNTIF(C2:C7,"Pass")`, or count scores directly with `=COUNTIF(B2:B7,">="&F1)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/pass-or-fail-formula
