0% found this document useful (0 votes)
4 views

Excel Lecture 3

The document provides a comprehensive overview of Microsoft Excel, covering common error codes, macros, array formulas, nested functions, and file protection methods. It includes detailed explanations of error messages, their meanings, and solutions, as well as instructions for recording and running macros. Additionally, it outlines procedures for printing Excel sheets and changing page orientation.

Uploaded by

kdgshantie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Excel Lecture 3

The document provides a comprehensive overview of Microsoft Excel, covering common error codes, macros, array formulas, nested functions, and file protection methods. It includes detailed explanations of error messages, their meanings, and solutions, as well as instructions for recording and running macros. Additionally, it outlines procedures for printing Excel sheets and changing page orientation.

Uploaded by

kdgshantie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Information and Communication

Technology
ICT 100
MICROSOFT EXCEL

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 1


Facilitators

Mumderanji James
[email protected]
[email protected]
&
Wilson Lemani
[email protected]
[email protected]

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 2


MICROSOFT EXCEL/SPREADSHEET

Indicative Content:
Understand Common Excel Error Codes
Use Excel Macros
Array formula
Nested Functions
Protect excel file
Print Worksheets

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 3


ERRORS IN MS-EXCEL
The following table shows Excel's error values along
with meaning and the most probable cause for its
appearance.
To remove an error value from the cell you need to
figure out what's wrong with formula and fix it.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 4


Common error messages

##### cell isn't wide enough to show the data


#VALUE! Wrong type of data for a function
#DIV/0 Tried to divide by Zero
#NAME Cell name not defined (usually) misspelled
#REF Cell reference is not valid
#NUM Function requires a number
#NULL Called a nonintersecting range of cells
#N/A No value available

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 5


####
Meaning
The column is not wide
enough to display the value,
ie the cell is too small for the
value

Fixes
Widen the column

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 6


#VALUE!
Meaning
Wrong type of argument
Wrong type of data function
Something wrong with the
input to the formula

Fixes
Check operands and arguments
and make sure references are
valid

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 7


#DIV/0
Meaning
The formula attempted to divide by
Zero
The division operation in your formula
refers to a cell that contains zero or is
blank
Fixes
Change the value or the cell
references so that the formula does
not divide by zero

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 8


#NAME
Meaning
The formula is referencing an invalid or
nonexistent name
Cell name not defined or (usually)
misspelled

Fixes
Make sure the name still exists or correct
the spelling

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 9


#REF
Meaning
Excel cannot locate the referenced
cell (for example, referenced cells are
deleted) cell references are invalid

Fixes
Click UNDO immediately to
references and then change the
formula references or convert
formulas to the value

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 10


#NUM
Meaning
Incorrect use of numbers (such as sort (-
1)) or formula results in a number too
large or too small to be displayed.
Function requires a number
Fixes
Make sure the arguments are correct and
that the result is between -1*10307
powers

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 11


#NULL
Meaning
References to intersection of two area
that do not intersect
Called nonintersecting range of cells
Fixes
Check for typing and reference errors

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 12


#N/A
Meaning
Most commonly means no value is
available or inappropriate
arguments were used
No value available

Fixes
In a look up to the formula, be sure
the look up table sorted correctly

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 13


Correcting errors
Errors in Data and Formulas
To fix bad data, click on the cell and retype the
number
To fix bad formula, click the cell containing formula
then, then highlight the error in the formula bar and
make corrections
Errors in Data and Formulas
The program can help spot errors
Excel messages begin with “#’”
11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 14
RECORDING MACROS
A macro is an action or a set of actions that you can
run as many times as you want.
To automate a repetitive task, you can record a
macro with the Macro Recorder in Microsoft Excel.
Imagine you have dates in random formats and you
want to apply a single format to all of them.
A macro can do that for you. You can record a
macro applying the format you want, and then
replay the macro whenever needed

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 15


This feature works the same in all modern versions of
Microsoft Excel: 2010, 2013, and 2016.
1.On the View tab, in the Macros group, click
the Macros command

2.Click record Macro

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 16


In the Record Macro dialog box:
1.Enter a Macro name. Choose a name that clearly identifies the
macro. You may not use spaces.
2.Enter a Shortcut key. You will be able to run the macro using this
shortcut key.
3.Choose where to store the macro. You will normally accept the
default (This Workbook).
4.Enter a Description. Briefly explain what the macro does.
5.Click OK.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 17


1.After clicking OK, every keystroke is recorded.
2.To stop recording, on the View tab, in the Macros group, click
the Macros command and then click Stop Recording

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 18


How to run Macros in excel
1. Go to view
2. Click macros command
3. Choose saved macros
4. Click run

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 19


Array formulas
Essentially, an array is a collection of items. The items can
be text or numbers and they can reside in a single row or
column, or in multiple rows and columns.
So an array is just a list or range of values,
In Excel, an Array Formula allows you to do powerful
calculations on one or more value sets. The result may fit
in a single cell or it may be an array.
An Array Formula is a special type of formula that must
be entered by pressing Ctrl+Shift+Enter.
The formula bar will show the formula surrounded by
curly brackets {=...}.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 20


Simple example of Excel array formula

Suppose you have some items in


column B, their prices in column C,
and you want to calculate the grand
total of all sales.
Of course, nothing prevents you
from calculating subtotals in each
row first with something as simple
as =B2*C2 and then sum those
values:

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 21


So, all it takes is a single array formula and 2 quick steps:
1.Select an empty cell and enter the following formula in it:
=SUM(B2:B6*C2:C6)
2.Press the keyboard shortcut CTRL + SHIFT + ENTER to complete the
array formula.
Once you do this, Microsoft Excel surrounds the formula with {curly
braces}, which is a visual indication of an array formula.
What the formula does is multiply the values in each individual row of
the specified array (cells B2 through C6), add the sub-totals together,
and output the grand total:

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 22


Because all Excel array formulas require pressing Ctrl + Shift + Enter, they
are sometimes called CSE formulas.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 23


Example 2. A multi-cell array
formula in Excel
In the previous SUM example,
suppose you have to pay 10% tax
from each sale and you want to
calculate the tax amount for each
product with one formula.
Select the range of cell in some blank
column, say D2:D6, and enter the
following formula in the formula bar:
=B2:B6 * C2:C6 * 0.1
Once you press Ctrl + Shift + Enter,
Excel will place an instance of your
array formula in each cell of the
selected range, and you will get the
following result:

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 24


NESTED FUNCTION
A nested function is tucked inside another Excel
function as one of its arguments. Nesting
functions let you return results you would have
a hard time getting otherwise.
Nested functions are best entered directly.
In the example provided below
Cell C14 has this
formula: =AVERAGE(MAX(B4:B10),MAX(D4:D10)).

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 25


Nested functions cont...
In this example, you use the AVERAGE function to find the average of the largest
values from two sets of numbers. The nested function in this example is MAX. You
enter the MAX function twice within the AVERAGE function.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 26


The COUNTIF function counts the number of cells in a range that meet a condition. The condition
in this case is that any single value in the range is greater than (>) the average of the range. The
formula in cell D7 is =COUNTIF(B5:B25, “>“ & AVERAGE(B5:B25)). The AVERAGE function is
evaluated first; then the COUNTIF function is evaluated, using the returned value from the nested
function as an argument.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 27


Nested if
The IF function tests a condition and returns
a specific value depending on if the test is
true or false. When IF function arguments
contain IF functions, we have nested IF
statements
A common example of nested IF functions is
when grades or awards are based upon a
numeric scale.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 28


Nested if
The spreadsheet below shows the first 6 students of a class. The cells in
Column C contain a formula with nested IF functions for Excel to
determine the letter grade based upon the numeric grade that the
instructor entered in column B.
=IF(B4>89,"A",IF(B4>79,"B",IF(B4>69,"C",IF(B4>59,"D","F"))))

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 29


PROTECTING EXCEL FILES
Procedure
Select FILE > Info.
Select the PROTECT WORKBOOK box and choose
Encrypt with password
Enter a password in the password box and then
click ok
Confirm the password in the Reenter Password box
and then select OK

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 30


PRINTING EXCEL SHEET
To print your document,
go to File
Print
select your desired settings
and then click Print.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 31


It is also possible to print by using the Print icon on
the Standard toolbar
however this does not bring up the Print dialogue
box that allows you to change your printing options
so it is advisable to use the other method.

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 32


Changing Page Orientation
To be able to change the orientation of your page for
printing,
Click on the Page Setup button under the option to Print

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 33


11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN 34
NEXT LESSON
Microsoft Access

11/1/2021 KAMUZU UNIVERSITY OF HEALTH SCIENCES FORMERLY COM AND KCN


35

You might also like