|Logical Test||Required||A test that has either a True or False outcome (Examples could be A1=B1; ISERROR(A1); A1>B1)|
|Value If True||Optional||Value that will return if Logical Test equals TRUE. If this input is omitted the function will output a 0 for any TRUE value.|
|Value If False||Optional||Value that will return if Logical Test equals FALSE. If this input is omitted the function will output a 0 for any FALSE value.|
What Is IF?
The IF function is used to allow the performance of a test and outputs a specific value based on if the test passed or failed. If the test passed it is considered TRUE and if the test fails it is considered FALSE. There are tons of different tests you can input into an IF function. These can vary from seeing if a number is greater than 10 to testing if an ID number exists in a data set column. An easy way to think about how the IF function flows is to say to yourself If A1 is greater than 10 then "Greater Than 10" else "Less Than 10". Your function would then look like this: =IF(A1>10, "Greater Than 10", "Less Than 10")
Nesting IF Functions
A great feature about the IF Function is that you can nest (place) IF functions within each other (up to 64 times!). Let's keep with our example from above and if you looked at the data set closely, you may have noticed that we had two instances where the days equaled 10 and the aging stated "<10". Well 10 is not less than 10! So let's clean our formula up a little bit. We can nest another IF function into our orginal one and give our formula the ability to perform two test and output 3 separate aging statements. Our logic will flow like this: If A2 is greater than 10 then output ">10", else if A2 is less than 10 then output "<10", else output "=10".