Professional Documents
Culture Documents
European
Computer
Driving
Licence
AM4 - Advanced
Spreadsheets
Courseware covers
ECDL Advanced Syllabus 2.0
Page 1 of 120
Ms Joanne Zarb
TABLE OF CONTENTS
FORMATTING ......................................................................................................................................... 5
Applying a Table Style to a Cell Range ................................................................................................. 5
Apply Conditional Formatting ............................................................................................................. 6
Creating & Applying Custom Number Formats .................................................................................... 8
Copying & Moving Worksheets between Workbooks ........................................................................ 10
Splitting a Window ............................................................................................................................ 11
Hiding & Showing Rows, Columns & Worksheets .............................................................................. 12
Activity 1 ........................................................................................................................................ 13
FUNCTIONS & FORMULAE..................................................................................................................... 15
Using the Date & Time Functions ...................................................................................................... 17
Using Mathematical Functions .......................................................................................................... 18
Activity 2 ........................................................................................................................................ 20
Using Statistical Functions ................................................................................................................. 21
Using Text Functions ......................................................................................................................... 23
Activity 3 ........................................................................................................................................ 25
Using Financial Functions .................................................................................................................. 26
Activity 4 ........................................................................................................................................ 29
Using Lookup Functions .................................................................................................................... 30
VLOOKUP Function ........................................................................................................................... 30
HLOOKUP Function ........................................................................................................................... 31
Activity 5 ........................................................................................................................................ 32
Using Database Functions ................................................................................................................. 33
DMIN Function.................................................................................................................................. 34
DMAX Function ................................................................................................................................. 35
DCOUNT Function ............................................................................................................................. 35
DAVERAGE Function ......................................................................................................................... 36
Activity 6 ........................................................................................................................................ 37
Using Logical Functions ..................................................................................................................... 38
IF Function ........................................................................................................................................ 38
AND Function.................................................................................................................................... 39
OR Function ...................................................................................................................................... 39
Creating Two-Level Nested Functions................................................................................................ 40
Page 2 of 120
Ms Joanne Zarb
Page 3 of 120
Ms Joanne Zarb
Page 4 of 120
Ms Joanne Zarb
FORMATTING
3. Click the table style to apply. The Create Table dialog box is displayed.
4. Highlight the range of cells to apply the style to.
5. Click OK button.
Page 5 of 120
Ms Joanne Zarb
A conditional format is a format such as cell shading or font colour that MS Excel
automatically applies to cells if a specified condition is true. For example, you can apply red
text colour to the cells where the sales are below €100.
5. Click the appropriate rule to use e.g. Between… The Between dialog box is
displayed.
6. Enter the appropriate values.
Page 6 of 120
Ms Joanne Zarb
Note that:
You can add more conditions by repeating the above steps.
Page 7 of 120
Ms Joanne Zarb
MS Excel comes with several built-in number formats, but at times you may need to use a
number format that is not available in Excel. Custom number formats can contain up to four
sections, each separated by a semicolon (;):
When you create a custom number format, you do not have to specify all four sections. If
you include only two sections, the first section will be used for both positive numbers and
zero values, while the second section will be used for negative numbers. If you include only
one section, all number types will use that one format. Text is affected by custom formats
only when you use all four sections; the text will use the last section. If you skip a section,
include the ending semicolon for that section.
#,###.00;[Red](#,###.00);0.00;”sales “@
? adds spaces for insignificant zeros on either side of the decimal point so that decimal
points align when formatted with a fixed-width font, such as Courier New. You can also
use ? for fractions that have varying numbers of digits.
Text (e.g. the Euro currency symbol) that will be included with numbers should be
typed within inverted quotes. The Euro (€) currency symbol can be inserted by
pressing ALT+0128 on the numeric keypad. The Sterling (£) currency symbol can
be inserted by pressing ALT+0163 on the numeric keypad.
To set the colour for a section of the format, type the name of one of the following
eight colours in square brackets in the section. The colour code must be the first
item in the section. For example if you want negative numbers to be displayed
in
red type [Red] within square brackets before the negative number section.
Page 9 of 120
Ms Joanne Zarb
Note that:
MS Excel applies the default
General format to any cells in the workbook that were formatted with
the deleted custom format.
7. In the To book: field select the workbook to receive the sheets. To move or copy
the selected sheets to a new workbook, click new book.
8. In the Before sheet: field select the sheet before which you want to insert the
moved or copied sheets.
9. To copy the sheets instead of moving them, select the Create a copy check box.
Page 10 of 120
Ms Joanne Zarb
Splitting a Window
You can split the MS Excel window into multiple resizable panes containing views of your
worksheet. You can use this feature to view multiple distant parts of your worksheet at
once.
To split a window:
1. Click any cell in the workbook.
2. Click the View tab.
3. In the Window group, click Split.
Note that:
The program
splits the window vertically at the left edge of the pointer and horizontally along the
top edge.
After you split the window into panes, you can move the cell cursor into a particular pane by
clicking one of its cells.
Note that:
Alternatively you can remove the split bars by double-clicking these.
Page 11 of 120
Ms Joanne Zarb
Page 12 of 120
Ms Joanne Zarb
Note that:
If the first row or column of a worksheet
is hidden, type A1 in the Reference box, and press
ENTER key. Repeat steps 3-5 as above.
4. In the Unhide sheet: box, click the name of the hidden sheet (e.g. freeze) you want
to display.
5. Click OK button.
Activity 1
Page 13 of 120
Ms Joanne Zarb
4. In the data worksheet, apply the following formatting to the cell range G2 to I39:
a. The text colour of cells containing the numbers between 1 and 2 should
be red.
b. The text colour of cells containing the numbers between 3 and 4 should
be blue.
c. The text colour of cells containing the numbers between 5 and 6 should
be green.
d. The text colour of cells containing the numbers between 7 and 8 should
be pink.
5. Open two.xlsx located in Exercises folder.
6. In the custom number worksheet:
a. Apply a custom number format to the numbers in the cell range B4:B9. The
custom number format should display positive numbers with the € followed by
a space. Do not include any figures after the decimal point. Negative numbers
should be displayed in the same way but within brackets.
b. Apply a custom number format to the numbers in the cell range C4:C9. The
custom number format should display positive numbers with the € followed by
a space and the number including the decimal point and two numbers after
the decimal point. Negative numbers should be displayed in the same way but
within brackets and in red colour.
7. Move the custom number worksheet in two.xlsx to be before the data worksheet
in first.xls.
8. Copy the sales worksheet in one.xlsx to be before Sheet2 in two.xlsx.
9. In one.xlsx:
a. Split the data worksheet to display a horizontal and vertical split bar.
b. Remove the horizontal and vertical split bars.
10. Hide column A and I in the data worksheet.
11. Hide the sales worksheet in one.xlsx.
12. Unhide column A and I in the data worksheet.
13. Unhide the sales worksheet in one.xlsx.
14. Save and close one.xlsx and two.xlsx.
Page 14 of 120
Ms Joanne Zarb
There are many functions available in MS Excel which you can use to carry out calculations
or operations. You have probably already used functions such as =SUM() and =AVERAGE().
The AutoSum button on the Home tab can also be used to insert
functions such as Average, Count, Max, and Min functions, together
with a More Functions entry that displays the Insert Function dialog
box (discussed next).
The Insert Function dialog box, guides you through the process of choosing a function and
specifying its arguments correctly.
Page 15 of 120
Ms Joanne Zarb
2. You can type the name of the function or a brief description of what you want to do
in the Search for a function: box.
Alternatively, you can choose the category e.g. Math & Trig to which the function
belongs.
3. Click the function e.g. SUM to use below Select a function:
4. Click OK button. The Function Arguments dialog box is displayed. The display
varies according to the function selected in step 3.
Page 16 of 120
Ms Joanne Zarb
5. Enter the data in each argument box in turn, either by typing in the data or by
clicking the Collapse Dialog buttons and using the mouse to select the appropriate
cell or range references. As you work, MS Excel displays information on the current
argument and, as soon as appropriate, the result of the formula.
6. Click OK button.
MS Excel stores dates as sequential serial numbers so they can be used in calculations. In
Windows based computer, January 1, 1900 is serial number 1, and January 1, 2008 is serial
number 39448 because it is 39,448 days after January 1, 1900.
TODAY Function
The =TODAY() function is used to insert the date from your computer‘s internal clock.
Note that:
The TODAY function returns the serial number of the current date. If the cell format was General
before the function was entered, the result is formatted as a date.
DAY Function
The =DAY() function returns the day of the month for
a date.
Note that:
The day is given as an integer ranging from 1 to 31.
You can also enter the date directly into the function e.g. =DAY(„25/04/06‟). The result will
also be 25.
Page 17 of 120
Ms Joanne Zarb
MONTH Function
Note that:
The month is given as an integer ranging from 1 to 12.
You can also
enter the date directly into the function e.g. =MONTH(„25/04/06‟). The result will
also be 4.
YEAR Function
Note that:
The year is given as an integer in the range 1900 to 9999.
You can also enter
the date directly into the function e.g. =YEAR(„25/04/06‟). The result will
also be 2006.
ROUNDDOWN Function
Num_digits specifies the number of digits to which you want to round number.
Note that:
If num_digits is
greater than 0 (zero), then number is rounded down to the specified number of
decimal places.
If num_digits is 0, then number is rounded down to the nearest integer.
If num_digits is less than 0, then number is rounded down to the left of the decimal point.
Page 18 of 120
Ms Joanne Zarb
ROUNDUP Function
= ROUNDUP(number,num_digits)
where Number is the number you want to round.
Num_digits specifies the number of digits to which you want to round number.
Note that:
If num_digits isgreater than 0 (zero), then number is rounded up to the specified number of
decimal places.
If num_digits is 0, then number is rounded to the nearest integer.
If num_digits is less than 0, then number is rounded up to the left of the decimal point.
SUMIF Function
Criteria is the criteria in the form of a number, expression, or text that defines
which cells will be added. For example, criteria can be expressed as 32, "32",
">32", "apples".
Sum_range are the actual cells to sum.
Note that:
The cells in sum_range are summed only if their corresponding cells in range match the criteria.
Page 19 of 120
Ms Joanne Zarb
If sum_range is omitted, the cells in range are summed.
MS Excel provides additional functions that can be used to analyse your data based
on a condition. For example, to count the number of occurrences of a string of text
or a number within a range of cells, use the COUNTIF function. To have a formula
return one of two values based on a condition,
such as a sales bonus based on a
specified sales amount, use the IF function.
Consider the following example. To calculate the sum of commissions for property values
over €100,000 enter the formula as shown below.
Consider the following example. To calculate the expenses incurred for the lab enter the
formula as shown below.
Activity 2
You will use Exercises.
1. Open three.xlsx located in Exercises folder.
2. In the Date & Time worksheet:
a. Enter a function in cell A2 so that the current date will be displayed.
b. Enter a function in cell A5 that will return the day of the month for the
date in cell A2.
c. Enter a function n cell A8 that will return the month for the date in cell A2.
d. Enter a function in cell A11 that will return the year for the date in cell A2.
Page 20 of 120
Ms Joanne Zarb
a. In cell B1 round 4.2 down to zero decimal places.
b. In cell B2 round 76.9 down to zero decimal places
c. In cell B3 round 3.145 down to two decimal places
d. In cell B4 round 4.2 up to zero decimal places
e. In cell B5 round 76.9 up to zero decimal places
f. In cell B6 round 3.145 up to two decimal places,
Many of the most frequently used spreadsheet functions involve counting values or
worksheet elements (text, blank cells, specific number or text, etc.). A "counting" function
will return the number of cells in a range that meet certain criteria. There are several
variations of the COUNT function. Each will look for different types of data in a range, and
then return the result.
COUNTIF Function
The COUNTIF function counts the number of cells within a range that meet the given
criteria.
=COUNTIF(range,criteria)
where Range is the range of cells from which you want to count cells.
Criteria is the criteria in the form of a number, expression, cell reference, or text
that defines which cells will be counted. For example, criteria can be expressed as
32, "32", ">32", "apples", or B4.
Consider the following example. To calculate the number of students who got over 80 enter
the function as shown below.
Page 21 of 120
Ms Joanne Zarb
COUNTBLANK Function
RANK Function
The RANK function returns the rank of a number in a list of numbers. The rank of a number is
its size relative to other values in a list. If you were to sort the list, the rank of the number
would be its position.
= RANK(number,ref,order)
where number is the number whose rank you want to find.
ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are
ignored.
order is a number specifying how to rank number. If order is 0 (zero) or omitted,
MS Excel ranks number as if ref were a list sorted in descending order. If order is
any nonzero value, MS Excel ranks number as if ref were a list sorted in ascending
order.
Page 22 of 120
Ms Joanne Zarb
Note that:
RANK gives duplicate numbers the same rank. However, the presence of duplicate
numbers affects the ranks of subsequent numbers. For example, in a list of integers
sorted in ascending order, if the number 10 appears twice and has
a rank of 5, then
11 would have a rank of 7 (no number would have a rank of 6).
LEFT Function
The LEFT function returns the first character or characters in a text string, based on the
number of characters you specify.
=LEFT(text,num_chars)
Where text is the text string that contains the characters you want to extract.
num_chars specifies the number of characters you want LEFT to extract.
Note that:
Num_chars must be greater than or equal to zero.
If num_chars is greater than the length of text, LEFT returns all of text.
If num_chars is omitted, it is assumed to be 1.
RIGHT Function
The RIGHT function returns the last character or characters in a text string, based on
the number of characters you specify.
=RIGHT(text,num_chars)
where text is the text string that contains the characters you want to extract.
num_chars specifies the number of characters you want RIGHT to extract.
Note that:
Num_chars must be greater than or equal to zero.
If num_chars is greater than the length of text, RIGHT returns all of text.
If num_chars is omitted, it is assumed to be 1.
Page 23 of 120
Ms Joanne Zarb
MID Function
The MID function returns a specific number of characters from a text string, starting at the
position you specify, based on the number of characters you specify.
=MID(text,start_num,num_chars)
where text is the text string that contains the characters you want to extract.
start_num is the position of the first character you want to extract in text. The first
character in text has start_num 1, and so on.
num_chars specifies the number of characters you want MID to return from text.
TRIM Function
The TRIM function removes all spaces from text except for single spaces between words.
Use TRIM on text that you have received from another application that may have irregular
spacing.
=TRIM(text)
where text is the text from which you want spaces removed.
CONCATENATE Function
The CONCATENATE function joins several text strings into one text string.
=CONCATENATE(text1,text2…)
where Text1, text2 are 1 to 30 text items to be joined into a single text
item. The text items can be text strings, numbers, or single-cell
references.
Page 24 of 120
Ms Joanne Zarb
Activity 3
You will use Exercises.
Page 25 of 120
Ms Joanne Zarb
e. Enter a function in cell F10 to join the alphabet letters MT in cell E10 to
the number 60321 in cell D10. Copy the function in cell F10 to cell range
F11:F12.
5. Save and close four.xlsx.
MS Excel has several financial management functions. These can be used to calculate loan
payments, make decisions about investment opportunities and compare investment returns.
The financial functions make use of the following arguments:
Argument Description
PV (Present Value) This is the principal amount.
If you invest €1,000 in a bank, this amount represents the principal, or
present value of the money you invested.
If you borrow €75,000 to purchase an apartment, this amount represents
the principal or present value of the loan.
The present value may be positive or negative.
FV (Future Value) This is the principal plus interest.
If you invest €5,000 for 5 years and earn 6% annual interest, you receive
€6,312.38 at the end of the five-year term. The amount is the future value
of your €5,000 investment.
If you take out a three-year car loan for €15,000 and pay 7% annual
interest, you pay a total of €16,673.16. This amount represents the
principal plus the interest you paid.
The future value may be positive or negative.
PMT (Payment) This is either principal, or principal plus interest.
If you deposit €100 per month into a savings account, €100 is the payment.
If you have a monthly loan payment of €215, the €215 is made up of
principal and interest.
Rate (Interest rate) Interest is a percentage of the principal, usually expressed on an annual
basis.
For example, you might earn 5.5% annual interest on a bank account. On
your home loan may have a 7.75% interest rate.
Nper (Term) This is the term during which interests will be paid or payments will be
made.
A 12 month fixed account has a term of one year. A 30-year home loan has
a term of 30 years.
Type When payment is to be made (0 if omitted); 0 = at end of period; 1 = at
beginning of period
FV Function
The FV function is used to calculate the future value of an investment based on periodic
constant payments and a constant interest rate.
For example you can use the FV function to calculate how much money you will have in
your bank account provided that you invest the same sum of money per month, on a
regular basis and if the interest rate does not change over the investment period.
Page 26 of 120
Ms Joanne Zarb
=FV(rate,nper,pmt,[pv],[type])
Note that:
PV and type (within square brackets) can be omitted.
Make sure that you are consistent about the units you use for specifying rate and
nper. If you make monthly payments on a four-year loan at 12 percent annual
interest, use 12%/12 for rate and 4*12 for nper.If you make annual payments on
the same loan, use 12% for rate and 4 for nper.
For all the arguments, cash you pay out, such as deposits to savings, is represented by
negative numbers;cash you receive, such as dividend cheques, is represented by
positive numbers.
The type is set to 0 assuming the payment is made at the end of the ten year term.
Page 27 of 120
Ms Joanne Zarb
PV Function
The PV function (Present Value) calculates the present value of an investment i.e. the total
amount that a series of future payments is currently worth.
=PV(rate,nper,pmt,[fv],[type])
Since you can invest your money in a 5-year bank account at 3.5%, you will use 3.5% as
the interest rate of the investment. This interest rate (3.5%) is a sort of hurdle over which
an investment must leap before it becomes attractive to you. This is often called the hurdle
rate.
The result of the present value of this investment opportunity is €4515.05. This means that
if you would like to earn €5,000 after 5 years, you would need to invest €4515.05 in the
bank at 3.5%. Therefore the investment opportunity is attractive because you will only
invest €4000 to receive €5,000. Through the bank you will need to invest €4,515.05.
PMT Function
The PMT function calculates the payment for a loan based on constant payments and a
constant interest rate.
=PMT(rate,nper,pv,[fv],[type])
Note that:
The payment returned by PMT includes principal and interest but no taxes, reserve payments, or
fees sometimes associated with loans.
Page 28 of 120
Ms Joanne Zarb
Example 1: You want to borrow €75,000 to
purchase an apartment. The annual
interest rate is 5%. You want to work out
the amount of money that you will pay at
the end of each month over 30 years (i.e.
30×12=360months).
Activity 4
You will use Exercises.
1. Open five.xlsx located in Exercises folder.
2. You are going to invest €100 into a fixed account and leave it there for 10 years.
The annual interest rate on the savings account is 6% compounded monthly. How
much will it have grown to be in 10 years? Enter the appropriate function in cell B8
in the FV worksheet.
3. You are going to put an initial deposit of €1,000 into a bank account and then
Lm100 each month for ten years. The annual interest rate is 6% compounded
monthly. How much will you have at the end of 10 years? Enter the appropriate
function in cell B18 in the FV worksheet.
4. You want to borrow €14,500 for 5 years at 8% annual interest. How much will you
pay back at the end of the 5 years? Enter the appropriate function in cell B28 in
the FV worksheet.
5. You need to make a deposit today that in 10 years will have grown to €100. The
interest rate is 8%. How much should you deposit? Enter the appropriate function in
cell B8 in the PV worksheet.
6. You are presented with an investment opportunity that returns €1,000 each year
over the next 5 years. To receive this annuity, you must invest €4,000. Are you
willing to pay €4,000 today to earn €5,000 over the next 5 years? Enter the
appropriate function in cell B18 in the PV worksheet.
7. You want to borrow €75,000 to purchase an apartment. The annual interest rate is
5%. What will be your monthly payment? Enter the appropriate function in cell B6
in the PMT worksheet.
8. You would like to have €50,000 in your bank account by the time you retire. You
Page 29 of 120
Ms Joanne Zarb
have 30 years until retirement and you have found a special bank account which
pays 6% interest for 30 years. How much do you have to deposit each month to
reach your goal amount? Enter the appropriate function in cell B14 in the PMT
worksheet.
9. Save and close five.xlsx.
MS Excel provides two basic lookup functions to search a column or row for a lookup value
to return another value as a result.
VLOOKUP Function
The VLOOKUP function looks up the value in the first column of the lookup table and returns
the corresponding value in a specified table column. The lookup table is arranged vertically.
VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup])
where lookup_value is the value to be looked up in the first column of the lookup table.
Example: The sheet has two tables: (a) the table containing the scores of students and a
blank column for grades and (b) the grades table having the Scores column and the Grade
column.
=VLOOKUP($C4,$F$4:$G$8,2)
Page 30 of 120
Ms Joanne Zarb
The VLOOKUP function will be used to look up the score e.g. 240 (in cell C4) in the Grades
Table. The score 240 is over 230 corresponding to Grade A in the Grades Table. Therefore
grade A will be automatically inserted in cell D4.
Note that:
The values in the first column of look-up table must be placed in ascending sort order;
otherwise, VLOOKUP may not give the correct
value. The values in the Score column of
the Grades Table are in ascending order.
The dollar sign in $C4 is used to ensure that we keep referring to the same cell when
using the AutoFill feature.
Similarly absolute cell references are used for the look-up
table $F$4:$G$8.
Column headings in the lookup table are not included when defining the range of the look-up
table.
The value 2 refers to the second column in the Grades Table. This means that values/text in
column 2 of the look-up table will be placed in cell D4.
Now let‘s assume that we have the Award column. We cannot look for the grade in the
Grades Table and have the corresponding award entered in column E. This is because the
Grade column in the Grades Table would have to be sorted in ascending order. If we sort
the Grade column in the Grades Table in ascending order, column D will display errors. Here
we will need to look-up the score in the Grades Table and have the corresponding Award
entered in column E.
=VLOOKUP($C4,$G$4:$I$8,3)
HLOOKUP Function
The HLOOKUP function works just like the VLOOKUP function except that the lookup table is
arranged horizontally instead of vertically. The HLOOKUP function looks up the value in the
first row of the lookup table and returns the corresponding value in a specified table row.
HVLOOKUP(lookup_value,table_array,row_index_num,[range_lookup])
where lookup_value is the value to be looked up in the first row of the lookup table.
row_index_num is the row number within the table from which the matching
value is returned.
range_lookup (Optional). If TRUE or omitted, an approximate match is returned.
(If an exact match is not found, the next largest value that is less than
lookup_value is returned.) If FALSE, HLOOKUP will search for an exact match. If
HLOOKUP cannot find an exact match, the function returns #N/A.
Example: The sheet has two tables: (a) the Grades Table having the Scores column and the
Grade column and (b) the table containing the scores of students and a blank column for
grades. Note that the Grades Table (lookup table) is arranged horizontally.
=HLOOKUP($C10,$B$3:$F$5,3)
=HLOOKUP($C10,$B$3:$F$5,2)
Activity 5
You will use Exercises.
1. Open six.xlsx located in Exercises folder.
2. In the VLOOKUP worksheet, add a lookup function in cell D4 to input the grade
corresponding to the score in cell C4. Copy the function in cell D4 to the cell
range D5:D8.
3. Add a lookup function in cell E4 to input the award corresponding to the score in
cell C4. Copy the function in cell E4 to the cell range E5:E8.
4. In the HVLOOKUP worksheet, add a lookup function in cell D10 to input the grade
corresponding to the score in cell C10. Copy the function in cell D10 to the cell
range D11:D14.
5. Add a lookup function in cell E10 to input the award corresponding to the score in
cell C10. Copy the function in cell E10 to the cell range E11:E14.
6. Save and close six.xlsx.
Page 32 of 120
Ms Joanne Zarb
Using Database Functions
We have already used the standard statistical functions SUM, MIN, MAX and COUNT. Their
D-equivalents behave in a similar way but only operate on those values that meet criteria
specified by you.
The criteria are not included in the formula, as they were with SUMIF and COUNTIF, but
these are entered in a range of cells on your worksheet. This means that you can build
complex criteria.
DSUM Function
The DSUM function returns the total of all the values in a database column satisfying a
condition/s.
where database is the range of cells that make up the database or list.
field is the column name or number indicating which column to use.
criteria is the range of cells that contain the conditions.
Example:The worksheet displays a database list. In cell C13 you want to find the sum of
st
salaries for persons who are less than 20 years old and employed before the 1 January
2003.
At the top of the worksheet the same headings used for the database list are typed in the
first row. On the second row the criteria where entered i.e. in cell B2 the criterion <20 was
entered and in cell D2 the criterion <=01/01/03 was entered.
Page 33 of 120
Ms Joanne Zarb
Note that:
The "criteria" must be in a contiguous block of adjacent cells.
The "criteria" can be anywhere on the active sheet, although it is recommended not to put it
below the data, in case more data is added later on.
Make sure the "criteria" and "database" ranges do not overlap and that they are always
separated by at least one blank row or column.
DMIN Function
The DMIN function returns the smallest number in a database column satisfying a
condition/s.
=DMIN(database, field, criteria)
where database is the range of cells that make up the database or list.
field is the column name or number indicating which column to use.
criteria is the range of cells that contain the conditions.
Example: The worksheet displays a database list. In cell C13 you want to find the minimum
st
salary paid for persons who are less than 20 years old and employed before the 1 January
2003.
At the top of the worksheet the same headings used for the database list are typed in the
first row. On the second row the criteria where entered i.e. in cell B2 the criterion <20 was
entered and in cell D2 the criterion <=01/01/03 was entered.
Page 34 of 120
Ms Joanne Zarb
DMAX Function
The DMAX function returns the largest number in a database column satisfying a
condition/s.
=DMAX(database, field, criteria)
where database is the range of cells that make up the database or list.
field is the column name or number indicating which column to use.
criteria is the range of cells that contain the conditions.
Example: The worksheet displays a database list. In cell C13 you want to find the maximum
st
salary paid for persons who are less than 20 years old and employed before the 1 January
2003.
At the top of the worksheet the same headings used for the database list are typed in the
first row. On the second row the criteria where entered i.e. in cell B2 the criterion <20 was
entered and in cell D2 the criterion <=01/01/03 was entered.
DCOUNT Function
The DCOUNT function returns the total number of values in a database column satisfying a
condition/s.
=DCOUNT (database, field, criteria)
where database is the range of cells that make up the database or list.
field is the column name or number indicating which column to use.
criteria is the range of cells that contain the conditions.
Page 35 of 120
Ms Joanne Zarb
Example: The worksheet displays a database list. In cell C14 you want to find the number of
employees who are less than 20 years old and received less than €20,000 salary.
At the top of the worksheet the same headings used for the database list are typed in the
first row. On the second row the criteria where entered i.e. in cell B2 the criterion <20 was
entered and in cell C2 the criterion <=19000 was entered.
DAVERAGE Function
The DAVERAGE function averages the values in a field (column) of records in a list or
database that match conditions you specify.
=DAVERAGE(database, field, criteria)
where database is the range of cells that make up the database or list.
field is the column name or number indicating which column to use.
criteria is the range of cells that contain the conditions.
Example: The worksheet displays a database list. In cell C13 you want to find the average
salary of employees who are less than 20 years old.
At the top of the worksheet the same headings used for the database list are typed in the
first row. On the second row the criteria where entered i.e. in cell B2 the criterion <20 was
entered.
Page 36 of 120
Ms Joanne Zarb
Activity 6
You will use Exercises.
1. Open seven.xlsx located in Exercises folder.
2. In the DSUM worksheet, add a function in cell C13 to find the sum of salaries for
employees who are less than 20 years old and employed before the 1st January
2003.
3. In the DMIN & DMAX worksheet, add a function in cell C13 to find the lowest
salary received by employees who are less than 20 years old and employed before
the 1st January 2003.
4. In the DMIN & DMAX worksheet, add a function in cell C15 to find the highest
salary received by employees who are less than 20 years old and employed before
the 1st January 2003.
5. In the DCOUNT & DAVERAGE worksheet, add a function in cell C13 to find the
number of employees who are less than 20 years old and received a salary which is
less than or equal to €19,000.
6. In the DCOUNT & DAVERAGE worksheet, add a function in cell C13 to find the
average salary of employees who are less than 20 years old.
7. Save and close seven.xlsx.
Page 37 of 120
Ms Joanne Zarb
IF Function
The IF function is a logical function that evaluates a condition and returns one of two
answers, depending on the result of the evaluation. The IF function has three parts. The
first part determines if a situation is true or false; the second part determines the result to
display if the first part is true; and the third part determines the result to display if the first
part is false.
IF(logical_test,value_if_true,value_if_false)
Example 1: Column D contains the text PASS if the mark in column C is greater or equal to
45. The function used in cell D2 is =IF(C2>=45,”PASS”,”FAIL”). The function returns
PASS in cell D2 because the mark in C2 is greater than 45. The function returns FAIL in cell
D4 because the mark in C4 is less than 45.
Note that:
The text PASS and FAIL are enclosed with inverted quotes. The latter are used when the result
returned by a logical test is text data.
Note that:
Inverted quotes are not used if the results of the logical test are not text data.
Page 38 of 120
Ms Joanne Zarb
AND Function
The AND function works similarly to the OR function except that all the conditions must
be true for the AND condition to return TRUE.
=AND(Condition1,Condition2,Condition3,…)
AND returns TRUE only if all conditions are TRUE. Otherwise, AND returns FALSE.
For the result to be true A2 must be ―Yes‖ and B2 must be ―OK‖. Any of the other three possible
combinations will give a FALSE result.
Example 2: The AND function will be used to check if the student passed both tests. The
pass mark for each test is 50.
OR Function
=OR(condition1,condition2,condition3,…)
OR returns TRUE if any of the conditions are true. It returns FALSE if none of the conditions
are TRUE.
Page 39 of 120
Ms Joanne Zarb
Example 2: The OR function will be used to check if the student passed at least one test.
The pass mark for each test is 50.
Example 1: Consider the underlying worksheet. A grade will be entered in column E based
on the mark in column C following the table under the worksheet.
Page 40 of 120
Ms Joanne Zarb
Note that:
Mark Range Grade
The nested "IF Statements" are placed in the false section
of the previous "IF Statements". The key to understanding 91-100 A
this "IF Statement" is knowing that "IF Statements" are 76-90 B
read from left to right and as soon as a conditionit true,
MS Excel stops reading the rest of the statement. 61-75 C
45-60 D
It is important to close all open brackets.
You need to have as
many close brackets as open brackets. 0-44 F
Example 2: Consider this worksheet. The country of manufacture will be entered in column
B depending on the type of car in column A.
Type Manufacture
Fiat, Alfa ITALY
Opel, Volkswagen GERMANY
Ford, Jaguar BRITAIN
None of the above OTHER
=IF(OR(A2="Fiat",A2="Alfa"),"ITALY",IF(OR(A2="Volkswagen",A2="Opel"),"GE
RMANY",IF(OR(A2="Ford",A2="Jaguar"),"BRITAIN","OTHER")))
Example 3: Consider this worksheet comparing three universities to see which one is ranked
the best between 1 and 10 with 1 being the best. It also employs a nested IF statement.
=IF(AND(B2<B3,B2<B4),A2,IF(AND(B3<B2,B3<B4),A3,A4))
Page 41 of 120
Ms Joanne Zarb
Suppose you have a number of sheets (e.g. Form I, Form II & Form III) in the same
workbook containing similar data e.g. the annual exam marks of the same students. You
can create a worksheet (e.g. Consolidated) that will display the sum of different values in
adjacent sheets. This is referred to as consolidation of data. The function used to total the
different values in adjacent sheets is referred to as 3D Sum function.
The term 3D reference is used to refer to a range of cells that spans two or more
worksheets in a workbook.
1. Create a sheet that will contain the consolidated data. Typically this sheet will be
the first sheet in the workbook. You may give any name to this sheet e.g.
Consolidated.
2. Click the cell where the consolidated data will be displayed.
3. Type =sum(
4. Click the sheet (e.g. Form I) containing the cell/s to add.
5. Highlight the cell/s to be added.
6. Press and hold SHIFT key.
7. Click the next sheet (e.g. Form II) containing the cell/s to add.
8. Highlight the cell/s to be added.
9. Repeat steps 6 through 8 as often as necessary.
10. Press ENTER key. The formula in the consolidated sheet would look something
similar to this: =SUM('Form I:Form III'!B4)
Note that:
The cells are referred to using three pieces of data: the sheet
name, the column heading and the
row heading. This explains why the term 3D reference is used.
Page 42 of 120
Ms Joanne Zarb
Activity 7
You will use Exercises.
2. In the Results worksheet, add a function in cell D2 to return the text Pass if the
mark is greater than or equal to 45. Alternatively it should return the text Fail. Copy
the function in cell D2 to the cell range D3:D6.
3. On the Sales worksheet, add a function in cell D2 to calculate a 2% commission on
sales if the sales exceed €3,000. If the sales do not exceed €3,000 no commission
is awarded. Copy the function in cell D2 to the cell range D3:D6.
4. In the AND worksheet, add a function in cell C2 that will return the text True if A2
is Yes and B2 is OK. Copy the function in cell C2 to the cell range C3:C5.
5. Add a function in cell E10 that will return the text True if the results of both Test 1
and Test 2 are greater or equal to 50. Copy the function in cell E10 to the cell
range E11:E13.
6. In the OR worksheet, add a function in cell C2 that will return the text True if
either A2 is Yes or B2 is Yes. Copy the function in cell C2 to the cell range C3:C5.
7. Add a function in cell E10 that will return the text True if the results of either Test
1 or Test 2 are greater or equal to 50. Copy the function in cell E10 to the cell
range E11:E13.
8. In the Results worksheet, add a function in cell E2 that will award any of the
underlying grades based on the mark in cell C2. Copy the function in cell E2 to the
cell range E3:E6.
9. In the Cars worksheet, add a function in cell B2 that will display any of the
underlying Manufacture based on the type in cell A2. Copy the function in cell B2
to the cell range B3:B8.
Type Manufacture
Fiat, Alfa ITALY
Opel, Volkswagen GERMANY
Ford, Jaguar BRITAIN
None of the above OTHER
10. In the University worksheet, add a function in cell B6 that will display the name
of the best university in the list A2:A4. The best university is the one with the
lowest number in the Rank column.
11. Save and close eight.xlsx.
Page 43 of 120
Ms Joanne Zarb
Page 44 of 120
Ms Joanne Zarb
CHARTS
Page 45 of 120
Ms Joanne Zarb
When the values in a 2-D chart vary widely from data series to data series, or when you
have mixed types of data (for example, price and volume), you can plot one or more data
series on a secondary vertical (value) axis. The scale of the secondary vertical axis reflects
the values for the associated data series.
To help distinguish the data that is plotted along the secondary axis, you can change the
chart type for just one data series. For example, you could change one data series to a line
chart.
Page 46 of 120
Ms Joanne Zarb
You can plot data on a secondary vertical axis one data series at a time. To plot more than
one data series on the secondary vertical axis, repeat this procedure for each data series
that you want to display on the secondary vertical axis.
2. In the Format tab, in the Current Selection group, click Format Selection. The
Format Data Series dialog box is displayed.
3. In the Series Options tab, under Plot Series On, click Secondary Axis.
4. Click Close button.
Note that:
Secondary axes are supported in 2-D charts only.
Page 47 of 120
Ms Joanne Zarb
Click the secondary axis that you want to delete, and then press DELETE.
You can change the chart type for a defined data series (refer to the following illustration):
Page 48 of 120
Ms Joanne Zarb
Page 49 of 120
Ms Joanne Zarb
The data series are related data points that are plotted in a chart. Each data series in a
chart has a unique colour or pattern and is represented in the chart legend. You can plot
one or more data series in a chart. Pie charts have only one data series.
If the data series to add is adjacent to the highlighted cells (e.g. Sales 2009), drag
the corner to include the data series to be added.
If the data series to add is not adjacent to the highlighted cells (e.g. Sales 2010):
a. Click the Design tab below Chart Tools.
b. In the Data group, click Select Data. The Select Data Source dialog
box is displayed.
Page 50 of 120
Ms Joanne Zarb
Note that:
Deleting the data series from a chart does not delete any data in the worksheet.
Page 51 of 120
Ms Joanne Zarb
The legend is a box that identifies the patterns or colours that are assigned to the data
series or categories in a chart.
A data label is used to identify the details of a data point in a data series. To change the
position of data labels:
1. Click the chart.
2. Click the Layout tab below Chart Tools.
3. Click Data Labels. This will display a list of options where the data
labels will be displayed.
4. Click the appropriate data label position or click More Data Label Options… The
Format Data Labels dialog box is displayed.
Page 52 of 120
Ms Joanne Zarb
By default, MS PowerPoint determines the minimum and maximum scale values of the value
(Y) axis in a chart. You can, however, customize the scale to better meet your needs.
Page 53 of 120
Ms Joanne Zarb
If the chart values are large numbers, you can make the axis text shorter and more
readable by changing the display unit of the axis. For example, you can display chart values
ranging from 1,000 to 50,000 as 1 to 50 on the axis and show a label that indicates that the
units are expressed in thousands.
Page 54 of 120
Ms Joanne Zarb
Formatting Columns, Bars, Plot Area & Chart Area to Display an Image
Page 55 of 120
Ms Joanne Zarb
Activity 8
You will use Exercises.
2. In Sheet1, using the data in cell range A1:C4, create a combined column and lien
chart. The data series in cell range B1:B4 should be plotted as columns. The data
in cell data series in cell range C1:C4 should be plotted as a line.
3. In Sheet2:
a. Set the data series in cell range C1:C6 as a secondary vertical axis to the
existing chart.
b. Change the chart type of the secondary value axis only to a line chart.
4. In Sheet3:
a. Add the data series in cell range C1:C4 to the existing chart.
b. Delete the data series i.e. cell range C1:C4 added in the previous step.
c. Add the data series in cell range D1:D4 to the existing chart.
Page 56 of 120
Ms Joanne Zarb
5. In Chart1:
a. Move the chart title to the right of the chart.
b. Show the legend at the bottom of the chart.
c. Show the data labels on top of the columns.
6. In Sheet4, set the scale of the primary value axis such that the minimum unit is
set to 40 and the maximum unit set to 140. Set the major unit to 5.
7. In Sheet5, apply the appropriate setting such that the display units on the y-axis is
set to thousands.
8. In Sheet4, Apply picture fill to the Rainfall columns using the picture rain.gif (in
Exercises folder). Use the stack option.
9. Save and close ten.xlsx.
Page 57 of 120
Ms Joanne Zarb
ANALYSIS
A pivot table allows you to "interactively" aggregate your data and is a great way to
generate a dynamic summary report of your data. The term pivot refers to being able to
change the position of the fields and to being able to transpose the rows and columns of
your table. The more data you have to analyse then the more appropriate it is to use a
pivot table.
Pivot tables are always linked to the data they are derived from.
Looking at the list of data displayed above it is hard to identify the order amounts for each
country per year. The pivot table feature can be used to summarise the data as shown
below:
Page Field
Column Field
Row Field
Data Area
Page 58 of 120
Ms Joanne Zarb
Data Area - summarises the data using the assigned summarisation function or custom formula.
Data Field - identifies the values from the source data that are summarised in the Data Area.
Items -
identifies a sub category for a row or a column that identifies the corresponding data area
values.
Page Field - can be used to filter the values on the page. Only records containing matching values
will be displayed. This is optional
Grand Totals - a row or column that provides a total for all the cells of the data area.
Sub Totals - a row or column that summarises cells within the corresponding detail fields.
When you create a PivotTable, you specify which fields you are interested in, how you want
the table organized, and what kinds of calculations you want the table to perform. After you
have built the table, you can rearrange it to view your data from alternative perspectives.
This ability to ―pivot‖ the dimensions of your table—for example, to transpose column headings to
row positions—gives the PivotTable its name and its unusual analytical power.
You will create a pivot table from an MS Excel worksheet showing the Country field along
columns, Order Date field along rows and the Order Amount as data to sum.
Page 59 of 120
Ms Joanne Zarb
To place the PivotTable report in a new worksheet starting at cell A1, click New
Worksheet.
Alternatively, click Collapse Dialog to temporarily hide the dialog box, select the
beginning cell on the worksheet, and then press Expand Dialog.
6. Click OK button.
MS Excel adds an empty PivotTable report to the specified location and displays the
PivotTable Field List so that you can add fields, create a layout, and customize the
PivotTable report.
Page 60 of 120
Ms Joanne Zarb
Now all that‘s left for you to do is to drag field headings from the PivotTable Field List to
the appropriate places at the bottom of the PivotTable Field List. For example:
Drag the Order Date to the row area (Row Labels).
Drag the Country to the column area (Column Labels).
Drag the Order Amount to the data area (Values).
Drag the Salesperson to the page area (Report Filter).
Note that:
You can put as many fields as you like in any of the areas of the layout.
The PivotTable Field List disappears when you click outside
the pivot table. When you select the
PivotTable data, the PivotTable Field List appears again.
Page 61 of 120
Ms Joanne Zarb
Pivot tables are not updated each time a change occurs in their source data. After you
update any piece of data you need to update the pivot table:
1. Select any cell in the pivot table.
2. Click the Options tab.
3. In the Data group, click Refresh.
Note that:
Alternatively right-click any cell in the pivot table and click Refresh.
If you want Excel to refresh your pivot table every time you open the workbook in which it
resides:
1. Select any cell in the pivot table.
2. Click the Options tab.
3. In the PivotTable group, click Options. The PivotTable Options
dialog box is displayed.
4. Click the Data tab.
Page 62 of 120
Ms Joanne Zarb
You can filter and sort the data in a pivot table to display a subset of data arranged how you
want to view it. MS Excel automatically adds drop-down filter arrows to the Report Filter
field as well as the labels for the Column and Row fields. These filter arrows enable you to
filter out all but certain entries in any of these fields, and in the case of the Column and Row
fields, to sort their entries in the table.
If you‘ve added more than one Column or Row field to your pivot table, MS Excel adds
collapse buttons (-) that you can use to temporarily hide subtotal values for a particular
secondary field. After clicking a collapse button in the table, it immediately becomes an
expand button (+) that you can click to redisplay the subtotals for that one secondary field.
Filter a pivot table report
Perhaps the most important filter buttons in a pivot table are the ones added to the Report
Filter field(s). By selecting a particular option on the drop-down lists attached to one of
these filter buttons, only the summary data for that subset you select is then displayed in
the pivot table itself.
When you filter a pivot table field, MS Excel replaces the standard drop-down button icon
with a cone-shaped filter icon, indicating that the field is currently being filtered to show
only some of the values in the data source.
Page 63 of 120
Ms Joanne Zarb
Note that:
As with filtering a Report Filter field, Excel replaces the
standard drop-down button
icon for that Column or Report field with a cone-shaped
filter icon, indicating that the field is currently being
filtered and only some of its
summary values are now displayed in the pivot table.
You can instantly reorder the summary values in a pivot table by sorting the table on one or
more of its Column or Row fields. To sort a pivot table:
1. Click the filter button for the Column or Row field you want to sort.
2. Click either the Sort A to Z option or the Sort Z to A option at the top of the field‘s
drop-down list.
Note that:
Use the Sort A to Z option when you want the table reordered by sorting the labels
in the selected field alphabetically or in the case of values from the smallest to
largest value or in the case of dates from the oldest to newest date. Use the Sort Z
to A option when you want the table reordered by sorting the labels in reverse
alphabetical order (Z to A), values from the highest to smallest, and dates from the
newest to oldest.
7. Click OK button.
Page 64 of 120
Ms Joanne Zarb
To remove grouping:
1. Click any cell in the field to ungroup.
2. Click the Options tab under PivotTable Tools.
3. In the Group, click Ungroup.
A what-if table enables you to summarise the impact of one or two variables on a formula
that uses those variables. What-if tables are also known as data tables or sensitivity tables.
Page 65 of 120
Ms Joanne Zarb
Let‘s start with a simple what-if problem. You want to invest €75,000 in a bank. Different
banks offer different interest rates, ranging from 5% to 7%. You want to know what money
would be earned at each interest rate in this range. You might be tempted to use a manual
approach, simply substituting each of the interest rates one at a time in the original data
and recording the amount earned. However, the one-variable data table can automate this
process.
Formula entered
in cell B5 is:
=B3*B4
Formula entered
in cell B11 is:
=B3
Formula entered
Formula entered
here references the
in cell B12 is:
input cell:
=B3*B4 or =B5
=B4
In a one-variable data table the input values (the variables) can be oriented either
horizontally, in a row, or vertically, in a column. In this example the interest values
are arranged vertically. A characteristic of one-variable data tables is that the
leftmost cell of the first row of the data in the table (B12 in this example) must
contain a formula referencing the input cell. Because B4 is the cell in the original
data in which MS Excel will successively substitute different interest rates, it‘s the
input cell.
Page 66 of 120
Ms Joanne Zarb
If the interest rates where arranged horizontally, in a row, you would have entered the
cell identification in the Row input cell and left the Column input cell blank.
12. Click OK button. The rest of the table will then be populated with a special array
formula {=TABLE(,B4)}
Note that:
In a one variable data table you only need to enter the cell address in either the
―Column input cell‖ or the ―Row input cell‖.
Do not include the column or row headings when you highlight the table.
Now let‘s complicate the problem a bit by varying the amount invested as well as the interest rate.
MS Excel offers a two-variable data table to accomplish this analysis.
1. Enter the data as shown on the previous page. arious investment amounts were
placed horizontally, across the top row of the table, and listed interest rates
vertically, down the left column.
2. In cell B5 enter =B3*B4
In a two-variable input table, the result cell must be referenced in the top-left
corner of the table, at the intersection of the row and column headings.
3. In cell A11 enter =B5
4. Format cell B11 so it‘s identified as ―Interest Rate‖ while maintaining the underlying formula
=B5
a. Click cell A11.
b. Click the Home tab.
c. In the Number group, click Format Cells: Number Dialog Box Launcher. The
Format Cells dialog box is displayed.
d. In the Number tab, under Category, click Custom.
e. In the Type: field enter “Interest Rate” (including the quotation marks).
f. Click OK button.
Page 67 of 120
Ms Joanne Zarb
Formula
entered in
cell B5 is:
=B3*B4
Formula
entered
here
reference
s the
result
cell: =B5
Page 68 of 120
Ms Joanne Zarb
MS Excel doesn‘t remove the underlying formula (=B5). Instead, it hides it and labels the cell
―Interest Rate.‖ If you click on A11, you‘ll see the formula is still there
5. Highlight the table from A11 to E20. It is important that the reference to the result
cell is in the top-left cell of the highlighted area; otherwise MS Excel won‘t know what
to place in the body of the table when you execute the Table command.
6. Click the Data tab.
7. In the Data Tools group, click What-If Analysis.
8. Click Data Table… The Table dialog box is displayed.
The term of the loan is in the row across the top of the table, while the interest rate
is in a column down the left side.
9. In the Row input cell: type $B$3.
10. In the Column input cell: type $B$4.
11.Click OK button. The rest of the table will then be populated with a special array
formula {=TABLE(B3,B4)}
Note that:
In a two-variable input table, the result cell must bereferenced in the top-left corner of the table,
at the intersection of the row and column headings.
Page 69 of 120
Ms Joanne Zarb
Activity 9
You will use Exercises.
7. On the Survey worksheet, create a pivot table from the cell range A1:D18
showing the Favourite Group field along columns, Age field along rows and the No.
as data to sum. Put the pivot table at cell F2 on the existing worksheet.
8. Show the Age in groups of 10 in the pivot table starting at 15 and ending at 55.
9. On the one-variable worksheet, create a data table from cell range A11:B20
that will calculate the relevant interest amounts for the different interest rates in
the column.
10. On the two-variable worksheet, create a data table from cell range B11:E20
that will calculate the relevant interest amounts for the different investments in the
row and the different interest rates in the column.
11. Save and close eleven.xlsx.
You can sort the data by multiple columns, for example in the following sheet you want to
sort the data in alphabetical order by Surname, then by Name and then by ID Card.
For best results, the range you sort should have column labels.
Page 70 of 120
Ms Joanne Zarb
MS Excel provides the following built-in, day-of-the-week, and month-of-the year custom
lists. Built-in lists cannot be edited or deleted.
Built-in Lists
Sun, Mon, Tue, Wed, Thu, Fri, Sat
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
January, February, March, April, May, June, July, August, September, October, November, December
You can also create your own custom lists, and use them to sort or fill. For example, if you
want to sort or fill by the following lists, you need to create a custom list, because there is
no natural order.
Custom Lists
High, Medium, Low
Large, Medium, Small
North, South, East, West
Senior Sales Manager, Regional Sales Manager, Department Sales Manager, Sales Representative
A custom list can only contain text or text mixed with numbers. For a custom list that
contains numbers only, such as 0 through 100, you must first create a list of numbers that
is formatted as text.
Page 71 of 120
Ms Joanne Zarb
There are two ways to create a custom list. If your custom list is short, you can type the
values directly in the dialog box. If your custom list is long, you can import it from a range
of cells.
Page 72 of 120
Ms Joanne Zarb
6. Type the entries in the List entries box, beginning with the first entry.
7. Press ENTER after each entry.
8. When the list is complete, click Add. The items in the list that you selected are
added to the Custom lists box.
9. Click OK twice.
Note that:
You can only create a custom list based on a value (text, number, and date or time).
You cannot create a custom list based on a format (cell colour, font colour, and icon).
Page 73 of 120
Ms Joanne Zarb
MS Excel provides a very simple mechanism (AutoFilter) for selecting data subsets.
AutoFilters can be set up to choose specific values or a range of values. Several filters can
be used, each acting further on the current data subset.
Page 74 of 120
Ms Joanne Zarb
7. Click OK button.
Note that:
The filter field will show a filter icon.
If you need to find text values that share some characters but not others, use a
wildcard character.
The following wildcard characters can be used as comparison criteria for filters, and
when searching and replacing content.
Page 75 of 120
Ms Joanne Zarb
Use To find
? (question mark) Any single character
For example, sm?th finds "smith" and "smyth"
* (asterisk) Any number of characters
For example, *east finds "Northeast" and "Southeast"
~ (tilde) followed by ?, *, or ~ A question mark, asterisk, or tilde
For example, fy91~?
Page 76 of 120
Ms Joanne Zarb
The Advanced Filter feature in MS Excel enables you to filter a list using more complex
criteria than those possible with AutoFilter. Your list can be filtered in place as before or you
can arrange for a copy of the filtered rows to be placed in another area of the worksheet.
The Advanced Filter command does not display drop-down lists for the columns (as for
AutoFilters). Instead, you type criteria in a criteria range on your worksheet. The criteria
range must consist of at least two rows –column headings in the first row and filtering
criteria in the second and subsequent rows.
Page 77 of 120
Ms Joanne Zarb
7. In the Criteria range: field, enter the reference for the criteria range, including the
criteria labels.
8. To move the Advanced Filter dialog box out of the way temporarily while you select
the criteria range, click Collapse Dialog button.
9. To change how the data is filtered, change the values in the criteria range and filter
the data again.
10. Click OK button.
Note that:
You can name a range Criteria, and the reference for the range will appear
automatically in the Criteria range box. You can also define the name Database for
the range of data to be filtered and define the name Extract for the area where
you want to paste the rows, and these ranges
will appear automatically in the List
range: and Copy to: fields, respectively.
When you copy filtered rows to another location, you can specify which columns to
include in the copy. Before filtering, copy the column labels for the columns you
want to the first row of the area where you plan to paste the filtered rows. When
you filter, enter a reference to the copied column labels in the Copy to box. The
copied rows will then include only the columns for which you copied the labels.
Criteria Examples
Because the equal sign is used to indicate a formula when you type text or a value
in a cell, MS Excel evaluates what you type; however, this may cause unexpected
filter results. To indicate an equality comparison operator for either text or a value,
type the criteria as a string expression in the appropriate cell in the criteria range:
=''=entry''
where entry is the text or value you want to find. For example:
What you type in the cell What Excel evaluates and displays
=‖=Borg‖ =Borg
=‖=5,122‖ =5,122
Page 78 of 120
Ms Joanne Zarb
When filtering text data, MS Excel does not distinguish between uppercase and
lowercase
characters. However, you can use a formula to perform a case-sensitive
search.
Page 79 of 120
Ms Joanne Zarb
MS Excel can automatically calculate subtotal and grand total values in a list. When you
insert automatic subtotals, MS Excel outlines the list so that you can display and hide the
detail rows for each subtotal.
Consider the above example. The sheet shows the names of the property negotiators, the
date when the property was sold, the names of property buyers, the location of the
property, and the selling price. Using the subtotal feature, the total sales and the number of
properties sold per negotiator were calculated. A grand total and a grand count were
calculated and displayed at the bottom of the list.
Page 80 of 120
Ms Joanne Zarb
Page 81 of 120
Ms Joanne Zarb
5. The At each change in: box lists all the fields in the list. Click the column to subtotal
e.g. click Negotiator.
6. The Use function: box lists 11 summary functions. Click the summary function (e.g.
Sum, Count etc.) you want to use to calculate the subtotals.
7. In the Add subtotal to: box, select the check box for each column that contains
values you want to subtotal. E.g. select the Sale column.
8. If you want to remove any existing subtotals and replace these with new subtotals
click Replace current subtotals.
9. If you want to insert a manual page break after each subtotal click Page break
between groups.
10. If you want to place the subtotals below the data (the default) click Summary
below data.
11. Click OK button.
Note that:
You can use the Subtotals command again to add more subtotals with different
summary functions. To avoid overwriting the existing subtotals, clear the Replace
current subtotals check box.
To display a summary of just the subtotals and grandtotals, click the outline symbols
next to the row numbers. Use the and symbols to display or hide the detail
rows for individual subtotals.
To remove subtotals:
1. Click a cell in the table that contains subtotals.
2. Click the Data tab.
3. In the Outline group, click Subtotal. The Subtotal dialog box is displayed.
4. Click Remove All button.
The Scenario Manager feature in MS Excel enables you to analyze your data to see how
changing one or more values in the worksheet affects the other cells in the worksheet. This
feature comes in handy for figuring out what would happen if certain factors in your
business changed.
Page 82 of 120
Ms Joanne Zarb
The scenario manager can be used to determine the amounts in the Projected Sales column
when the values in the % Increase column change.
To create a scenario:
1. Click the Data tab.
2. In the Data Tools group, click What-If Analysis.
3. Click Scenario Manager... The Scenario Manager dialog
box is displayed.
5. In the Scenario name box, type a name for the scenario e.g. low growth.
6. In the Changing cells: field, enter the references for the cells that you want to
change. You can do this by highlighting the range of cells that will change e.g.
$c$4:$c$7
Page 83 of 120
Ms Joanne Zarb
It is suggested that you do not change these values for the first scenario. That way
you will preserve the original values for the changing cells.
When you display a scenario, you change the values of the cells saved as part of that
scenario. To view a scenario:
Page 84 of 120
Ms Joanne Zarb
4. Click the name of the scenario you want to display e.g. medium growth.
5. Click Show button.
To edit a scenario:
1. Repeat steps 1-3 as above.
2. Click the name of the scenario you want to edit e.g. medium growth.
3. Click Edit… button. The Edit Scenario dialog box is displayed.
4. In the Scenario name: field you can edit the name of the scenario.
5. Highlight another range of changing cells.
6. Click OK button. The Scenario Values dialog box is displayed.
7. Edit the values.
8. Click OK button.
9. Click Close button.
To delete a scenario:
1. Click the Data tab.
2. In the Data Tools group, click What-If Analysis.
3. Click Scenario Manager... The Scenario Manager dialog box is displayed.
4. Click Delete button for each scenario.
5. Click Close button.
If you need to view all results of the different scenarios on one sheet you will create a
scenario summary report.
Page 85 of 120
Ms Joanne Zarb
Activity 10
You will use Exercises.
2. In the marks worksheet, simultaneously sort the cell range A2:E6 firstly by
Surname (in ascending order), then by Name (in ascending order) and then by
ID Card (in ascending order).
3. Create a custom list Low, Medium, High.
4. Edit the custom list Low, Medium, High to include Higher.
5. Delete the custom list created in steps 3 and 4.
6. In the sales worksheet, perform a custom sort on the cell range A1:B5 by Month
in calendar order (January, February, March etc.).
7. In the sales worksheet, perform a custom sort on the cell range A7:B11 by Day
in week order (Monday, Tuesday, Wednesday etc.)
Page 86 of 120
Ms Joanne Zarb
a. Use a feature to sub-total (by sum) the Amount column for each employee in the
cell range A2:D56. The sub-total result should be displayed in the Amount
column. Remove the sub-totals.
b. Use a feature to sub-total (by sum) the Amount column for each category in the
cell range A2:D56. The sub-total result should be displayed in the Amount
column.
12. In the property worksheet:
a. Use a feature to sub-total (by sum) the Sale column for each property Negotiator
in the cell range A2:E12. The sub-total result should be displayed in the Sale
column.
b. Without losing the Sale sub-totals also show a Count of the number of sales made
by each property Negotiator. The sub-total result should be displayed in the Sale
column.
13. In the projections worksheet, create three named scenarios as follows:
Scenario Name Changing Cells Cells Cell Values
Low growth C4:C7 C4 0.05
C5 0.25
C6 0.1
C7 0.05
Medium growth C4:C7 C4 0.1
C5 0.5
C6 0.15
C7 0.5
High growth C4:C7 C4 0.15
C5 0.35
C6 0.2
C7 0.1
Data validation is an MS Excel feature that you can use to define restrictions on what data
can or should be entered in a cell. You can configure data validation to prevent users from
entering data that is not valid. If you prefer, you can allow users to enter invalid data but
warn them when they try to type it in the cell. You can also provide messages to define
what input you expect for the cell, and instructions to help users correct any errors.
For example, in a marketing workbook, you can set up a cell to allow only account numbers
that are exactly three characters long. When users select the cell, you can show them a
message such as this one:
If users ignore this message and type invalid data in the cell, such as a two-digit or five-
digit number, you can show them an actual error message.
If your allowed values are based on a cell range with a defined name, and there is a
blank cell anywhere in the range, setting the Ignore blank check box allows any
values to be entered in the validated cell. This is also true for any cells that are
referenced by validation formulas: if any referenced cell is blank, setting the Ignore
blank check box allows any values to be entered in the validated cell.
Page 88 of 120
Ms Joanne Zarb
9. Click OK button.
4. Make sure that the In-cell dropdown check box is selected. Otherwise, you won't
Page 89 of 120
Ms Joanne Zarb
be able to see the drop-down arrow next to the cell.
5. To specify how you want to handle blank (null) values, select or clear the Ignore
blank check box.
6. Click OK button.
Note that:
The width of the drop-down list is determined by the width of the cell that has the
data validation. You might need to adjust the width of that cell to prevent
truncating
the width of valid entries that are wider than the width of the drop-down
list.
To restrict data entry to a date within a time frame or to a time within a time frame:
1. Select one or more cells to validate.
2. Click the Data tab.
3. In the Data Tools group, click Data Validation. The Data Validation dialog box is
displayed.
4. In the Data Validation dialog box, click the Settings tab.
5. In the Allow: box, select Date or Time.
6. In the Data: box, select the type of restriction that you want. For example, to allow
dates after a certain day, select greater than.
7. Enter the start, end, or specific date/time to allow.
8. To specify how you want to handle blank (null) values, select or clear the Ignore
blank check box.
9. Click OK button.
After setting validation criteria on a cell, you can set an input message that will be displayed
when the cell is clicked:
1. In the Data Validation dialog box, click the Input Message tab.
2. Make sure the Show input message when cell is selected check box is selected.
Page 90 of 120
Ms Joanne Zarb
You can specify how you want MS Excel to respond when invalid data is entered:
1. In the Data Validation dialog box, click the Error Alert tab.
2. Make sure that the Show error alert after invalid data is entered check box is
selected.
3. Select one of the following options for the Style box:
4. To display an information message that does not prevent entry of invalid
data, select Information.
5. To display a warning message that does not prevent entry of invalid data, select
Warning.
6. To prevent entry of invalid data, select Stop.
7. Fill in the title and text for the message (up to 225 characters).
8. Click OK button.
Page 91 of 120
Ms Joanne Zarb
Sometimes, checking formulas for accuracy or finding the source of an error can be
difficult when the formula uses precedent or dependent cells:
Precedent cells are cells that are referred to by a formula in another
cell. For example, if cell
D10 contains the formula =B5, cell B5 is a precedent to cell D10.
Dependent cells contain formulas that refer to other
cells. For example, if cell D10 contains the
formula =B5, cell D10 is a dependent of cell B5.
To assist you in checking your formulas, you can use the Trace Precedents and Trace
Dependents commands to graphically display, or trace the relationships between these cells
and formulas with tracer arrows.
Blue arrows show cells with no errors. Red arrows show cells that cause
errors. If the selected cell is referenced by a cell on another worksheet or
workbook, a black arrow points from the selected cell to a worksheet icon.
The other workbook must be open before MS Excel can trace these
dependencies.
c. To identify the next level of cells that provide data to the active cell, click
Trace Precedents again.
d. To remove tracer arrows one level at a time, starting with the precedent cell
farthest away from the active cell, on the Formulas tab, in the Formula
Auditing group, click the arrow next to Remove Arrows, and then click
Remove Precedent Arrows. To remove another level of tracer arrows, click
the button again.
a. Select the cell for which you want to identify the dependent cells.
b. To display a tracer arrow to each cell that is dependent on the active cell,
on the Formulas tab, in the Formula Auditing group, click Trace
Dependents.
Page 92 of 120
Ms Joanne Zarb
c. To identify the next level of cells that depend on the active cell, click
Trace Dependents again.
d. To remove tracer arrows one level at a time, starting with the dependent cell
farthest away from the active cell, on the Formulas tab, in the Formula
Auditing group, click the arrow next to Remove Arrows, and then click
Remove Dependent Arrows. To remove another level of tracer arrows, click
the button again.
7. To remove all tracer arrows on the worksheet, on the Formulas tab, in the
Formula Auditing group, click Remove Arrows.
You may be auditing formulas and you need to see all the formulas on the worksheet.
To switch between displaying formulas and their values on a worksheet:
Note that:
Cells having a comment will display a red indicator at the top right edge of the cell.
To edit a comment:
Page 93 of 120
Ms Joanne Zarb
1. Click the cell containing the comment.
2. Click the Review tab.
3. In the Comments group, click Edit Comment.
4. In the comment box, edit the comment text as necessary.
5. When you finish editing the text, click outside the comment box.
Note that:
Alternatively right-click the cell containing the comment and click Edit Comment.
To delete a comment:
1. Repeat steps 1-2 as above.
2. In the Comments group, click Delete Comment.
Note that:
Alternatively right-click the cell containing the comment and click Delete Comment.
Activity 11
You will use Exercises.
Page 94 of 120
Ms Joanne Zarb
Page 95 of 120
Ms Joanne Zarb
ENHANCING PRODUCTIVITY
For example, the range of cells B12:B7 has been selected in the
diagram shown here.
5. To specify the scope of the name, in the Scope: drop-down list box, select
Workbook or the name of a worksheet in the workbook.
6. Optionally, in the Comment: box, enter a descriptive comment up to 255 characters.
7. Click OK button.
Note that:
Name Box
The Name box will display the name sales.
Page 96 of 120
Ms Joanne Zarb
Note that:
Deleting a range name does not delete any cell data.
The Paste Special feature has several options that can help you whilst editing your
worksheet. For example you can copy the value in a cell without copying the underlying
formatting or its underlying formula.
Option To do
Paste
All Pastes all cell contents and formatting of the copied data.
Formulas Pastes only the formulas of the copied data as entered in the
formula bar.
Values Pastes only the values of the copied data as displayed in the
cells.
Formats Pastes only cell formatting of the copied data.
Comments Pastes only comments attached to the copied cell.
Validation Pastes data validation rules for the copied cells to the paste
area.
All using Source theme Pastes all cell contents in the document theme formatting
that is applied to the copied data.
All except cell borders Pastes all cell contents and formatting applied to the copied
cell except borders.
Column widths Pastes the width of one column or range of columns to
another column or range of columns.
Formulas & number formats Pastes only formulas and all number formatting options from
the selected cells.
Values & number formats Pastes only values and all number formatting options from
the selected cells.
Operation Specifies which mathematical operation, if any, you want to
apply to the copied data.
None Specifies that no mathematical operation will be applied to
the copied data.
Add Specifies that the copied data will be added to the data in the
destination cell or range of cells.
Subtract Specifies that the copied data will be subtracted from the
data in the destination cell or range of cells.
Multiply Specifies that the copied data will be multiplied with the data
in the destination cell or range of cells.
Divide Specifies that the copied data will be divided by the data in
the destination cell or range of cells.
Page 98 of 120
Ms Joanne Zarb
Option To do
Skip Blanks Avoids replacing values in your paste area when blank cells
occur in the copy area.
Transpose Changes columns of copied data to rows, and vice versa.
Paste Link Links the pasted data to the active worksheet.
A template is a workbook that you create and use as the basis for other similar workbooks.
You can also create templates for worksheets.
MS Excel has several pre-defined templates that you can use. You can also download
templates from the Microsoft Office website. To use the pre-defined templates available in
MS Excel:
Modifying a Template
To edit a template:
1. Open the template and apply the necessary edits.
2. Click Save button. The Save As dialog box is displayed.
3. Browse to the location (drive/folder) where the template will be saved.
4. In the File name: field type a name for the template.
5. In the Save as type: drop down field, click Excel Template.
6. Click Save button.
Note that:
Any changes that you make to the template file will only affect new workbooks that
Page 99 of 120
Ms Joanne Zarb
are created using the template.Any workbooks that were previously based on the
template will remain unaffected.
MS Excel creates a hyperlink for you when you press ENTER or the SPACEBAR after you
type the address of an existing Web page, such as www.um.edu.mt.
To create a hyperlink:
1. Select the text or picture that you want to display as the hyperlink.
2. Click the Insert tab.
3. In the Links group, click Hyperlink button. You can also right-click the
text or picture and then click Hyperlink on the shortcut menu.
4. Do one of the following:
To link to an existing file or Web page, click Existing File or Web Page under Link
to:, and then type the address that you want to link to in the Address: field. If you
do not know the address for a file, click the arrow in the Look in: list, and then
navigate to the file that you want.
To link to a file that you haven't created yet, click Create New Document under
Link to:, type the name of the new file in the Name of new document box, and
then, under When to edit, click Edit the new document later or Edit the new
document now.
5. Click OK button.
Note that:
To customize the ScreenTip that appears when you rest the pointer over the hyperlink,
click ScreenTip… button and then type the text that you want. If you do not specify a
tip, MS Excel uses the path or address of the file as the tip.
To edit a hyperlink:
1. Right-click the text or picture that has the hyperlink to edit.
2. Click Edit Hyperlink on the shortcut menu. The Insert Hyperlink dialog box is
displayed.
3. Edit the hyperlink in the Address: field.
4. Click OK button.
To remove a hyperlink:
1. Right-click the text or picture that has the hyperlink to edit.
2. Click Remove Hyperlink on the shortcut menu. The Insert Hyperlink dialog box is
displayed.
3. Click Remove Link button.
Linking Data
You can link data within a spreadsheet, between spreadsheets and between applications.
1. Open both the workbook that will contain the link (called
the destination workbook), and the workbook that contains
the data you want to link to (called the source workbook).
You can link data into word processing documents or presentations. A linked object is an
object created in a source file and inserted into a destination file, while maintaining a
connection between the two files. The linked object in the destination file can be updated
when the source file is updated. For example, you can link a range of cells in MS Excel file
(the source file) and insert this in a MS Word file (the destination file). When you update
data in MS Excel file, the updates are reflected in the MS Word file.
When an object is linked, information is updated only if you modify the source file. Linked
data is stored in the source file. The destination file stores only the location of the source
file and displays a representation of the linked data. Use linked objects if file size is a
consideration.
Note that:
The document will display the data as last updated in the source file.
To break a link:
1. Right-click the linked data in MS Word to break its link.
2. Highlight Linked Worksheet Object.
3. Click Links… The Links dialog box is displayed.
Typically a delimited text file contains fields of text separated by TAB characters or commas.
You can import data from a text file into an existing worksheet as an external data range.
1. Click the cell where you want to put the data from the text file.
2. Click the Data tab.
3. In the Get External Data group, click From Text. The Import Text
File dialog box is displayed.
4. In the Address bar, locate and double-click the text file that you
want to import. This will start the Text Import Wizard.
5. In the Text Import Wizard – Step 1 of 3 dialog box, tick Delimited. Click Next
button.
6. In the Text Import Wizard – Step 2 of 3 dialog box, tick the appropriate
delimiter e.g. Tab check box. Click Next button.
7. In the Text Import Wizard – Step 3 of 3 dialog box, select each column and set the
appropriate data format. Click Finish button.
8. In the Import Data dialog box, click Properties to set formatting and layout
options for the imported data.
If you perform a task repeatedly in MS Excel, you can automate the task using a macro. A
macro is a series of MS Excel commands and instructions that you group together as a
single command to accomplish a task automatically. Instead of manually performing a
series of time-consuming, repetitive actions in MS Excel, you can create and run a single
macro – a custom command – that accomplishes the task for you. You usually use macros:
To speed up routine editing and formatting.
To combine multiple commands.
To make an option in a dialog box more accessible.
To automate a complex series of tasks.
There are many tasks that can be automated using a macro. For example, you can change
page setup, apply a custom number format, apply autoformats to a cell range, insert fields
in a worksheet header and/or footer.
When you are recording a macro, you can use the mouse to click commands and options.
Any mouse movements in a document window are not recorded. For example, you cannot
use the mouse to move the insertion point or to select, copy, or move items by clicking or
dragging. You must use the keyboard to record these actions.
To work with macros in MS Excel 2007, you need to show the Developer tab which is not
displayed by default.
To record a macro:
1. Click the Developer tab.
2. In the Code group, click Record Macro button. The Record
Macro dialog box is displayed.
Running a Macro
To run a macro:
1. Click the Developer tab.
2. In the Code group, click Macros button. The Macros dialog box is
displayed.
3. In the list under Macro name:, click the macro that you want to run.
4. Click Run button.
To delete a macro:
1. Repeat steps 1-2 as above.
2. In the list under Macro name:, click the macro that you want to delete.
3. Click Delete button.
Activity 12
You will use Exercises.
i. In cell D8 use a sum function that includes the range name to add the values in
cell range D2:D7.
j. Use the paste special option to replace the answers in cell range B8 D8 with
values i.e. when you click on any cell in the cell range B8:D8 no formulas are
displayed in the formula bar.
k. Copy the cell range B1:D1. Use the Transpose option to copy these cells to
cell range A12:A14.
3. Open a new workbook based on the template Sales Invoice located in
Exercises folder:
a. Delete the content of cells A1 and A2.
b. Type your name and address in cell range A4:A6.
c. Format the cell range C18:C35 such that numbers are displayed with the €
currency style.
d. Save the template using the same name Sales Invoice in Exercises folder.
e. Open a new workbook based on the modified Sales Invoice template.
f. Type the following:
COLLABORATIVE EDITING
You can use change tracking to log details about workbook changes every time that you
save a workbook. This change history can help you identify any changes that were made to
the data in the workbook, and you can then accept or reject those changes. Change
tracking is especially useful when several users edit a workbook. It is also useful when you
submit a workbook to reviewers for comments, and then want to merge the input that you
receive into one copy of that workbook, incorporating the changes and comments that you
want to keep.
Change tracking is available only in shared workbooks. In fact, when you turn on change
tracking, the workbook automatically becomes a shared workbook. Although a shared
workbook is typically stored in a location where other users can access it, you can also track
changes in a local copy of a shared workbook.
When changes are made in the shared workbook, you can view the change history directly
on the worksheet or on a separate history worksheet. Either way, you can instantly review
the details of each change. For example, you can see who made the change, what type of
change was made, when it was made, what cells were affected, and what data was added or
deleted.
When you highlight changes as you work, MS Excel marks any revisions (such as changes,
insertions, and deletions) with a highlighting colour.
5. Under Highlight which changes, select the When: check box and then, in the When
list, click the option that you want.
6. To specify for which users you want to highlight changes, select the Who: check
box and then, in the Who list, click the option that you want.
7. To specify the worksheet area where you want changes to be highlighted, select the
Where: check box and then, in the Where box, type the cell reference of the
worksheet range.
You can also click the Collapse Dialog button at the right end of the Where
box, and then select the range that you want to use on the worksheet. When you
finish, click the Collapse Dialog button again to display the entire dialog box.
8. Make sure that the Highlight changes on screen check box is selected.
9. Click OK button. If prompted, save the workbook.
10. On the worksheet, make the changes that you want.
Note that:
Some changes, such as formatting, are not tracked and therefore are not marked with a
highlighting colour.
When you no longer want to highlight changes, you can turn change highlighting off:
1. Click the Review tab.
2. In the Changes group, click Track Changes.
3. Click Highlight Changes. The Highlight Changes dialog box is displayed.
4. Clear the Track changes while editing check box.
5. Click OK button.
To accept or reject changes that are made after a particular date, select the When
check box, click Since date in the When list, and then type the earliest date for
which you want to review the changes.
To accept or reject changes that are made by another user, select the Who check
box and then, in the Who list, click the user whose changes you want to review.
To accept or reject changes that are made to a specific area, select the Where
check box, and then type the cell reference of the worksheet range.
To accept or reject changes to the entire workbook, clear the Where check box.
Note that:
You must accept or reject a change before you can advance to the next change.
When a shared workbook is updated by other users, and you want to compare the changes
that they have made before you update the workbook with those changes, you can use the
Compare and Merge Workbooks command. This command is not available with other shared
workbook commands on the Review tab in the Changes group, but you can add it to the
Quick Access Toolbar.
To use the Compare and Merge Workbooks command, all shared workbook users must save
a copy of the shared workbook that contains their changes and use a unique file name that
differs from the original workbook. All copies of a shared workbook should be located in the
same folder as the shared workbook.
If needed, do the following to add the Compare and Merge Workbooks command to the
Quick Access Toolbar:
1. Click the Microsoft Office Button.
2. Click Excel Options.
3. In the Customize category, in the Choose commands from list, click All
Commands.
4. In the list, click Compare and Merge Workbooks.
5. Click Add button.
6. Click OK button.
Note that:
To merge the workbook with multiple copies of the shared workbook
at the same time, hold down
CTRL or SHIFT and click their file names, and then click OK.
3. In the Password to open or Password to modify box, or both boxes, double-click the
asterisks.
4. Press DELETE key.
5. Click OK button.
6. Click Save button.
7. Click Yes button to replace the existing workbook.
Protecting a worksheet will prevent users from modifying the contents of the worksheet.
When you protect a worksheet, you can protect or unprotect individual elements of the
sheet from being modified by users.
To protect a worksheet:
1. Switch to the worksheet you want to protect.
2. Click the Review tab.
3. In the Changes group, click Protect Sheet. The Protect Sheet dialog box
is displayed.
4. Tick the option Protect worksheet and contents of locked cells. When selected,
prevents users from:
Making changes to cells that you did not unlock before protecting the worksheet,
unless you've granted a specific user
permission to edit to the cells in the Allow
Users to Edit Ranges dialog box.
Viewing rows or columns that you hid before you protected the worksheet.
Viewing the
formulas for the cells for which you hid the formulas before you protected the
worksheet.
Note that:
A warning message is displayed if you try and edit a cell within a worksheet. Click OK
button to close the warning message. However,
MS Excel has features so that users are
allowed to edit parts of the worksheet.
Option To do…
Select locked cells When cleared, prevents users from moving the pointer to cells for which
the Locked check box is selected on the Protection tab of the Format
Cells dialog box.
Select unlocked cells When cleared, prevents users from moving the pointer to cells for which
the Locked check box is cleared on the Protection tab of the Format
Cells dialog box. When users are allowed to select unlocked cells, they can
press the TAB key to move between the unlocked cells on a protected
worksheet.
Option To do…
Format cells When cleared, prevents users from changing any of the options in the
Format Cells or Conditional Formatting dialog boxes. If you applied
conditional formats before you protected the worksheet, the formatting
continues to change when a user enters a value that satisfies a different
condition.
Format columns When cleared, prevents users from using any of the commands on the
Column submenu of the Format menu, including changing column width
or hiding columns.
Format rows When cleared, prevents users from using any of the commands on the Row
submenu of the Format menu, including changing row height or hiding
rows.
Insert columns When cleared, prevents users from inserting columns.
Insert rows When cleared, prevents users from inserting rows.
Insert hyperlinks When cleared, prevents users from inserting new hyperlinks, even in
unlocked cells.
Delete columns When cleared, prevents users from deleting columns. Note that if Delete
columns is protected and Insert columns is not also protected, a user
can insert columns that he or she cannot delete.
Delete rows When cleared, prevents users from deleting rows. Note that if delete rows
is protected and insert rows is not also protected, a user can insert rows
that he or she cannot delete.
Sort When cleared, prevents users from using any of the Sort commands on the
Data menu, or the Sort buttons on the Standard toolbar. Users can't sort
ranges containing locked cells on a protected worksheet, regardless of this
setting.
Use AutoFilter When cleared, prevents users from using the drop-down arrows to change
the filter on an AutoFiltered range. Users cannot create or remove
AutoFiltered ranges on a protected worksheet, regardless of this setting.
Use PivotTable When cleared, prevents users from formatting, changing the layout,
reports refreshing, or otherwise modifying PivotTable reports, or creating new
reports.
Edit objects When cleared, prevents users from:
Making changes to graphic objects - including maps, embedded
charts, shapes, text boxes, and controls - that you did not unlock
before you protected the worksheet. For example, if a worksheet
has a button that runs a macro, you can click the button to run the
macro, but you cannot delete the button.
Making any changes, such as formatting, to an embedded chart.
The chart continues to update when you change its source data.
Adding or editing comments.
Edit scenarios When cleared, prevents users from viewing scenarios that you have hidden,
making changes to scenarios that you have prevented changes to, and
deleting these scenarios. Users can edit the values in the changing cells, if
the cells are not protected, and add new scenarios.
To unprotect a worksheet:
1. Click the Review tab.
2. In the Changes group, click Unprotect Sheet. The Unprotect Sheet
dialog box is displayed.
3. Type the password used to protect the sheet.
4. Click OK button.
By default, cells are locked, but locking means nothing unless you enforce it. Applying
protection does just that. If there are cells you‘re willing to let other users manipulate, you
must unlock them before protecting your worksheet.
6. To unlock the cell/s, click the Locked check box to deselect the option.
7. Click OK button.
To lock/protect cells:
1. Repeat steps 1 through 5 as above.
2. To lock the cell/s, click the Locked check box to select the option.
3. Click OK button.
Note that:
To enforce
this protection, you need to protect the worksheet as indicated at the beginning of this
section.
For security or privacy reasons, you may want to hide a formula from users of your
worksheet.
10. Make sure that the Protect worksheet and contents of locked cells check box is
selected.
Note that:
When you prevent a formula from displaying in the formula bar prevents editing
of the cell containing the formula.
Activity 13