There are many functions in Microsoft® Excel®, from basic mathematics to more extended logical or text functions. One very handy function is “IF”, which is used in logical formulas groups. This is one of the basic functions. It is usually the first one taught when you start learning any programming language.

This function is used in formulas to test whether a certain condition is true or false. Below is an example of using the “IF” function in Microsoft® Excel®.

## Using the “IF” function in Excel® (example):

Imagine you need to know if the sum of two cells is a higher number than 100. If yes, the “IF” function writes “YES” in a designated cell. If not, the function writes “NO” in the same cell.

- Launch Microsoft® Excel® 2010 and switch to the “Formulas” tab.
- Select the cell we want to see the result in (e.g. A3)
- In the ribbon go “Logical > IF“.
- Into the “Logical_test“ field, write “
**(A1+A2)****>****100**“.

*note:*“*A1“ and*“*A2“ are names of cells.* - Into “Value_if_true” field write “YES”.
- Into “Value_if_false” field write “NO”.
- Click on the “OK” button.

Now you can test if it works, write two numbers to each cell we want to check for count (in our case “A1” and “A2” cells).