hands-onexcel

Hands-On Excel Practice IF

Excel IF function practice

Make your sheet decide: show "Pass" or "Fail" based on a score. One IF, three parts, and a lesson in the difference between > and >=.

Core · About 3 minutes · Free, no sign-up · Updated

Try it yourself

Write in the yellow cells, then press Check.

05 IF Core

Pass or fail?

A score of 50 or more passes. In column C, show "Pass" or "Fail" for each student.

IF has three parts: a test, what to show if it's true, and what to show if it's false. Text goes in "quotes".

C2

Tips: click a cell while typing a formula to insert it, drag to select a range, F4 adds $, Esc cancels.

The guide · IF

How IF works

IF asks a yes-or-no question and shows one thing for yes and another for no. =IF(B2>=50, "Pass", "Fail") reads as: if B2 is 50 or more, show Pass, otherwise show Fail.

Syntax

=IF(logical_test, value_if_true, [value_if_false])

Comparison operators

OperatorMeaning
=equal to
<>not equal to
> / <more than / less than
>= / <=at least / at most

Common mistakes

FAQ

How do I write an IF formula in Excel?
Use =IF(test, value_if_true, value_if_false), for example =IF(B2>=50,"Pass","Fail").
Why does my IF formula show #NAME?
Text results must be in double quotes. Write "Pass", not Pass.

Hands-On Excel Pro · coming soon

From first formula to job-ready.

  • 100+ challenges: lookups, pivot tables, dates, text cleanup, charts
  • An interview track modeled on the Excel tests employers use
  • Your progress saved across devices
  • New challenges every week
$29 one-time · early-bird price

You won't be charged today.

You're early!

Pro isn't open yet. We're building it right now. Leave your email and we'll hold the $29 early-bird price for you and tell you the day it launches.

One email when Pro launches. No spam.

New challenges every week.

Lookups, pivot tables, cleaning messy data, and a test-prep track for Excel assessments at job interviews. Get an email when new ones land.

Occasional emails, no spam, unsubscribe anytime.