IF function
IF function The IF function is one of the most popular functions in Excel, and it allows you to make logical comparisons between a value and what you expect. So an IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False. For example, =IF(C2=”Yes”,1,2) says IF(C2 = Yes, then return a 1, otherwise return a 2). Simple IF examples =IF(C2=”Yes”,1,2) In the above example, cell D2 says: IF(C2 = Yes, then return a 1, otherwise return a 2) =IF(C2=1,”Yes”,”No”) In this example, the formula in cell D2 says: IF(C2 = 1, then return Yes, otherwise return No) As you see, the IF function can be used to evaluate both text and values. It can also be used to evaluate errors . You are not limited to only checking if one thing is equal to another and returning a single result, you can also use mathematical operators and perform additional calculations depending on your criteria. You can also nest multiple IF functions...