Essential Functions
Essential Functions
Worksheet functions are pre-programmed formulas that have been built into Excel for you to use.
You’ve probably already used a couple of them like SUM and maybe AVERAGE to perform
calculations within a worksheet (and through Quick Totals, which has just been covered). There
are a few hundred of these functions available to you, covering a broad spectrum of categories
from mathematics, statistics, dates/times, logical and text, right through to finance, but there are
probably only a dozen or so that you will use regularly and should have a thorough understanding
of. These are the ones you’ll be exposed to on a regular basis – knowing them and how they’re
used will help you build effective and useful workbooks.
gain an understanding of some of the key functions you may find useful
learn how to create an IF function to display text
learn how to create an IF function to calculate values
There are a couple of ways that Excel will help you create functions:
The Insert Function feature, that provides a dialog box to enable you to ensure the correct
references go in the correct areas of the function.
When you start to type a function, you see a prompt that helps you get the correct syntax,
etc.
You will use both options in these notes, but either option will work for any of the functions – just
choose what’s best for you.
Function Description
=IF(condition,true,false) This is the most important function to know because it
provides decision-making capability within the worksheet.
The three arguments are mandatory. The first is a
condition that must be testable (e.g. B2>400, C5=C6,
etc). The second is what the function will do if the
condition is true, while the third is what the function will
return if the condition is false. The true and false parts can
be values, text, a calculation or another function.
=VLOOKUP(value,table,in This function allows you to look up values in a table and
dex) return the one that matches. To do this you need
something to look up (the value), a table to look up (table)
and the column within the table that contains the value
(index).
=COUNT(range) These functions count the number of non-empty cells in a
=COUNTA(range) specified range. The COUNT function counts only the
cells with numbers, while COUNTA counts cells with
=COUNTIF(range,criteria)
numbers and text. COUNTIF counts everything within the
range that matches the criteria (e.g. “Merit” or >50)
=ROUND(value,digits) These functions round a value up or down. ROUNDUP
=ROUNDUP(value,digits) and ROUNDDOWN specifically round up and down
respectively, while ROUND will round the value either
=ROUNDDOWN(value,dig
way, depending on what is closer. The functions require a
its)
value to work on (value) and the number of digits to be
rounded to.
=INT(value) These functions allow you to dissect values in the
=MOD(value,divisor) worksheet, and to manipulate them and work them over
until they do exactly what you need. INT returns just the
=ABS(value)
integer part (e.g. show 2.75 as 2), MOD just shows the
remainder after the value is divided by the divisor (e.g.
would show MOD(50,7) as 1 because 50 divided by 7 is
7, remainder 1) and ABS will convert any negative
numbers to positive (e.g. ABS(25-100) would give the
value 75, not -75.
=NOW() In Excel dates and times are simply numbers running
=TODAY() sequentially from January 1, 1900. Because they are
numbers they can be used in all sorts of calculations. The
=DATE(year,month,day)
NOW function displays the current date and time, while
TODAY displays the current date. The DATE function is
used to convert values into a date number.
=PMT(rate,period,amount) PMT calculates the regular payment required on a loan
(amount), over a specified timeframe (period), and at a
given interest rate (rate).
With the insertion point flashing in the Logical_test area, select cell (or type in) C7 (you
should see the word TRUE appear to the right (this would be enough if we just wanted to
check there’s a number in the cell, but we want to compare it with cell E2):
To finish the argument, type >, select cell E2 and press the F4 key to make it absolute:
Click next to Value_if_true and type Exceeded Target (notice that Excel puts speech
marks around the text for you).
Click next to Value_if_false and type Below Target:
Click on OK to see the words Exceeded Target appear in cell D7. Copy the function down
to cell D15 to who has exceeded and who is below. Save your changes.
Creating Functions by Typing them in
Creating an IF Function (2)
Continue using the Essential Functions1 file or reopen it.
Select cell E7 and type =IF(
For the logical test, we’ll use the same as before – type in (click on the references to select
them if you wish) C7>$E$2
Type in a comma to move to the next part of the function:
To summarise:
Use the IF function to create decision making:
=IF(test, value_if_true, value_if_false)
This function performs a test, then if the result is true, uses the entry in the position true. If the
result is not true, the entry for false is used.
Handy to Know…
If you only want text to appear if the result is true, you can enter "" (two double quotes) in the
position for false. For example, =IF(C7>=$E$2, "Exceeded Target","") will create an empty
cell if the target is not met.
The true_value and false_value in an IF function can be mixed with one text and the other a
numeric.
If you require more than 2 options, this can be achieved by nesting IF functions – this is covered
at a more advanced level.