Excel IF formula

Build an IF, chain several conditions without nesting them, and get the quoting right so it does not return the literal word.

Free, no signup, nothing to download. Results update as you type.

The formula
=IF(C2>1000, "Over budget", "OK")

Click the cell, type that, and press Enter. Text results need double quotes; cell references and numbers must not have them, or you get the literal characters back.

How to do it
  1. 1Click the cell where the label should appear.
  2. 2Type =IF( then the test, such as C2>1000.
  3. 3Add a comma, the result when true in quotes, another comma, and the result when false.
  4. 4Close the bracket and press Enter. For three or more outcomes use IFS rather than nesting.
Your formula=IF(C2>1000, "Over budget", "OK")
Three or more outcomes=IFS(C2>1000, "Over budget", C2>0, "Watch", TRUE, "OK")IFS reads top to bottom and stops at the first true test. The final TRUE is the catch-all, and leaving it out is what produces #N/A.
Two conditions at once=IF(AND(C2>1000, B2<>""), "Over budget", "OK")
Blank instead of a label=IF(C2>1000, "Over budget", "")Two quote marks give a genuinely empty-looking cell, though it still counts as text to COUNTA.
Loading the live sheet…
How this is calculated

IF(test, value if true, value if false). Text results need double quotes; numbers and cell references must not have them, or you get the literal characters instead of the value. IFS replaces nested IFs and reads far better when there are three or more outcomes.

Frequently asked
Why does my IF return the word instead of the number?

The value was quoted. "B2" returns the literal text B2, and "100" returns text that looks like a number and will not sum. Quote text results only; leave cell references and numbers bare.

Nested IF or IFS?

IFS for three or more outcomes. Nested IFs are legal to seven levels deep and unreadable past two, and the closing brackets are where the errors live. IFS is flat and each condition sits next to its result.

How do I test two things at once?

AND requires both, OR requires either: =IF(AND(C2>1000, D2="Open"), "Escalate", ""). Writing =IF(C2>1000 AND D2="Open", ...) is a common instinct and is not valid syntax.

Stop recalculating this by hand.

The same numbers, live off the rows your team already edits, in a spreadsheet that rolls them up for you. Start your 7-day free trial, no credit card required.