You are on page 1of 9

UNDERSTANDING FUNCTIONS

Logical functions provide decision-making tools for information in a


spreadsheet. They allow you to look at the contents of a cell, or to perform a
calculation, and then test that result against a required figure or value. You
can then use the IF logical function to determine which calculation to perform
or action to take depending on the outcome of the test. Here are some
examples.
The IF Function
The IF function is the key logical function used for decision making. It takes
the format:
=IF(condition, true, false)
For example, you could use the following formula: =IF(B2 > 400, “High”, “Low”)
where, B2 > 400 is the condition being tested (this could be translated as “Is
the value in cell B2 greater than 400?”) “High” is the text to display if B2 is
greater than 400 (the result of the test is yes or TRUE) “Low” is the text to
display if B2 is less than or equal to 400 (the result of the test is no or FALSE).
The IF function can be used to display different information depending on the
outcome of the condition test. The resulting text will appear in the cell where
the formula containing the IF function resides. In this example, the IF function
is used to indicate where figures in a neighbouring column meet or exceed a
specified target. This makes identifying successful sales people far easier.

Try this yourself:


Create an excel worksheet with the following details:
Next on cell D4, type in the formula to check whether the sales exceeded the
target amount. Using the IF function, your formula would look like this;

Press the Enter key then on cell D4 hover your mouse and wait for the plus
sign to appear then click and drag so that the formula in D4 will be copied to
the cells below it. What do you notice?
Notice that 34,000 is below target wherein fact, it is equal to the target, go back
to cell D4 and complete the formula, it should be =if(C4>=$E$1,”Exceeded
Target”, ”Below Target”).

One of the most common uses of the IF function is to perform numerical


computations based on the outcome of the condition test. This is achieved by
putting formulas that would normally be used to calculate values in place of
the true and false components in the function. You can also use this structure
to show a specific value according to the result of the condition test.
Let’s compute for the commission column. Note that in order to get the 5%
commission, the monthly sale should have exceeded the target. The formula
would be; =IF (C4>=$E$1, (C4-$E$1)*$E$2,0). It should look like this:
Then hover your mouse over at cell E4 then wait for the plus sign to appear
then click and drag to copy the formula to the cells below it. It should look like
this;
NESTING IF FUNCTIONS
If you need to make more than one decision before calculating an answer, you
can nest or embed an IF function inside an IF function. For example, you can
use an IF function in place of the true component of the IF function. If the
result of the first condition test is true, the second condition will be tested. This
structure provides for three alternative outcomes instead of two.

Let’s continue with the worksheet we started. This time we will compute for the
commission percentage based on the sales. Add the additional columns like the
ones below:

On cell F4, enter the formula


=IF(C4>40000,10%,IF(C4>31000,7%,IF(C4>21000,5%,IF(C4>10000,3%)))). It
should look like something like this:

Then press enter. You will notice that the result is 0.10. Just go the number
group on the ribbon and change the number format to percentage.
Then hover your mouse to cell F4 the wait for the plus sign to appear then click
and drag to copy the formula to the cells below it. It should look like this:
ROUND FUNCTION
The Excel ROUND function returns a number rounded to a given number of
digits. The ROUND function can round to the right or left of the decimal point.

Syntax
=ROUND (number, num_digits)
Arguments
number - The number to round.
num_digits - The number of digits to which number should be rounded.

COUNT FUNCTION
The Excel COUNT function returns the count of values that are numbers,
generally cells that contain numbers. Values can be supplied as constants, cell
references, or ranges.
Syntax
=COUNT (value1, [value2], ...)
Arguments
value1 - An item, cell reference, or range.
value2 - [optional] An item, cell reference, or range.

COUNTIF FUNCTION
COUNTIF is an Excel function to count cells in a range that meet a single
condition. COUNTIF can be used to count cells that contain dates, numbers,
and text. The criteria used in COUNTIF supports logical operators (>,<,<>,=)
and wildcards (*,?) for partial matching.
Syntax
=COUNTIF (range, criteria)
Arguments
range - The range of cells to count.
criteria - The criteria that controls which cells should be counted.
Let’s look at this example: We want to count the number of sales over 10,000,
the number of entries in relation to the sales by Jim and the number of sales
made in Baguio. The table below shows the sales per area and agent.
Now by using the COUNT function, we will know the count or how many sales
are over 10,000, how many sales are done by Jim and how many times did the
agents sell in Baguio. In cells G4, enter the formula;
=COUNTIF (D5:D11,">10,000") // count sales over 10,000. In cell G5, enter the
formula; =COUNTIF(B5:B11,"JIM") // count name = "JIM". In cell G6, enter the
formula; =COUNTIF(C5:C11,”BAGUIO") // count area = "BAGUIO".
The result will be:

You might also like