﻿ The If statement with calculations (numerical values)

# Using the IF statement (with calculations)

In this video you will find two examples of using the If function to make different calculations based the cell's values.

The first example shows two different payments, depending on the number of items sold.
If the salesman sold more than 5 items, he will be paid \$30 per item, otherwise he will be paid only \$20 per item.

In the second one we will add a "seniority" column to the table, and then we will use the "IF" to give a bonus of \$100 to those of which their seniority is greater than 6 months.

More IF general examples explained in simple words:
=if(A2<5,A2*2,A2*3)
In words: If the value of cell A2 is smaller than 5 then multiply this value with 2, otherwise multiply this value by 3.

=if(A6>=80,A6*110%,A6)
In words: If the value of cell A6 is greater or equal to 80, then give this value bigger by 10%, else return simply this value (with no change).

=if(C4=100,””,B5*E5+4)
In words: If the value of cell C4 equals to 100 then leave this cell blank, else multiply cell B5 by cell E5 and add 4 to it.

Advanced IF examples (using it with more functions):
=if(and(B5<10,C5<10),B5*C5,B5+C5)
In words: If both the values of cells B5 and C5 are smaller than 10, then multiply these cells, otherwise add up these cells.

=if(A4>average(B2:B15),”Cell A4 is bigger than the average”,””)
In words: If the value of cell A4 is greater than the average of the cells in the range B2:B15, then write “Cell A4 is bigger than the average”, otherwise leave this cell empty.