Excel Study · Module 3: Decisions with IF
Class 21IF: pass or fail
Basics1:29 videoFree
The IF function makes a decision: it tests something, then shows one result when the test is true and another when it is false. Here: Pass when the marks are 40 or more, otherwise Fail.
Try this AI prompt
Works in ChatGPT, Gemini, Copilot or Claude.
In Excel, B2 has a student's marks. Write a formula for D2 that shows Pass if the marks are 40 or more, otherwise Fail.
The answer that works
✓ checked in Excel=IF(B2>=40,"Pass","Fail")
AI can get Excel wrong. Paste its answer into Excel and test it before you trust it.