The IF function
The IF function is a logical function which allows for the evaluation of a true/false equation and returns one of two potential results based on the first outcome resolved. Easily one of the most useful non-mathematical functions in Excel.
This is the format of the IF function:
=IF(BOOLEAN EQUATION, RESULT IF TRUE, RESULT IF FALSE)
Here is an example of the IF function:
=IF(1+3=4, “Correct”, “Incorrect”)
This function is valuable when assessing the eligibility or acceptance of a (or multiple) criteria against a defined threshold. These could be regarding strings of data or numeric values, as long as the result of the comparison equates to a true or false result.
An example of a functional implementation of this would be determining if a series of inspections result in a pass or fail grade for a business or project. Assume that the range provided contains either the text “PASS” or “FAIL” on each line, and they must all have achieved a passing grade to result in a successful inspection. You could compare them all with an IF function to determine the overall standing of the business.
=IF(C3=C4=C5=C6=C7=C8=”PASS”, “Inspection passed”, “Inspection failed”) = “Inspection failed”
At least one of the test results had achieved a failing grade.