Excel IF Function Basics Quick Reference | The Excel Guide

Learn how to create basic logical conditions.

My father handed me a printed spreadsheet in 2006 and asked if I could make it smarter. He wanted a single column to automatically flag whether each expense pushed us into a higher tax bracket. I was 16, had no idea what I was doing, and spent about two hours in Excel's help files before I found the IF function. That moment — watching a cell change its own output based on a condition I'd written — was the first time I realized a spreadsheet could think. That's exactly what this Excel IF function quick reference is built around: not syntax for its own sake, but the logic underneath it.

Every other article on this topic is a 2,000-word tutorial. This isn't that. This is the one-page reference you keep open in a second tab: syntax card, real patterns, common mistakes, and a quick answer to the IF vs. IFS question. All you need before you start is an open Excel workbook.


The IF Function in Plain English (Before Any Syntax)

The IF function asks a yes-or-no question about a cell. If the answer is yes, it returns one thing. If the answer is no, it returns something else. That's the entire concept. It's a fork in the road, and you're the one who decides what happens at each branch.

If you already understand Excel formulas for beginners at a basic level, IF is the first formula that feels like actual decision-making rather than arithmetic.

What to Have Ready Before You Write Your First Formula

Open a workbook. Put some data in column A — names, numbers, anything real. That's it. You don't need a template or sample data from a course. The fastest way to learn this is to test it on something you already recognize.


Step 1: Read the Syntax So the Formula Stops Looking Like Noise

Now that you know what IF does conceptually, the syntax will make sense on first read instead of looking like a foreign language.

The Three-Part Structure: Logical Test, Value If True, Value If False

Argument What It Is Example
logical_test The yes/no question Excel evaluates B2>1000
value_if_true What the cell shows when the answer is yes "Bonus"
value_if_false What the cell shows when the answer is no "No Bonus"

The full syntax looks like this:

=IF(logical_test, value_if_true, value_if_false)

Ask a question, then tell Excel what to do with each possible answer.

Your First IF Formula (Copy This Exact Pattern)

Say column A has sales rep names (Sarah Chen, Marcus Rivera, James Okafor) and column B has their quarterly totals. You want column C to flag who hit the $1,000 target:

=IF(B2>=1000,"Target Met","Below Target")

The logical test is B2>=1000. The value if true is "Target Met". The value if false is "Below Target". Copy it down column C and you have a working conditional column in under a minute.

One thing worth testing immediately: what happens with a blank cell in B2. Excel treats blank as zero, so a blank will return "Below Target." That's usually correct, but it's worth knowing before your data has gaps.

Excel doesn't care what you intended. It cares what you typed. Always test edge cases like blanks and zeros before you rely on an IF formula in a real dataset.


Step 2: Extend the IF Formula with AND, OR, and a Basic Nested IF

Once your single-condition formula works, the next question is almost always: what if I need two conditions? That's where most beginners either get it right in two minutes or spend an hour going in circles.

Combining Conditions with AND and OR Inside IF

Wrap AND or OR around your conditions inside the logical test. The structure doesn't change — you're just replacing the single test with a multi-part one.

Both conditions must be true (AND):

=IF(AND(B2>=1000, C2="Q4"),"Year-End Bonus","Standard")

Either condition can be true (OR):

=IF(OR(B2>=1000, C2="Manager"),"Eligible","Not Eligible")

For a deeper look at how AND and OR behave outside of IF, the hidden tricks behind AND and OR in Excel are worth reading once you're comfortable with this pattern.

When You Need a Nested IF (and When IFS Is the Smarter Choice)

A nested IF puts one IF inside another to handle more than two outcomes. Here's a three-tier commission structure:

=IF(B2>=5000,"Tier 3",IF(B2>=2000,"Tier 2","Tier 1"))

Excel evaluates the first logical test and only moves to the second IF if the first one returns false. Understanding that one-branch-at-a-time model is the key to reading nested formulas without getting lost.

That said, deeply nested IFs are overrated as a skill. Past two or three levels, they become harder to debug than they're worth. If you're on Excel 2016, Microsoft 365, or anything newer, the IFS function handles multiple conditions without the nesting:

=IFS(B2>=5000,"Tier 3",B2>=2000,"Tier 2",B2<2000,"Tier 1")

Same result. Much easier to read six months later.


Common Mistakes With the Excel IF Function (and How to Fix Them)

These four mistakes account for the overwhelming majority of broken IF formulas. If your formula isn't working, start here.

Mistake What Happens Fix
Missing quotes around text values Excel throws a #NAME? error Wrap text in double quotes: "Yes", not Yes
Arguments in the wrong order True and false results are flipped Remember: test first, true second, false third
Over-nesting instead of using IFS Formula works but breaks when edited Switch to IFS for 3+ outcomes on Excel 2016 or later
Value if false returns 0 unexpectedly Blank-looking cells show 0 Use "" as the false value to return a blank instead

If you leave the third argument empty, Excel defaults it to FALSE, which displays as 0 in a numeric context. Use "" explicitly if you want the cell to appear empty when the condition isn't met.

For edge cases this article doesn't cover, Ablebits' IF function reference goes deeper. For the foundational setup before you start writing logic, the Excel for Beginners starter guide covers the ground-level basics.

If you take one thing from this article: the IF function is a question with two possible answers. Get that mental model solid before you touch nested formulas, and most of the confusion takes care of itself.


Frequently Asked Questions

What is the syntax of the IF function in Excel?

The IF function takes three arguments: =IF(logical_test, value_if_true, value_if_false). The logical test is a yes/no condition, the second argument is what the cell returns when that condition is true, and the third is what it returns when false. All three are required — leaving the third blank causes Excel to default to 0 or FALSE.

What is the difference between IF and IFS in Excel?

IF handles one condition, with an optional nested structure for more outcomes. IFS, available in Excel 2016 and Microsoft 365, accepts multiple condition-result pairs in a single formula without nesting. For three or more outcomes, IFS is almost always cleaner and easier to maintain.

Why is my Excel IF formula returning the wrong value?

The most common causes are reversed argument order (true and false results swapped), missing quotes around text values, or a blank cell in the logical test being read as zero. Check those three things first — one of them is almost always the problem.