Spreadsheet Practice

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 to C7
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"

  1. B278

    The value in B2.

  2. $F$165

    The value in F1.

  3. B2>=$F$1TRUE

    The >= operator tests at least.

  4. IF(B2>=$F$1,"Pass","Fail")"Pass"

    IF: Returns one value if a test is true, another if false.

    • logical_testB2>=$F$1TRUE
    • value_if_true"Pass"
    • value_if_false"Fail"not used

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.

FormulaResultWhen 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 resultUse > 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

In 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.