Excel: How to Create a Pass or Fail Formula

You can use the following formula in Excel to return either “Pass” or “Fail” based on the grade of a particular student:

=IF(B2>60, "Pass", "Fail")

This particular formula returns “Pass” if the value in cell B2 is greater than 60 or “Fail” otherwise.

Feel free to change 60 to any value you’d like based on the value that is considered passing or failing.

The following example shows how to use this formula in practice.

Example: How to Create a Pass or Fail Formula in Excel

Suppose we have the following dataset in Excel that shows the final grade various students received in some class:

Suppose we would like to create a new column that shows whether or not each student passed the class based on whether their grade was greater than 60 or not.

We can type the following formula into cell C2 to do so:

=IF(B2>60, "Pass", "Fail")

We can then click and drag this formula down to each remaining cell in column C:

Excel pass or fail formula

Column C now displays “Pass” for each student who had a grade greater than 60 and “Fail” for each student who had a grade less than or equal to 60.

If you’d like, you can also apply conditional formatting to the cells in column C to more easily tell which students passed the class.

To do so, highlight the cell range C2:C13, then click the Conditional Formatting icon on the Home tab, then click Highlight Cells Rules, then click Equal To:

In the new window that appears, type Pass in the Format cells that are EQUAL TO box and choose Green Fill with Dark Green Text as the conditional formatting:

Once you click OK, each cell that contains a value of “Pass” will be highlighted:

This allows us to more easily see which students passed and which ones did not.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

Excel: How to Use an IF Function with 2 Conditions
Excel: How to Use an IF Function with 3 Conditions
Excel: How to Use IF Function with Colors

Featured Posts

Leave a Reply

Your email address will not be published. Required fields are marked *