The IF function is a popular Excel function that provides logical thinking. We explain how to use the IF function in Excel, with examples.