Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Computer Studies Spreadsheets Complete

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

NDOLA TRUST SCHOOL

(Ndola Trust School Limited)


“Success through Hard Work”

Basic Excel formulas & functions


This topic aims to teach you the essentials of Excel functions and show how to use basic
formulas in Excel.

 Excel formula basics


 10 basic Excel functions you should definitely know
 Excel formula tips and how-to's

The basics of Excel formulas

Before providing the basic Excel formulas list, let's define the key terms just to make sure we are
on the same page. So, what do we call an Excel formula and Excel function?

 Formula is an expression that calculates values in a cell or in a range of cells.

For example, =A2+A2+A3+A4 is a formula that adds up the values in cells A2 through
A4.

 Function is a predefined formula already available in Excel. Functions perform specific


calculations in a particular order based on the specified values, called arguments, or
parameters.

For example, instead of specifying each value to be summed like in the above formula, you can
use the SUM function to add up a range of cells: =SUM(A2:A4)

You can find all available Excel functions in the Function Library on the Formulas tab:

There exist 400+ functions in Excel, and the number is growing by version to version. Of
course, it's next to impossible to memorize all of them, and you actually don't need to.

NDOLA TRUST SCHOOL (2020) 1


The Function Wizard will help you find the function best suited for a particular task, while
the Excel Formula Intellisense will prompt the function's syntax and arguments as soon as you
type the function's name preceded by an equal sign in a cell:

Clicking the function's name will turn it into a blue hyperlink, which will open the Help topic for
that function.

Tip. You don't necessarily have to type a function name in all caps, Microsoft Excel will
automatically capitalize it once you finish typing the formula and press the Enter key to complete
it.

10 Excel basic functions you should definitely know

What follows below is a list of 10 simple yet really helpful functions that are a necessary skill for
everyone who wishes to turn from an Excel novice to an Excel professional.

SUM

The first Excel function you should be familiar with is the one that performs the basic arithmetic
operation of addition:

SUM(number1, [number2], …)

In the syntax of all Excel functions, an argument enclosed in [square brackets] is optional, other
arguments are required. Meaning, your Sum formula should include at least 1 number, reference
to a cell or a range of cells. For example:

=SUM(B2:B6) - adds up values in cells B2 through B6.

=SUM(B2, B6) - adds up values in cells B2 and B6.

If necessary, you can perform other calculations within a single formula, for example, add up
values in cells B2 through B6, and then divide the sum by 5:

=SUM(B2:B6)/5

To sum with conditions, use the SUMIF function: in the 1st argument, you enter the range of
cells to be tested against the criteria (A2:A6), in the 2nd argument - the criteria itself (D2), and in
the last argument - the cells to sum (B2:B6):

NDOLA TRUST SCHOOL (2020) 2


=SUMIF(A2:A6, D2, B2:B6)

In your Excel worksheets, the formulas may look something similar to this:

Tip. The fastest way to sum a column or row of numbers is to select a cell next to the numbers
you want to sum (the cell immediately below the last value in the column or to the right of the
last number in the row), and click the AutoSum button on the Home tab, in the Formats group.
Excel will insert a SUM formula for you automatically.

Useful resources:

 Excel Sum formula examples - formulas to total a column, rows, only filtered (visible)
cells, or sum across sheets.
 Excel AutoSum - the fastest way to sum a column or row of numbers.
 SUMIF in Excel - formula examples to conditionally sum cells.
 SUMIFS in Excel - formula examples to sum cells based on multiple criteria.

AVERAGE

The Excel AVERAGE function does exactly what its name suggests, i.e. finds an average, or
arithmetic mean, of numbers. Its syntax is similar to SUM's:

AVERAGE(number1, [number2], …)

Having a closer look at the formula from the previous section (=SUM(B2:B6)/5), what does it
actually do? Sums values in cells B2 through B6, and then divides the result by 5. And what do
you call adding up a group of numbers and then dividing the sum by the count of those numbers?
Yep, an average!

The Excel AVERAGE function performs these calculations behind the scenes. So, instead of
dividing sum by count, you can simply put this formula in a cell:

=AVERAGE(B2:B6)

To average cells based on condition, use the following AVERAGEIF formula, where A2:A6 is
the criteria range, D3 is he criteria, and B2:B6 are the cells to average:

=AVERAGEIF(A2:A6, D3, B2:B6)

NDOLA TRUST SCHOOL (2020) 3


Useful resources:

 Excel AVERAGE - average cells with numbers.


 Excel AVERAGEA - find an average of cells with any data (numbers, Boolean and text
values).
 Excel AVERAGEIF - average cells based on one criterion.
 Excel AVERAGEIFS - average cells based on multiple criteria.
 How to calculate weighted average in Excel
 How to find moving average in Excel

MAX & MIN

The MAX and MIN formulas in Excel get the largest and smallest value in a set of numbers,
respectively. For our sample data set, the formulas will be as simple as:

=MAX(B2:B6)

=MIN(B2:B6)

Useful resources:

 MAX function - find the highest value.


 MAX IF formula - get the highest number with conditions.
 MAXIFS function - get the largest value based on multiple criteria.
 MIN function - return the smallest value in a data set.
 MINIFS function - find the smallest number based on one or several conditions.

NDOLA TRUST SCHOOL (2020) 4


COUNT & COUNTA

If you are curious to know how many cells in a given range contain numeric values (numbers or
dates), don't waste your time counting them by hand. The Excel COUNT function will bring you
the count in a heartbeat:

COUNT(value1, [value2], …)

While the COUNT function deals only with those cells that contain numbers, the COUNTA
function counts all cells that are not blank, whether they contain numbers, dates, times, text,
logical values of TRUE and FALSE, errors or empty text strings (""):

COUNTA (value1, [value2], …)

For example, to find out how many cells in column B contain numbers, use this formula:

=COUNT(B:B)

To count all non-empty cells in column B, go with this one:

=COUNTA(B:B)

In both formulas, you use the so-called "whole column reference" (B:B) that refers to all the cells
within column B.

The following screenshot shows the difference: while COUNT processes only numbers,
COUNTA outputs the total number of non-blank cells in column B, including the the text value
in the column header.

Useful resources:

 Excel COUNT function - a quick way to count cells with numbers.


 Excel COUNTA function - count cells with any values (non-empty cells).
 Excel COUNTIF function - count cells that meet one condition.
 Excel COUNTIFS function - count cells with several criteria.

NDOLA TRUST SCHOOL (2020) 5


IF

Judging by the number of IF-related comments on our blog, it's the most popular function in
Excel. In simple terms, you use an IF formula to ask Excel to test a certain condition and return
one value or perform one calculation if the condition is met, and another value or calculation if
the condition is not met:

IF(logical_test, [value_if_true], [value_if_false])

For example, the following IF statement checks if the order is completed (i.e. there is a value in
column C) or not. To test if a cell is not blank, you use the "not equal to" operator (<>) in
combination with an empty string (""). As the result, if cell C2 is not empty, the formula returns
"Yes", otherwise "No":

=IF(C2<>"", "Yes", "No")

Useful resources:

 IF function in Excel with formula examples


 How to use nested IFs in Excel
 IF formulas with multiple AND/OR conditions

TRIM

If your obviously correct Excel formulas return just a bunch of errors, one of the first things to
check is extra spaces in the referenced cells (You may be surprised to know how many leading,
trailing and in-between spaces lurk unnoticed in your sheets just until something goes wrong!).

There are several ways to remove unwanted spaces in Excel, with the TRIM function being the
easiest one:

TRIM(text)

For example, to trim extra spaces in column A, enter the following formula in cell A1, and then
copy it down the column:

NDOLA TRUST SCHOOL (2020) 6


=TRIM(A1)

It will eliminate all extra spaces in cells but a single space character between words:

Useful resources:

 Excel TRIM function with formula examples


 How to delete line breaks and non-printing characters
 How to remove non-breaking spaces (&nbsp;)
 How to delete a specific non-printing character

LEN

Whenever you want to know the number of characters in a certain cell, LEN is the function to
use:

LEN(text)

Wish to find out how many characters are in cell A2? Just type the below formula into another
cell:

=LEN(A2)

Please keep in mind that the Excel LEN function counts absolutely all characters including
spaces:

Want to get the total count of characters in a range or cells or count only specific characters?
Please check out the following resources.

NDOLA TRUST SCHOOL (2020) 7


Useful resources:

 Excel LEN formulas to count characters in a cell


 Count a total number of characters in a range
 Count specific characters in a cell
 Count specific character in a range

AND & OR

These are the two most popular logical functions to check multiple criteria. The difference is
how they do this:

 AND returns TRUE if all conditions are met, FALSE otherwise.


 OR returns TRUE if any condition is met, FALSE otherwise.

While rarely used on their own, these functions come in very handy as part of bigger formulas.

For example, to check the test results in columns B and C and return "Pass" if both are greater
than 60, "Fail" otherwise, use the following IF formula with an embedded AND statement:

=IF(AND(B2>60, B2>60), "Pass", "Fail")

If it's sufficient to have just one test score greater than 60 (either test 1 or test 2), embed the OR
statement:

=IF(OR(B2>60, B2>60), "Pass", "Fail")

Useful resources:

 Excel AND function with formula examples


 Excel OR function with formula examples

NDOLA TRUST SCHOOL (2020) 8


CONCATENATE

In case you want to take values from two or more cells and combine them into one cell, use the
concatenate operator (&) or the CONCATENATE function:

CONCATENATE(text1, [text2], …)

For example, to combine the values from cells A2 and B2, just enter the following formula in a
different cell:

=CONCATENATE(A2, B2)

To separate the combined values with a space, type the space character (" ") in the arguments
list:

=CONCATENATE(A2, " ", B2)

Useful resources:

 How to concatenate in Excel - formula examples to combine text strings, cells and columns.

TODAY & NOW

To see the current date and time whenever you open your worksheet without having to manually
update it on a daily basis, use either:

=TODAY() to insert the today's date in a cell.

=NOW() to insert the current date and time in a cell.

The beauty of these functions is that they don't require any arguments at all, you type the
formulas exactly as written above.

NDOLA TRUST SCHOOL (2020) 9


Useful resources:

 How to insert today's date in Excel - different ways to enter the current date and time in Excel: as
an unchangeable time stamp or automatically updatable date and time.
 Excel date functions with formula examples - formulas to convert date to text and vice versa,
extract a day, month or year from a date, calculate the difference between two dates, and a lot
more.

Excel formulas tips and how-to's

Now that you are familiar with the basic Excel formulas, these tips will give you some guidance
on how to use them most effectively and avoid common formula errors.

Copy the same formula to other cells instead of re-typing it

Once you have typed a formula into a cell, there is no need to re-type it over and over again.
Simply copy the formula to adjacent cells by dragging the fill handle (a small square at the
lower right-hand corner of the cell). To copy the formula to the whole column, position the
mouse pointer to the fill handle and double-click the plus sign.

Note. After copying the formula, make sure that all cell references are correct. Cell references
may change depending on whether they are absolute (do not change) or relative (change).

How to delete formula, but keep calculated value

When you remove a formula by pressing the Delete key, a calculated value is also deleted.
However, you can delete only the formula and keep the resulting value in the cell. Here's how:

 Select all cells with your formulas.


 Press Ctrl + C to copy the selected cells.
 Right-click the selection, and then click Paste Values > Values to paste the calculated values
back to the selected cells. Or, press the Paste Special shortcut: Shift+F10 and then V.

NDOLA TRUST SCHOOL (2020) 10


Do not enclose numbers in double quotes

Any text included in your Excel formulas should be enclosed in "quotation marks". However,
you should never do that to numbers, unless you want Excel to treat them as text values.

For example, to check the value in cell B2 and return 1 for "Passed", 0 otherwise, you put the
following formula, say, in C2:

=IF(B2="pass", 1, 0)

Copy the formula down to other cells and you will have a column of 1's and 0's that can be
calculated without a hitch.

Now, see what happens if you double quote the numbers:

=IF(B2="pass", "1", "0")

At first sight, the output is normal - the same column of 1's and 0's. Upon a closer look, however,
you will notice that the resulting values are left-aligned in cells by default, meaning those are
numeric strings, not numbers! If later on someone will try to calculate those 1's and 0's, they
might end up pulling their hair out trying to figure out why a 100% correct Sum or Count
formula returns nothing but zero.

Don't format numbers in Excel formulas

Please remember this simple rule: numbers supplied to your Excel formulas should be entered
without any formatting like decimal separator or dollar sign. In North America and some other
countries, comma is the default argument separator, and the dollar sign ($) is used to make
absolute cell references. Using those characters in numbers may just drive your Excel crazy :)
So, instead of typing $2,000, simply type 2000, and then format the output value to your liking
by setting up a custom Excel number format.

NDOLA TRUST SCHOOL (2020) 11


Match all opening and closing parentheses in your formulas

When crating a complex Excel formula with one or more nested functions, you will have to use
more than one set of parentheses to define the order of calculations. In such formulas, be sure to
pair the parentheses properly so that there is a closing parenthesis for every opening parenthesis.
To make the job easier for you, Excel shades parenthesis pairs in different colors when you enter
or edit a formula.

Make sure Calculation Options are set to Automatic

If all of a sudden your Excel formulas have stopped recalculating automatically, most likely
the Calculation Options somehow switched to Manual. To fix this, go to the Formulas tab
> Calculation group, click the Calculation Options button, and select Automatic.

What is Formulas in Excel?


FORMULAS IN EXCEL is an expression that operates on values in a range of cell addresses
and operators. For example, =A1+A2+A3, which finds the sum of the range of values from cell
A1 to cell A3. An example of a formula made up of discrete values like =6*3.

=A2 * D2 / 2

HERE,

 "=" tells Excel that this is a formula, and it should evaluate it.
 "A2" * D2" makes reference to cell addresses A2 and D2 then multiplies the values found
in these cell addresses.
 "/" is the division arithmetic operator
 "2" is a discrete value

Formulas practical exercise

We will work with the sample data for the home budget to calculate the subtotal.

 Create a new workbook in Excel


 Enter the data shown in the home supplies budget above.
 Your worksheet should look as follows.

NDOLA TRUST SCHOOL (2020) 12


We will now write the formula that calculates the subtotal

Set the focus to cell E4

Enter the following formula.

=C4*D4

HERE,

 "C4*D4" uses the arithmetic operator multiplication (*) to multiply the value of the cell
address C4 and D4.

Press enter key

You will get the following result

The following animated image shows you how to auto select cell address and apply the same
formula to other rows.

NDOLA TRUST SCHOOL (2020) 13


Mistakes to avoid when working with formulas in Excel

1. Remember the rules of Brackets of Division, Multiplication, Addition, &


Subtraction (BODMAS). This means expressions are brackets are evaluated first. For
arithmetic operators, the division is evaluated first followed by multiplication then
addition and subtraction is the last one to be evaluated. Using this rule, we can rewrite the
above formula as =(A2 * D2) / 2. This will ensure that A2 and D2 are first evaluated then
divided by two.
2. Excel spreadsheet formulas usually work with numeric data; you can take advantage of
data validation to specify the type of data that should be accepted by a cell i.e. numbers
only.
3. To ensure that you are working with the correct cell addresses referenced in the formulas,
you can press F2 on the keyboard. This will highlight the cell addresses used in the
formula, and you can cross check to ensure they are the desired cell addresses.
4. When you are working with many rows, you can use serial numbers for all the rows and
have a record count at the bottom of the sheet. You should compare the serial number
count with the record total to ensure that your formulas included all the rows.

NDOLA TRUST SCHOOL (2020) 14


What is Function in Excel?

FUNCTION IN EXCEL is a predefined formula that is used for specific values in a particular
order. Function is used for quick tasks like finding the sum, count, average, maximum value, and
minimum values for a range of cells. For example, cell A3 below contains the SUM function
which calculates the sum of the range A1:A2.

 SUM for summation of a range of numbers


 AVERAGE for calculating the average of a given range of numbers
 COUNT for counting the number of items in a given range

The importance of functions

Functions increase user productivity when working with excel. Let's say you would like to
get the grand total for the above home supplies budget. To make it simpler, you can use a
formula to get the grand total. Using a formula, you would have to reference the cells E4 through
to E8 one by one. You would have to use the following formula.

= E4 + E5 + E6 + E7 + E8

With a function, you would write the above formula as

=SUM (E4:E8)

As you can see from the above function used to get the sum of a range of cells, it is much more
efficient to use a function to get the sum than using the formula which will have to reference a
lot of cells.

Common functions

Let's look at some of the most commonly used functions in ms excel formulas. We will start with
statistical functions.

S/N FUNCTION CATEGORY DESCRIPTION USAGE

01 SUM Math & Trig Adds all the values in a range of cells =SUM(E4:E8)

Finds the minimum value in a range


02 MIN Statistical =MIN(E4:E8)
of cells

Finds the maximum value in a range


03 MAX Statistical =MAX(E4:E8)
of cells

Calculates the average value in a =AVERAGE(E4:E


04 AVERAGE Statistical
range of cells 8)

NDOLA TRUST SCHOOL (2020) 15


S/N FUNCTION CATEGORY DESCRIPTION USAGE

Counts the number of cells in a range


05 COUNT Statistical =COUNT(E4:E8)
of cells

Returns the number of characters in a


06 LEN Text =LEN(B7)
string text

Adds all the values in a range of cells


=SUMIF(D4:D8,">
07 SUMIF Math & Trig that meet a specified criteria.
=1000",C4:C8)
=SUMIF(range,criteria,[sum_range])

Calculates the average value in a


range of cells that meet the specified
=AVERAGEIF(F4:
08 AVERAGEIF Statistical criteria.
F8,"Yes",E4:E8)
=AVERAGEIF(range,criteria,[averag
e_range])

Returns the number of days between


09 DAYS Date & Time =DAYS(D4,C4)
two dates

Returns the current system date and


10 NOW Date & Time =NOW()
time

Numeric Functions

As the name suggests, these functions operate on numeric data. The following table shows some
of the common numeric functions.

S/N FUNCTION CATEGORY DESCRIPTION USAGE

Returns True if the supplied value is numeric


1 ISNUMBER Information =ISNUMBER(A3)
and False if it is not numeric

2 RAND Math & Trig Generates a random number between 0 and 1 =RAND()

Rounds off a decimal value to the specified


3 ROUND Math & Trig =ROUND(3.14455,2)
number of decimal points

Returns the number in the middle of the set


4 MEDIAN Statistical =MEDIAN(3,4,5,2,5)
of given numbers

5 PI Math & Trig Returns the value of Math Function PI(π) =PI()

Returns the result of a number raised to a


6 POWER Math & Trig =POWER(2,4)
power. POWER( number, power )

NDOLA TRUST SCHOOL (2020) 16


S/N FUNCTION CATEGORY DESCRIPTION USAGE

Returns the Remainder when you divide two


7 MOD Math & Trig =MOD(10,3)
numbers

8 ROMAN Math & Trig Converts a number to roman numerals =ROMAN(1984)

String functions

These basic excel functions are used to manipulate text data. The following table shows some of
the common string functions.

S/ FUNCTI CATEGO
DESCRIPTION USAGE COMMENT
N ON RY

Returns a number of specified


=LEFT("GURU99", Left 4 Characters
1 LEFT Text characters from the start (left-hand
4) of "GURU99"
side) of a string

Returns a number of specified Right 2


=RIGHT("GURU99
2 RIGHT Text characters from the end (right-hand Characters of
",2)
side) of a string "GURU99"

Retrieves a number of characters


from the middle of a string from a
=MID("GURU99",2, Retrieving
3 MID Text specified start position and
3) Characters 2 to 5
length. =MID (text, start_num,
num_chars)

Informatio Returns True if the supplied value - The value


4 ISTEXT =ISTEXT(value)
n parameter is Text to check.

Returns the starting position of a


text string within another text string. Find oo in
=FIND("oo","Roofin
5 FIND Text This function is case- "Roofing",
g",1)
sensitive. =FIND(find_text, Result is 2
within_text, [start_num])

Replaces part of a string with


REPLAC another specified =REPLACE("Roofi Replace "oo"
6 Text
E string. =REPLACE (old_text, ng",2,2,"xx") with "xx"
start_num, num_chars, new_text)

Date Time Functions

These functions are used to manipulate date values. The following table shows some of the
common date functions

NDOLA TRUST SCHOOL (2020) 17


S/N FUNCTION CATEGORY DESCRIPTION USAGE

Returns the number that represents the date


1 DATE Date & Time =DATE(2015,2,4)
in excel code

2 DAYS Date & Time Find the number of days between two dates =DAYS(D6,C6)

3 MONTH Date & Time Returns the month from a date value =MONTH("4/2/2015")

4 MINUTE Date & Time Returns the minutes from a time value =MINUTE("12:31")

5 YEAR Date & Time Returns the year from a date value =YEAR("04/02/2015")

VLOOKUP function

The VLOOKUP function is used to perform a vertical look up in the left most column and return
a value in the same row from a column that you specify. Let's explain this in a layman's
language. The home supplies budget has a serial number column that uniquely identifies each
item in the budget. Suppose you have the item serial number, and you would like to know the
item description, you can use the VLOOKUP function. Here is how the VLOOKUP function
would work.

=VLOOKUP (C12, A4:B8, 2, FALSE)

HERE,
NDOLA TRUST SCHOOL (2020) 18
 "=VLOOKUP" calls the vertical lookup function
 "C12" specifies the value to be looked up in the left most column
 "A4:B8" specifies the table array with the data
 "2" specifies the column number with the row value to be returned by the VLOOKUP
function
 "FALSE," tells the VLOOKUP function that we are looking for an exact match of the
supplied look up value

The animated image below shows this in action

Summary

Excel allows you to manipulate the data using formulas and/or functions. Functions are generally
more productive compared to writing formulas. Functions are also more accurate compared to
formulas because the margin of making mistakes is very minimum.

Here is a list of important Excel Formula and Function

 SUM function = =SUM(E4:E8)

 MIN function = =MIN(E4:E8)

 MAX function = =MAX(E4:E8)

NDOLA TRUST SCHOOL (2020) 19


 AVERAGE function = =AVERAGE(E4:E8)

 COUNT function = =COUNT(E4:E8)

 DAYS function = =DAYS(D4,C4)

 VLOOKUP function = =VLOOKUP (C12, A4:B8, 2, FALSE)

 DATE function = =DATE(2020,2,4)

IF, AND, OR, Nested IF & NOT Logical Functions in Excel

Things will not always be the way we want them to be. The unexpected can happen. For
example, let's say you have to divide numbers. Trying to divide any number by zero (0) gives an
error. Logical functions come in handy such cases. In this topic, we are going to cover the
following topics.

In this topic, we are going to cover the following topics.

 What is a Logical Function?


 IF function example
 Excel Logic functions explained
 Nested IF functions

What is a Logical Function?

It is a feature that allows us to introduce decision-making when executing formulas and


functions. Functions are used to;

 Check if a condition is true or false


 Combine multiple conditions together

What is a condition and why does it matter?

A condition is an expression that either evaluates to true or false. The expression could be a
function that determines if the value entered in a cell is of numeric or text data type, if a value is
greater than, equal to or less than a specified value, etc.

NDOLA TRUST SCHOOL (2020) 20


IF Function example

We will work with the home supplies budget from this topic. We will use the IF function to
determine if an item is expensive or not. We will assume that items with a value greater than
6,000 are expensive. Those that are less than 6,000 are less expensive. The following image
shows us the dataset that we will work with.

 Put the cursor focus in cell F4


 Enter the following formula that uses the IF function

=IF(E4<6000,"Yes","No")

HERE,

 "=IF(…)" calls the IF functions


 "E4<6000" is the condition that the IF function evaluates. It checks the value of cell
address E4 (subtotal) is less than 6,000
 "Yes" this is the value that the function will display if the value of E4 is less than 6,000
 "No" this is the value that the function will display if the value of E4 is greater than
6,000

When you are done press the enter key

You will get the following results

NDOLA TRUST SCHOOL (2020) 21


Excel Logic functions explained

The following table shows all of the logical functions in Excel

S/ FUNCTI CATEG DESCRIPTION USAGE


N ON ORY

01 AND Logical Checks multiple conditions and returns =AND(1 >


true if they all the conditions evaluate to 0,ISNUMBER(1)) The
true. above function returns
TRUE because both
Condition is True.

02 FALSE Logical Returns the logical value FALSE. It is FALSE()


used to compare the results of a
condition or function that either returns
true or false

03 IF Logical Verifies whether a condition is met or =IF(ISNUMBER(22),"Yes",


not. If the condition is met, it returns "No")
true. If the condition is not met, it 22 is Number so that it
returns return Yes.
false. =IF(logical_test,[value_if_true],[
value_if_false])

NDOLA TRUST SCHOOL (2020) 22


04 IFERRO Logical Returns the expression value if no error =IFERROR(5/0,"Divide by
R occurs. If an error occurs, it returns the zero error")
error value

05 IFNA Logical Returns value if #N/A error does not =IFNA(D6*E6,0) N.B the
occur. If #N/A error occurs, it returns above formula returns zero if
NA value. #N/A error means a value if both or either D6 or E6 is/are
not available to a formula or function. empty

06 NOT Logical Returns true if the condition is false and =NOT(ISTEXT(0)) N.B. the
returns false if condition is true above function returns true.
This is because ISTEXT(0)
returns false and NOT
function converts false to
TRUE

07 OR Logical Used when evaluating multiple =OR(D8="admin",E8="cash


conditions. Returns true if any or all of ier") N.B. the above function
the conditions are true. Returns false if returns true if either or both
all of the conditions are false D8 and E8 admin or cashier

08 TRUE Logical Returns the logical value TRUE. It is TRUE()


used to compare the results of a
condition or function that either returns
true or false

Nested IF functions

A nested IF function is an IF function within another IF function. Nested if statements come


in handy when we have to work with more than two conditions. Let's say we want to develop a
simple program that checks the day of the week. If the day is Saturday we want to display "party
well", if it's Sunday we want to display "time to rest", and if it's any day from Monday to Friday
we want to display, remember to complete your to do list.

A nested if function can help us to implement the above example. The following flowchart
shows how the nested IF function will be implemented.

NDOLA TRUST SCHOOL (2020) 23


The formula for the above flowchart is as follows

=IF(B1="Sunday","time to rest",IF(B1="Saturday","party well","to do list"))

HERE,

 "=IF(….)" is the main if function


 "=IF(…,IF(….))" the second IF function is the nested one. It provides further evaluation
if the main IF function returned false.

NDOLA TRUST SCHOOL (2020) 24


Practical example

Create a new workbook and enter the data as shown below

 Enter the following formula

=IF(B1="Sunday","time to rest",IF(B1="Saturday","party well","to do list"))

 Enter Saturday in cell address B1


 You will get the following results

NDOLA TRUST SCHOOL (2020) 25


Summary

Logical functions are used to introduce decision-making when evaluating formulas and functions
in Excel.

How to Create Charts in Excel: Types & Examples

A picture is worth of thousand words; a chart is worth of thousand sets of data. In this topic, we
are going to learn how we can use graph in Excel to visualize our data.

What is a chart?

A chart is a visual representative of data in both columns and rows. Charts are usually used
to analyse trends and patterns in data sets. Let's say you have been recording the sales figures in
Excel for the past three years. Using charts, you can easily tell which year had the most sales and
which year had the least. You can also draw charts to compare set targets against actual
achievements.

We will use the following data for this topic.

Note: we will be using Excel 2013. If you have a lower version, then some of the more advanced
features may not be available to you.

Item 2012 2013 2014

Desktop Computers 20 12 13

Laptops 34 45 40

NDOLA TRUST SCHOOL (2020) 26


Monitors 12 10 17

Printers 78 13 90

Types of charts

Different scenarios require different types of charts. Towards this end, Excel provides a number
of chart types that you can work with. The type of chart that you choose depends on the type
of data that you want to visualize. To help simplify things for the users, Excel 2013 and above
has an option that analyses your data and makes a recommendation of the chart type that you
should use.

The following table shows some of the most commonly used charts and when you should
consider using them.

S/ CHART WHEN SHOULD I USE IT? EXAMPLE


N TYPE

1 Pie Chart When you want to quantify items and


show them as percentages.

2 Bar Chart When you want to compare values


across a few categories. The values
run horizontally

NDOLA TRUST SCHOOL (2020) 27


3 Column When you want to compare values
chart across a few categories. The values
run vertically

4 Line When you want to visualize trends


chart over a period of time i.e. months,
days, years, etc.

5 Combo When you want to highlight different


Chart types of information

The importance of charts

 Allows you to visualize data graphically


 It's easier to analyse trends and patterns in the charts
 Easy to interpret compared to data in cells

NDOLA TRUST SCHOOL (2020) 28


Step by step example of creating charts in Excel

In this topic, we are going to plot a simple column chart that will display the sold quantities
against the sales year.

 Open Excel
 Enter the data from the sample data table above
 Your workbook should now look as follows

To get the desired chart you have to follow the following steps

NDOLA TRUST SCHOOL (2020) 29


 Select the data you want to represent in graph
 Click on INSERT tab from the ribbon
 Click on the Column chart drop down button
 Select the chart type you want

You should be able to see the following chart

NDOLA TRUST SCHOOL (2020) 30


Topic Exercise

When you select the chart, the ribbon activates the following tab

Try to apply the different chart styles, and other options presented in your chart.

Download the above Excel Template

Summary

Charts are a powerful way of graphically visualizing your data. Excel has many types of charts
that you can use depending on your needs.

Conditional formatting is also another power formatting feature of Excel that helps us easily see
the data that meets a specified condition

NDOLA TRUST SCHOOL (2020) 31

You might also like