For example, you could set an IF to turn back results if a specificcellis greater than 900.
If it is, you could make the formula return the text “PERFECT.”
If it isn’t, you could make the formula return “TOO SMALL.”
The IF-THEN function’s syntax includes the name of the function and thefunction argumentsinside the parenthesis.
This is where youuse comparison operatorsto compare two values.
Our spreadsheet is set up with cell A1 as $100.
We can input the following formula into B1 to indicate whether the value is larger than $1000.
Otherwise, writeTOO SMALL."
The comparison part of the function can compare only two values.
you’re free to make the IF function very advanced by embedding additional calculations or functions inside it.
Other values and formulas don’t require quotation marks.
This example uses one calculation for the tax rate, depending on the total income in B2.
The logic test compares total income in B2 to see if it’s greater than $50,000.00.
If the value in B2 is greater than 50,000, the IF function will multiply it by 0.15.
In the above example, you might estimate that taxable income will only be 80% of total income.
The rest of the function works the same.
For example, throw in 1000, not 1,000.
This action lets you perform advanced calculations and then compare the actual results to the expected results.
In this example, let’s say you have a spreadsheet with five students' grades in column B.
You could average those grades using the AVERAGE function.
Depending on the class average results, you could have cell C2 return either “Excellent!”
or “Needs Work.”
FAQ
Use Nesting in Excelto create multiple IF-THEN statements.
Alternatively, use theIFS function.
you might nest up to 7 IF statements within a single IF-THEN statement.