HOME
> Office programs
> Excel: If-Then - How To Use The Function
Excel: IF-THEN - how to use the function
Excel has a large number of functions that you can use to perform mathematical and logical calculations. To compare the value of a cell with an expected value, there is the IF-THEN formula.
Excel: How to use the IF-THEN function
In addition to classic calculation functions such as adding, subtracting and multiplying, logical comparisons are also possible with Excel. For this purpose, for example, there is the IF-THEN function, which compares the current value in a cell with an expected value. Each IF-THEN statement can have two results. Which result is displayed depends in turn on whether the comparison performed is true or false.- To perform an IF-THEN comparison, enter a formula in the cell where you want to get the result, structured as follows:"=If(cell="Yes";1,2)".
- Excel then performs a comparison with the specified cell and outputs "1" if "Yes" is in the cell and "2" if this is not the case.
- Analogously, the IF-THEN formula can also be used to evaluate numerical values. Examples of this are the formulas "=WENN(cell=1; "Yes"; "No")" or "WENN(cell1>cell2; "Exceeded"; "Not exceeded") .