0016 Microsoft Excel 2007 Advanced
0016 Microsoft Excel 2007 Advanced
Microsoft
Excel 2007
Advanced
Pre m ie r Tra ining Lim ite d
4 Ra ve y Stre e t
Lo ndo n
EC 2A 4Q P
Te le pho ne +44 (0)20 7729 1811
www.pre m c s.c o m
Advanced Excel 2007
TABLE OF CONTENTS
INTRODUCTION ........................................................................................ 1
INDEX....................................................................................................... 89
Advanced Excel 2007
INTRODUCTION
This manual is designed to provide information required when
using Excel 2007. This documentation acts as a reference
guide to the course and does not replace the documentation
provided with the software.
MODULE 1
REVIEW OF INTERMEDIATE
COURSE
Revision Exercise
1. Create the exercise on the following page, using the
calculations given.
2. The factors that might change are located in separate cell
for easy “what-if” analysis. The formulae are given below:
MODULE 2
NAMING RANGES
There are a variety of uses for names in a workbook. A name
can be applied to any cell or range. Names are also useful
for the following:
Name Box
1. In the New Name dialog box, in the Name box, type the
name that you want to use for your reference. Names can
be up to 255 characters in length.
2. 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.
3. Click on OK.
Create Names Based On Row/Column Titles
1. Select the range you want to name, including the row or
column titles you want to use for the names.
2. Click on the Formulas tab, in the Named Cells group,
click Create from Selection.
4. Click on OK.
3. Click on OK.
3. Choose Paste.
5. Alternatively press F3 or
Notes – Module 2
Notes – Module 2
Notes – Module 2
Notes – Module 2
MODULE 3
FUNCTIONS
Functions are built-in formulas that perform complex
mathematical, financial, statistical or analytical calculations.
Excel provides more than 200 built-in functions, or predefined
formulas.
=SUM(B1:B9)
IF STATEMENTS
IF FUNCTION
=IF(logical_test,value_if_true,value_if_false)
An example is in cell A3 if the value is equal to 10 insert 1, if
not insert 0.
A B C
1
2
3 10 1
=IF(A3=10,1,0)
If the true or false condition is to be text and not a value, the
text has to be enclosed in double quotes.
=IF(A3=10,“Yes”, “No”)
NESTING =IF()’s
You may want to use an =IF() function again as part of the
TRUE or
FALSE
If Average Score is Then return part of
the
Greater than 89 A formula.
From 80 to 89 B
You can
From 70 to 79 C use the
following
From 60 to 69 D
nested
Less than 60 F =IF()
Note: Remember to close the
function:
same number or brackets at
the end of the function as
functions, there are four =IF()
=IF(AverageScore>89,"A",IF(AverageScore>7
to four brackets at the end. 9,"B",IF(AverageScore>69,"C",IF(AverageSco
There can only be a maximum re>59,"D","F"))))
of 7 nested =IF()’s in a single
function.
=AND(logical1, logical2)
This logical function compares whether two cell match the
condition required, if the cells meet the condition TRUE is
inserted into the cell if not then FALSE is used.
=AND(A3=20,A4=30)
=OR(logical1, logical2)
This logical function compares whether one of two cells
meets the condition required. If the cells meet the condition
TRUE is inserted into the cell if not then FALSE is used.
=OR(A3=20,A4=30)
TEXT FUNCTIONS
=TEXT(Value,Format_Text)
This function converts a number to a formatted text entry.
=VALUE(text)
Note: You do not generally
need to use the VALUE This function converts a text string that represents a number
function in a formula because to a number.
Excel 2003 automatically
converts text to numbers as
necessary. This function is
provided for compatibility with Text can be text enclosed in quotation marks or a cell
other spreadsheet programs. reference.
=LEFT(text,num_char)
This function returns the first leftmost characters in a string.
=RIGHT(text,num_char)
This function returns the first characters in a string from the
right.
=RIGHT(A2,6)
LEN(text)
This functions counts the number of characters in a string,
this includes spaces and pronunciation.
=LEN(A2)
=CONCATENATE(text1,text2…)
This function allows you to join different text cells together to
produce a single string of text.
=CONCATENATE(A2, “ ”, B2)
Alternatively you can use the ampersand (&) to join text cells
together.
=A2&“ ”&B2
=TODAY()
This function will return the current date, it does not require
any arguments and will update automatically.
=NOW()
This function will return the current date and time, it does not
require any arguments and will update automatically.
=MONTH(serial_number)
This function returns the number of the month (from 1 – 12)
corresponding to a serial number.
=MONTH(A3)
LOOK UP FUNCTIONS
=VLOOKUP(lookup_value,table_array,col_indx,ra
nge_lookup)
=LOOKUP(G3,A3:D11,4)
=HLOOKUP((lookup_value,table_array,row_indx,
range_lookup)
Looks for a value in the top row of a table and returns the
value in the same column for the row you specify.
=HLOOKUP(B3,A8:E12,3)
FINANCIAL FUNCTIONS
=PMT(rate,nper,pv,fv,type)
This function calculates the payments on a loan (principle) at
a given interest rate for a specified number of payment
periods (term). It is normally used to calculate the monthly
repayments of a mortgage that is based on a constant
interest rate.
=PMT(B4/12,B5*12,B3)
=PPMT(rate,per,nper,pv,fv,type)
This function returns the principle for an investment based
upon periodic, constant payments and a constant interest
rate.
=IPMT(rate,per,nper,pv,fv,type)
This function returns the interest paid for an investment based
upon periodic, constant payments and constant interest rate.
=PPMT(B4/12,B6,B5*12,B3)
Cell B11 contains the following function
=IPMT(B4/12,B6,B5*12,B3)
=PV(rate,nper,pmt,fv,type)
This function calculates the present value of an investment
based on the total amount that a series of future payments is
worth now.
=NVP(rate,value1,value2)
This function calculates the net present value of an
investment by using a discount rate and a series of future
payments (negative values) and income (positive values).
=NPV(B12,B4:B10)
=FV(rate,nper,pmt,pv,type)
If you plan to save a regular amount at regular intervals, the
=FV function calculates how much you will have saved at a
specific point in the future, give a constant compounding rate.
For example, if you plan to deposit £2,000 each year for the
next 20 years into an account to save for retirement. The
account pays 7.5% interest, compounded annually, interest is
paid on the last day of each year. To calculate the value of
your account in 20 years.
=FV(B4,B5,B3)
MATHEMATICAL FUNCTIONS
=ROUND(number,num_digits)
This function rounds number to a specified number of decimal
places.
=ROUNDDOWN(number,num_digits)
This function rounds down numbers towards zero.
=ROUNDUP(number,num_digits)
This function rounds up numbers away from zero.
Function Result
=ROUND(333.1451,2) 333.15
=ROUND(333.1451,-2) 300
=ROUNDDOWN(333.1451,2) 333.14
=ROUNDUP(333.1451,1) 333.2
=ABS(number)
This function returns the absolute value of a number. A
number without a sign for example a negative value will
become positive.
Function Result
=ABS(-500) 500
=SUMIF(range,criteria,sum_range)
This function adds cells specified by a criteria.
=COUNTIF(range,criteria)
This function counts the number of cells specified by a
criteria.
=SUMIF(A4:A13, “Green”,B4:B13)
=COUNTIF(A4:A13, “Harry”)
INFORMATION FUNCTIONS
=ISBLANK(value)
This function returns TRUE or FALSE if the cell it is
referenced to is blank.
=ISBLANK(A10)
=ISNA(value)
This function return TRUE or FALSE if the cell it is referenced
to returns the #N/A error message.
=ISNA(A10)
=ISERROR(value)
This function return TRUE or FALSE if the cell it is referenced
to returns one of the following error messages.
=ISERROR(A10)
=ISERR(value)
This function return TRUE or FALSE if the cell it is referenced
to returns one of the following error messages.
=ISERR(A10)
Used with the =IF() function the =IS() functions can highlight
to users errors in the worksheet
SUBTOTALS
CREATING SUBTOTALS
1. Sort the data according to the order in which you want to
create subtotals. For example to generate subtotals for
each region, sort the list in to regions.
Level 1, 2 and
3 buttons
Show detail
level button
Hide Detail
Level button
5. To display the detail for a level click on the plus (+) button.
REMOVING SUBTOTALS
1. Click on the Data Ribbon and select Subtotals.
2. Click on the “Remove All” button.
the list by the region column, and then sort by the store
column. When Excel inserts subtotals, the stores subtotal
values are nested within the subtotal values for the region.
2. Insert automatic subtotals for the first column for which
you want subtotals. This column should be the column you
specified in the “Sort by” box when the list was sorted. (In
the example, the region column would be the first column.)
3. After you have displayed automatic subtotals for the first
column, repeat the process for the next column.
4. Select a cell in the list.
5. Click on the Data Ribbon and select Subtotals.
6. In the “At each change in” box, select the next column you
want to subtotal.
7. Clear the “Replace current subtotals” check box, and then
click on OK.
Note: Subtotal summaries can 8. Repeat steps 4 through 7 for each column for which you
be used to create charts.
want to calculate subtotals.
EXERCISE - MODULE 3
Notes – Module 3
Notes – Module 3
Notes – Module 3
Notes – Module 3
MODULE 4
TEMPLATES
To create new workbooks that already have your customised
formatting, you can base the new workbooks on a template.
A template is a workbook that contains specific content and
formatting so that you can use it as a basis for other similar
workbooks. A template can include standardised text such as
page headers and row and column labels, number formatting,
Visual Basic macros, and custom toolbars.
CREATING
1. Open the workbook that you want to use as a template.
USING A TEMPLATE
EDITING A TEMPLATE
1. Open the template.
2. Make any amendments and click on Save.
NOTES – MODULE 4
Notes – Module 4
MODULE 5 -
AUDITING A WORKBOOK
Auditing can help to trace errors, locate cells that refer to the
current cell and attach comment notes to cells. Auditing can
be used to troubleshoot errors as well as prevent errors by
reviewing and commenting on your work.
Error Checking
Trace Precedents
Trace Dependents
Evaluate Formula
WATCH WINDOW
These can help you find common errors and correct them.
Click the down triangle to see the actions you can take.
NOTES – MODULE 5
Notes – Module 5
MODULE 6
DATA VALIDATION
Notes – Module 6
Notes – Module 6
Notes – Module 6
Notes – Module 6
MODULE 7
MACROS
OVERVIEW OF MACROS/VBA
Note: If cells are selected
Macros are stored commands and functions that perform
while recording a macro, the
repeated tasks in Excel. A macro is stored in a Visual basic
macro will select the same
cells regardless of which cell is
module that can be run whenever you need to perform a
first selected because it specific task.
records absolute cell
references. If you want a Macros can be recorded or written using the programming
macro to select cells language Visual Basic for applications. This manual covers
regardless of the position of recording macros and editing them using the Visual basic
the active cell when you run Editor. Premier Computer Solutions provide Visual Basic for
the macro, set the macro Application courses.
recorder to record relative cell
references. On the Stop Before recording or writing a macro, plan the steps and
Recording toolbar, click on the commands you want the macro to perform. If you make a
Relative Reference button. mistake when recording the macro, any corrections you make
will also be recorded. Each time you record a macro, the
Excel will
macro is stored in a new module attached to a workbook.
continue to record macros with
relative references until you With the Visual Basic Editor, you can edit macros, copy
quit Excel or until you select
macros from one module to another, copy macros between
Relative Reference again.
different workbooks, rename the modules that store the
macros, or rename the macros.
If you want a macro to select a
specific cell, perform an action,
To record a macro the Developer Ribbon needs to be added.
and then select another cell
relative to the active cell, you
Adding the Developer Ribbon
can mix the use of relative and
absolute references when you
record the macro. To record a 1. Click the Microsoft Office Button , and then click Excel
macro by using relative Options.
references, make sure that
2. In the Popular category, under Top options for working
Relative Reference button is
active. To record with absolute
with Excel, select the Show Developer tab in the Ribbon
references, make sure Relative
check box, and then click OK.
Reference button is not active.
RECORDING A MACRO
1. Click on the Developer Ribbon and select Record Macro
.
2. In the “Macro name” box type a name for the macro.
RUNNING MACROS
Copying Macros
If you have an existing macro that contains commands you
want to use in another macro, you can copy all or part of the
macro to another module. You can also make a copy of a
macro module to duplicate all macros stored in it.
Editing Macros
Before you edit a macro, you should be familiar with the
Visual Basic Editor. The Visual Basic Editor can be used to
write and edit macros attached to Excel workbooks.
1. Open the workbook that contains the macro you want to
edit.
2. Click onto Macros from the Developer Ribbon.
3. Select the macro to run.
4. Click on the “Edit” button.
5. Make the changes and then close the Visual Basic Editor
or return back to the worksheet.
Note: All text proceeded by an apostrophe in the Visual Basic
editor will appear “Green”. These are Comments, which can
be used to help explain the code.
EXERCISE – MODULE 7
1. Create a new macro called PRINT AREA, storing it in the
current workbook.
2. Record a macro that is going to set a print area on your
worksheet.
3. Add the macro to the Quick Access toolbar and also a
macro button on the worksheet.
NOTES – MODULE 7
Notes – Module 7
Notes – Module 7
Notes – Module 7
MODULE 8
EXCEL’S ANALYTICAL
TOOLS
GOAL SEEK
For the Goal Seeker to work the variable you want to adjust
must be a formula and the formula must refer to other cells in
the worksheet. The cell containing the formula is called the
Set Cell.
1. From the Data Tools group in the Data Ribbon click onto
the drop down arrow next to What-if Analysis.
2. Select Goal Seek.
8. Click on OK.
The result is that you will have to sell 29 books to achieve the
target of £200.
SCENARIOS
Creating A Scenario
Displaying A Scenario
1. From the Data Tools group in the Data Ribbon click onto
the drop down arrow next to What-if Analysis.
Editing Scenarios
1. From the Data Tools group in the Data Ribbon click onto
the drop down arrow next to What-if Analysis.
2. In the Scenario Manager dialog box, select the scenario to
change.
3. Click on the “Edit” button.
4. The “Edit scenario” dialog box opens.
Deleting A Scenario
1. From the Data Tools group in the Data Ribbon click onto
the drop down arrow next to What-if Analysis.
2. Select the scenario to delete.
3. Click on the “Delete” button.
Summarising Scenarios
Excel provides two methods of displaying scenarios in a
report. The Scenario Summary creates a simple report in a
table form, showing the data for the changing cells and their
effect on the results of formulas in a range. The second
method is to generate a Pivot Table Summary from a multiple
scenario set.
Merging Scenarios
It is easier to merge scenarios when all what-if worksheets in
Note: You can add scenarios workbooks are the same.
when a worksheet is protected,
but you cannot edit or delete 1. From the Data Tools group in the Data Ribbon click onto
existing scenarios while a the drop down arrow next to What-if Analysis.
worksheet is protected unless
you clear the Prevent changes
2. Select Scenario Manager.
check box in the Edit Scenario 3. Click on the “Merge” button.
dialog box. You can still edit
the values in changing cells on 4. In the “Book” box select the workbook that you want to
the worksheet unless the cells merge the scenarios from.
are locked.
SOLVER
Options.
2. Click Add-Ins, and then in the Manage box, select Excel
Add-ins.
3. Click Go.
4. In the Add-Ins available box, select the Solver Add-in
check box, and then click OK.
5. Tip If Solver Add-in is not listed in the Add-Ins available
box, click Browse to locate the add-in.
6. If you get prompted that the Solver Add-in is not currently
installed on your computer, click Yes to install it.
7. After you load the Solver Add-in, the Solver command is
available in the Analysis group on the Data tab.
7. Click on OK.
NOTES – MODULE 8
Notes – Module 8
Notes – Module 8
Notes – Module 8
INDEX
A O
ABS Function ................ 24 One-Way Data Table .... 80
Analytical Tools ............ 70 OR Function .................. 14
AND Function ............... 13
Auditing......................... 43 P
C Paste a list of Named
Ranges ....................... 5
Concatenate Function... 16 Pasting Names ................ 4
Countif Function ........... 25 PMT Function ................ 20
PPMT Function ............. 21
D Precedents .................... 45
PV Function .................. 22
Date & Time Functions . 17
Deleting a Named Range 4 R
Dependents .................. 45
Recording A Macro ....... 60
E Right Function ............... 15
Round Function ............. 24
Editing Macros .............. 64 Running Macros ............ 61
F S
Financial Functions ....... 20 Scenarios ...................... 71
Functions ...................... 11 Solver ............................ 78
FV Function .................. 23 Subtotals Nested ........... 31
Sumif Function .............. 25
G
T
Goal Seeker .................. 70
Templates ..................... 39
Text Functions .............. 15
H Today Function ............. 17
Hlookup Function .......... 19 Two-Way Data Tables... 81
I V
IF Function.................... 11 Value Function .............. 15
Information Functions ... 27 Visual Basic Editor ........ 63
Invalid Data ............. 52, 55 Vlookup Function .......... 18
IPMT Function .............. 21
Iserror Function ............ 27
L
Left Function ................. 15
Look Up Functions ........ 18
M
Macros .......................... 60
Mathematical Functions 24
Month Function ............. 17
N
Now Function ................ 17
NVP Function ............... 22