How to show pass or fail based on a score in Excel
Formula (Excel and Google Sheets)
=IF(B2>=$F$1,"Pass","Fail")Compare the score with a pass mark kept in a cell: =IF(B2>=$F$1,"Pass","Fail").
- Result on the example
- one result per row in
C2, filled down toC7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in C2, filled down to C7. Change any input and the result updates, or edit the formula to experiment.
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.
=IF(B2>=$F$1,"Pass","Fail")Result"Pass"
B278The value in B2.
$F$165The value in F1.
B2>=$F$1TRUEThe >= operator tests at least.
IF(B2>=$F$1,"Pass","Fail")"Pass"IF: Returns one value if a test is true, another if false.- logical_test
B2>=$F$1TRUE - value_if_true
"Pass" - value_if_false
"Fail"not used
- logical_test
In Google Sheets
The same formula works in Google Sheets: =IF(B2>=$F$1,"Pass","Fail"). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =IF(B2<$F$1,"Fail","Pass") | Pass, Fail, Pass… | The same rule written from the failing side. |
| =IF(B2>$F$1,"Pass","Fail") | Pass, Fail, Fail…Different result | 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.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Show pass or fail based on a score
C2, show "Pass" when the score reaches the pass mark in F1 and "Fail" otherwise. Fill down to C7.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).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.