FormulaCraft

How to write an IF-THEN formula in Excel and Google Sheets

Excel & Google Sheets
=IF(B2>=50, "Pass", "Fail")

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Decide the test, e.g. is the score in B2 at least 50?
  2. 2Enter =IF(B2>=50, "Pass", "Fail").
  3. 3The cell shows "Pass" when true and "Fail" when false. Copy it down.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

How do I check more than one condition?

Nest AND or OR inside IF, e.g. =IF(AND(B2>0, C2="Open"), ...), or use IFS for several ordered conditions.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: