Documente Academic
Documente Profesional
Documente Cultură
MS Excel 2013
______________________________________________________________
Page 1 of 219
Table of Contents
Day 2 ........................................................................................................................................................... 5
4.10 Creating Fully Navigatable Workbooks Using Hyperlinks ........................................................ 5
4.10.01 Creating a Main or Dashboard Worksheet ................................................................ 15
4.10.02 Getting Good Graphics From the Web ..................................................................... 15
4.10.03 Copying and Pasting Icons Into Worksheet ............................................................... 17
4.10.04 Creating Hyperlinks ................................................................................................... 17
4.10.05 Copy Hyperlinks Into the Other Worksheets ............................................................. 18
4.10.06 Testing The Hyperlinks .............................................................................................. 18
5.00 VALIDATING DATA..................................................................................................................... 18
5.01 Data Validation...................................................................................................................... 18
5.02 Validation Combined with Dynamic Names .......................................................................... 24
5.03 Creating Cascading Dropdowns............................................................................................. 25
Exercises ................................................................................................................................................... 28
Day 2 – Exercise 01 – Data Capture ...................................................................................................... 28
Day 2 – Exercise 02 – Data Validation ................................................................................................... 34
Day 2 – Exercise 03 – Pivot Tables From Formatted Tables .................................................................. 34
Day 2 – Exercise 04 – Data And Time Slicers Visualization .................................................................... 35
Day 2 – Exercise 05 – Dashboard and Workbook Navigation ................................................................ 35
6.00 Analyzing Data Using Linear Equations and Optimizations ....................................................... 35
6.01 Scenario Manager ................................................................................................................. 35
6.02 Goal Seek .............................................................................................................................. 39
6.03 Solver .................................................................................................................................... 41
Exercises ................................................................................................................................................... 51
Day 2 – Exercise 01 – Scenario Manager ............................................................................................... 51
Day 2 – Exercise 01 – Goal Seek ............................................................................................................ 55
Day 2 – Exercise 02 – Data Table........................................................................................................... 59
Day 2 – Exercise 03 – Solver .................................................................................................................. 64
6.04 Data Table ............................................................................................................................. 90
7.00 Advanced Functions .................................................................................................................. 95
7.01 Using Excel 2013 Functions ................................................................................................... 95
Page 2 of 219
7.02 Getting help about using a particular function...................................................................... 97
7.03 Using date and time functions: TODAY ................................................................................. 98
7.04 Using date and time functions: DAY ...................................................................................... 99
7.05 Using date and time functions: MONTH................................................................................ 99
7.06 Using date and time functions: YEAR .................................................................................. 100
7.07 Using mathematical functions: SUMIF ................................................................................ 100
7.08 Using statistical functions: COUNTA .................................................................................... 102
7.09 Using statistical functions: COUNTIF ................................................................................... 103
7.10 Using text functions: CONCATENATE .................................................................................. 103
7.11 Using financial functions: FV ............................................................................................... 105
7.12 Using financial functions: NPV ............................................................................................ 107
7.13 Using financial functions: PMT ............................................................................................ 109
7.14 Using financial functions: PV ............................................................................................... 111
7.15 Using financial functions: RATE ........................................................................................... 112
7.16 Using logical functions: IF .................................................................................................... 113
7.17 Using logical functions: AND ............................................................................................... 115
7.18 Using logical functions: OR .................................................................................................. 116
7.19 Using logical functions: ISERROR ......................................................................................... 116
7.20 Using database functions: DSUM ........................................................................................ 117
7.21 Using CORRELATION function ............................................................................................. 119
7.22 Using nested functions ........................................................................................................ 122
7.23 Using the INDIRECT function ............................................................................................... 123
7.24 Using the OFFSET Function.................................................................................................. 124
7.25 Using the HLOOKUP ............................................................................................................ 127
7.26 Using the CHOOSE Function ................................................................................................ 128
7.27 Using the LOOKUP Function ................................................................................................ 128
7.28 Using SUB-TOTAL ................................................................................................................ 134
7.29 Summary of Using Various Look-Ups in MS Excel ............................................................... 137
7.30 Using the SUMIFS Function ................................................................................................. 144
7.31 Using the SUMPRODUCT Function ...................................................................................... 155
7.32 Using the GETPIVOTDATA Function .................................................................................... 156
7.33 Using the DAVERAGE Function ............................................................................................ 158
Page 3 of 219
7.34 Using the DCOUNT function ................................................................................................ 161
7.35 Using the DCOUNTA Function ............................................................................................. 164
7.36 Using the DGET Function ..................................................................................................... 167
7.37 Using the DSUM Function ................................................................................................... 170
7.38 Using the NPER Function ..................................................................................................... 173
7.39 Using the FVSCHEDULE Function......................................................................................... 175
7.40 Using the INTRATE Function ................................................................................................ 177
7.41 Using the IRR Function ........................................................................................................ 178
7.42 Using the PARETO CHART .................................................................................................... 181
7.43 Using the ISPMT Function ................................................................................................... 190
8.00 What-if tables.......................................................................................................................... 191
8.01 Using a one input Data Table command ............................................................................. 191
8.02 Using a two input data table command .............................................................................. 193
9.00 Audit ....................................................................................................................................... 195
9.01 Tracing precedent cells ....................................................................................................... 195
9.02 Tracing the dependents of a cell ........................................................................................ 197
9.03 Displaying all formulas within a worksheet ........................................................................ 198
10.00 Adding Picture To A Cell ...................................................................................................... 199
11.00 Introduction – Connecting Excel to Large Database ............................................................ 205
12.00 Introduction – Connecting Excel To Other Excel Workbooks .............................................. 210
Exercise ................................................................................................................................................... 217
One-Input and Two-Input Data Tables ................................................................................................ 217
Shared Workbook Using Google Docs ................................................................................................. 218
Exercise 03 – Power Pivot Introduction (Excel 2013) .......................................................................... 218
Exercise 04 – Excel Connectivity ......................................................................................................... 218
Page 4 of 219
Day 2
MS Excel also contains powerful features which can transform plain textual/numeric data into more
professional looking workbooks.
Excel was not designed with only this in view.
You can incorporate good graphics into Excel, to make the presentation look professional.
An example is as follows:
1
3
Here, the navigation buttons are expressed using the icons on the left, while the 3D charts are presented in
the right portion of the screen.
There are other numerous means and ways by which you can enhance the presentation of the workbook.
Page 5 of 219
Opening Files (of any type)
Opening Web Pages (Internet or Intranet)
Jumping/Navigating to locations within an existing document
Creating New Documents (Excel files only)
Sending Emails
Microsoft has added the ability to place Hyperlinks,
Directly on an Excel worksheet ,
Connected to a number of worksheet objects, including shapes, charts and wordart
Included as a worksheet formulas.
Programmatically using VBA
These 4 methods above will be discussed here.
Inserting Hyperlinks
As described above there are 4 methods for inserting hyperlinks in an Excel Workbook.
Page 6 of 219
Use a Keyboard Shortcut - Ctrl K
Connected to a number of worksheet objects, including shapes, charts and
wordart
You can also add a Hyperlink to many objects within Excel including
Pictures, Shapes, Text Boxes, Word Art and Charts.
Right clicking a lot of these objects brings up the Objects
Shortcuts Menu, select Hyperlink…,
or
Select the object, Use the Insert, Hyperlinks
Tab; or
Page 7 of 219
Select the Object and Use the Keyboard Shortcut
– Ctrl K
Hint: Right Clicking on Charts Doesn’t Show the Add Hyperlink
option, so Select the Chart and Ctrl K
Page 8 of 219
Where:
SheetName: The Name of the Sheet where the Hyperlink is to go
Range: The Range where the Hyperlink is to go
Address!Range: The address and Range linked to in the Hyperlink
Name: The Display Name of the Hyperlink
Types of Hyperlinks
There are 5 Types of Hyperlinks which Excel offers, each is described below:
Existing File
Existing Web Page
Place in This Document
Create a New Document
Send an Email Link
Existing File
Page 9 of 219
Add a ScreenTip…, a Tip which is displayed when
you hover the mouse over a Hyperlink
Use the Bookmark… button to jump to predefined
Named Ranges and common Cell References dialog
Page 10 of 219
Select the Existing File or Web Page icon in the
Link to: area
Navigate to the existing file using the Look
in: area of the dialog
Add your Display Text in the Text to
display: area
Add a ScreenTip…, a Tip which is displayed when
you hover the mouse over a Hyperlink
Place in This Document
Page 11 of 219
Select the Place in this Document icon in the Link to: area
Type in Cell Reference using the Type in Cell Reference: area of the dialog or select a Defined Names in
the Defined Names area
Add your Display Text in the Text to display: area
Add a ScreenTip…, a Tip which is displayed when you hover the mouse over a Hyperlink
Select the Create New Document icon in the Link to: area
Type in the Name of the New Document in the Name of the New Document: area of the dialog.
Add your Display Text in the Text to display: area
Add a ScreenTip…, a Tip which is displayed when you hover the mouse over a Hyperlink
You can choose whether to Edit the File Now or Later in the When to Edit area
Page 12 of 219
Select the Email Address icon in the Link to:
area
Type in the Email Address in the Email Address:
area of the dialog.
Add your Display Text in the Text to display:
area
Add your Email Subject in the Subject: area
Add a ScreenTip…, a Tip which is displayed when
you hover the mouse over a Hyperlink.
Editing Hyperlinks
Once you have a hyperlink established you can edit the hyperlink by right click on the hyperlink and select
Edit Hyperlink
Page 13 of 219
The Edit Hyperlink dialog will vary depending on the type of Hyperlink as described above.
Deleting Hyperlinks
Once you have a hyperlink established you can delete the hyperlink by right click on the hyperlink and select
Remove Hyperlink
Page 14 of 219
Hyperlink Uses
Hyperlink can be used for a number of uses as described above.
Tables of Contents
One common use of hyperlinks is the creation of Tables of Contents.
The construction of a Table of Contents page was discussed here Table of Contents
The construction of Tables of Contents can also be automated using some simple VBA.
So instead of reinventing the wheel I will direct you to The Microsoft Office Blog where Tables of Contents
were recently discussed.
Company logo
Page 15 of 219
Be sure to click the Images hyperlink, so only images would be displayed.
Page 16 of 219
Once you have selected the picture you prefer, then simply Right Click the mouse, and select the “Save image
as…” option and save this image to your desired directory.
Hyperlinking these icons/pictures provides a nice and professional means of enabling users to “jump” or
“navigate” the workbook, without referring to the worksheet tab setting at the bottom of the workbook.
It is much more professional.
Hyperlinking would enable you to “link” either a worksheet or a named cell range to an object or text.
To hyperlink, do the following:
Right click on the image/icon you would like to hyperlink to a worksheet or named range. Choose Hyperlink.
Page 17 of 219
Once you have done you, the following dialogue screen would be displayed,
Page 18 of 219
In the example below, we have a class of students on a drop down
list. We only have to click a cell in the A column to see this same
list of students. You'll see how to do that now. Here's a picture
of your finished spreadsheet:
In the image above, we can simply select a student from the drop down list - no more typing! We can also do
the same for the Subject and Grade.
Cell A1 Student
Cell B1 Subject
Cell C1 Grade
Cell E1 Comments
We now need some data to go in our lists. So, type the same data as
in the image below. It doesn't need to go in the same columns as
ours. But don't type in Columns A, B, C or E:
Page 19 of 219
The data in Columns F, G and H above will be
going in to our list.
Now click on Column A to highlight that entire
column:
Page 20 of 219
To create a drop down list, click the down arrow
just to the right of "Allow: Any Value" on
the Settings tab:
Source means which data you want to go in your list. You can either
just type in your cell references here, or let Excel do it for you.
Page 21 of 219
To let Excel handle the job, click the icon to
the right of the Source textbox:
Now select the cells on your spreadsheet that you want in your
list. For us, this is the Students:
Once you have selected your data, click the same icon on the Data Validation dialogue box. You'll then be
returned to the full size one, with your cell references filled in for you:
Click OK, and you'll see the A column with a drop down list in cell A1:
Page 22 of 219
However, you don't want a drop down list for your A1 column heading. To get rid of it, click inside of cell A1.
Click the Data Validation item on the Data Tools panel again to bring up the dialogue box. From the Allow
list, select Any Value:
Click OK on the Data Validation dialogue box, and your drop down list in cell A1 will be gone.
The rest of the column will still have drop down lists, though. Try it out. Click inside cell A2, and you'll see a
down-pointing arrow:
Page 23 of 219
Select an item on your list to enter that name in the cell. Click any other cell in the A column and you'll see
the same list.
Adding a drop down list to your cell can save you a lot of time. And it means that typing errors won't creep in
to your work.
Add drop down list to the B and C columns. The B column should
contain lists of Subjects, and the C column a list of Grades. Make
sure that the cells B1 and C1 don't contain drop down lists. When
you're finished, the Subject column should look like this:
Page 24 of 219
customers can be referred to us Customers
listing, etc.).
2. Name this using the Formulas | Define Name
method (if this list is a member of a Formatted
as Table listing), or simply use the Name Box to
give the same list a name. Either way, it will
work.
Then proceed as per Section 5.01, with the only
difference, being the Source of the list would
be typed in as follows:
=Customers listing
(instead of a $r$c:$r$c type of referencing)
Page 25 of 219
Name Range Address
Food A1:A3
Pizza B1:B4
Pancakes C1:C2
Chinese D1:D3
Page 26 of 219
6. Click OK.
Result:
Page 27 of 219
10. Click OK.
Result:
Explanation: the INDIRECT function returns the reference specified by a text string. For example, the user
selects Chinese from the first drop-down list. =INDIRECT($B$1) returns the Chinese reference. As a result, the
second drop-down lists contains the Chinese items.
Exercises
Page 28 of 219
Your Complete Name – Day 02 - Exercise 01 – Set 01 – V0N
Based on the screenshot shown below, show the
data form corresponding to this image.
Page 29 of 219
Create Data Validation Rule
To create the data validation rule, execute the following steps.
1. Select cell C2.
2. On the Data tab, click Data Validation.
Page 30 of 219
Input Message
Input messages appear when the user selects the
cell and tell the user what to enter.
On the Input Message tab:
1. Check 'Show input message when cell is
selected'.
2. Enter a title.
3. Enter an input message.
Page 31 of 219
Error Alert
If users ignore the input message and enter a number that is not
valid, you can show them an error alert.
Page 32 of 219
4. Click OK.
Data Validation Result
1. Select cell C2.
Page 33 of 219
Note: to remove data validation from a cell, select the cell, on
the Data tab, click Data Validation, and then click Clear All. You
can use Excel's Go To Special feature to quickly select all cells
with data validation.
Page 34 of 219
Day 2 – Exercise 04 – Data And Time Slicers Visualization
Note: Please use the workbook which you have completed in
Exercise 3 for Day 2 – as a continuance to this exercise. The data
present in that workbook, will now be the subject of the
requirements for this exercise.
Once you have completed this Exercise, save (and email to the
facilitators’ email address) the File as:
What-If Analysis
What-If Analysis in Excel allows you to try out different values (scenarios) for formulas. The following example
helps you master what-if analysis quickly and easily.
Assume you own a book store and have 100 books in storage. You sell a certain % for the highest price of $50
and a certain % for the lower price of $20.
Page 35 of 219
If you sell 60% for the highest price, cell D10 calculates a total profit of 60 * $50 + 40 * $20 = $3800.
Page 36 of 219
3. Type a name (60% highest), select cell C4 (%
sold for the highest price) for the Changing
cells and click on OK.
Page 37 of 219
5. Next, add 4 other scenarios (70%, 80%, 90%
and 100%).
Finally, your Scenario Manager should be consistent with the
picture below:
Note: to see the result of a scenario, select the scenario and click on the Show button. Excel will change the
value of cell C4 accordingly for you to see the corresponding result on the sheet.
Scenario Summary
To easily compare the results of these scenarios, execute the
following steps.
1. Click the Summary button in the Scenario
Manager.
Page 38 of 219
2. Next, select cell D10 (total profit) for the
result cell and click on OK.
Result:
Conclusion: if you sell 70% for the highest price, you obtain a total profit of $4100, if you sell 80% for the
highest price, you obtain a total profit of $4400, etc. That's how easy what-if analysis in Excel can be.
Page 39 of 219
The Goal Seek dialog box appears.
2. Select cell D10.
3. Click in the 'To value' box and type 4700.
4. Click in the 'By changing cell' box and
select cell C4.
5. Click OK.
Result. You need to sell 90% of the books for the highest price to
obtain a total profit of exactly $4700.
Page 40 of 219
6.03 Solver
What is optimization?
To understand Optimization, you must first define the parameters of the optimization. There are many real
situations where the normal process of computing would not suffice to arrive at a certain optimum value.
For example, in a feed formulation problem, where the “feed” would consist of various ingredients, with each
ingredient contributing to the nutrient content by a % of, and the same costing X amount per required
ingredient.
The problem would be how to find the optimum nutrient content, at the optimum cost!
Below are some examples of how this optimization could also be applied:
How can a large drug company determine the monthly product mix at their Indianapolis plant that
maximizes corporate profitability?
If Microsoft produces Xbox consoles at three locations, how can they minimize the cost of meeting
demand for Xbox consoles?
What price for Xbox consoles and games will maximize profit from Xbox sales?
Microsoft would like to undertake 20 strategic initiatives that will tie up money and skilled
programmers for the next five years. They do not have enough resources to undertake all 20
projects. Which projects should they undertake?
How do bookmakers find the best set of "ratings" for NFL teams to set accurate point spreads?
How should I allocate my retirement portfolio among high-tech stocks, value stocks, bonds, cash,
and gold?
Page 41 of 219
In all these situations, we want to find the best way to do something. More formally, we want to find the
values of certain cells in a spreadsheet that optimize (maximize or minimize) a certain objective. The Excel
Solver tool helps you answer optimization problems.
TARGET CELL
The target cell represents the objective or goal. We want to either minimize or maximize the target cell. In
the example of a drug company's product mix, the plant manager would presumably want to maximize the
profitability of the plant during each month. The cell that measures profitability would be the target cell. The
target cells for each situation described at the beginning of the article are listed in the following table.
Keep in mind that in some situations, you might have multiple target cells. For example, Microsoft might have
a secondary goal to maximize Xbox market share.
CHANGING CELLS
Changing cells are the spreadsheet cells that we can change or adjust to optimize the target cell. In the drug
company example, the plant manager can adjust the amount produced for each product during a month. The
cells in which these amounts are recorded are the changing cells in this model. CONSTRAINTS
Constraints are restrictions you place on the changing cells. In our product mix example, the product mix
can't use more of any available resource (for example, raw material and labor) than the amount of the
available resource. Also, we should not produce more of a product than people are willing to buy. In most
Solver models, there is an implicit constraint that all changing cells must be nonnegative. Remember that a
Solver model does not need not have any constraints. The following table lists the constraints for the
problems presented at the start of the chapter.
MODEL CONSTRAINTS
Drug company product Product mix uses no more resources than are available
mix Do not produce more of a product than can be sold
Xbox shipping Do not ship more units each month from a plant than plant capacity
Make sure that each customer receives the number of Xboxes they
need
Xbox pricing Prices can't be too far out of line with competitors’ prices
Microsoft project Projects selected can't use more money or skilled programmers
initiatives than are available
Page 42 of 219
NFL ratings None
Retirement portfolio Invest all our money somewhere (cash is a possibility)
Obtain an expected return of at least 10 percent on our investments
After you have input the target cell, changing cells, and constraints, what does Solver do? To answer this
question, you need some background in Solver terminology. Any specification of the changing cells that
satisfies the model's constraints is known as a feasible solution. For instance, in our product mix example, any
product mix that satisfies the following three conditions would be a feasible solution:
Mix does not use more raw material and labor than is available.
Mix produces no more of each product than is demanded.
Amount produced of each product is nonnegative.
Essentially, Solver searches over all feasible solutions and finds the feasible solution that has the "best" target
cell value (the largest value for maximum optimization, the smallest for minimum optimization). Such a
solution is called an optimal solution. Some Solver models have no optimal solution and some have a unique
solution. Other Solver models have multiple (actually an infinite number of) optimal solutions.
The best way to understand how to use Solver is by looking at detailed examples. In the See also section of
this article, you can find links to additional articles that describe how to use the Solver to address several
important business (and nonbusiness) problems.
Solver
Excel includes a tool called solver that uses techniques from the operations research to find optimal solutions
for all kind of decision problems.
Page 43 of 219
2. Under Add-ins, select Solver Add-in and click
on the Go button.
Page 44 of 219
4. You can find the Solver on the Data tab.
Page 45 of 219
1. To formulate this linear programming model, answer the following
three questions.
a. What are the decisions to be made? For this problem, we need
Excel to find out how much to order of each product (bicycles,
mopeds and child seats).
b. What are the constraints on these decisions? The constrains here
are that the amount of capital and storage used by the products
cannot exceed the limited amount of capital and storage (resources)
available. For example, each bicycle uses 300 units of capital and
0.5 unit of storage.
c. What is the overall measure of performance for these decisions?
The overall measure of performance is the total profit of the three
products, so the objective is to maximize this quantity.
2. To make the model easier to
understand, name the following ranges.
UnitProfit C4:E4
OrderSize C12:E12
ResourcesUsed G7:G8
ResourcesAvailable I7:I8
TotalProfit I12
Page 46 of 219
3. Insert the following three SUMPRODUCT
functions.
Page 47 of 219
It is not necessary to use trial and error. We shall describe next
how the Excel Solver can be used to quickly find the optimal
solution.
Page 48 of 219
You have the choice of typing the range names or clicking on the
cells in the spreadsheet.
2. Enter TotalProfit for the Objective.
3. Click Max.
4. Enter OrderSize for the Changing Variable
Cells.
5. Click Add to enter the following constraint.
Page 49 of 219
6. Check 'Make Unconstrained Variables Non-
Negative' and select 'Simplex LP'.
7. Finally, click Solve.
Result:
Page 50 of 219
Conclusion: it is optimal to order 94 bicycles and 54 mopeds. This
solution gives the maximum profit of 25600. This solution uses all
the resources available.
Exercises
Page 51 of 219
Create a Scenario Summary
Although Excel scenarios can be complex, a simple example is used here. The annual budget forecasts from
both the Finance and Marketing departments have been entered, and stored as scenarios.
Warning: This is a static report that does not change if the Scenario data changes. Delete this report after
printing it, and create a new Summary when necessary.
Page 52 of 219
Click the OK button.
A Scenario Summary sheet is added to the
workbook
View the Scenario Summary
To compare the scenarios side by side, you can view the Scenario
Summary sheet that was created.
Select the Scenario Summary worksheet
To show or hide the details, click the + / -
buttons at the left side and top of the
worksheet
In this example, the scenario cells on the Budget sheet have been named, and those names appear on the
Scenario Summary sheet, making it easier to understand. For example, cell B1 is named Dept, and you can
see that name in cell C6 on the Scenario Summary sheet.
There is no option for formatting the Scenario Summary when you create it. You can change the formatting in
the completed report.
Page 53 of 219
Create a Scenario PivotTable Report
For a different view of the Scenario data, you can create a pivot
table report:
Warning: This is a static report that does not change if the
Scenario data changes. Delete this report after printing it, and
create a new Summary when necessary.
On the Ribbon's Data tab, click What-If Analysis
Click the drop down arrow, and click Scenario
Manager
Page 54 of 219
In the Scenario Summary dialog box, for Report
type, select Scenario PivotTable report
Press the Tab key, to move to the Result cells
box
On the worksheet, click on cell B6.This is the
Profit cell, and it changes, based on the sales
and expense amounts.
Page 55 of 219
In the spreadsheet above, we know that we want to multiply the
number in B1 by the number in B2. The number in cell B2 is the one
we're not too sure of. The answer is going in cell B3. Our answer
is wrong at the moment, because we has a Goal of 56. To use Goal
Seek to get the answer, try the following:
From the Excel menu bar, click on Data
Locate the Data Tools panel and the What if
Analysis item. From the What if Analysis menu,
select Goal Seek
The following dialogue box appears:
The first thing Excel is looking for is "Set cell". This is not
very well named. It means "Which cell contains the Formula that you
want Excel to use". For us, this is cell B3. We have the following
formula in B3:
= B1 * B2
So enter B3 into the "Set cell" box, if it's not
already in there.
The "To value" box means "What answer are you looking for"? For us,
this is 56. So just type 56 into the "To value" box
The "By Changing Cell" is the part you're not sure of. Excel will
be changing this part. For us, it was cell B2. We're weren't sure
which number, when multiplied by 8, gave the answer 56. So type B2
into the box.
Page 56 of 219
You Goal Seek dialogue box should look like ours below:
As you can see, Excel has changed cell B2 and replace the 6 with a
7 - the correct answer.
We'll now try a more practical example.
Page 57 of 219
at 25 each. Assume that you'll still sell 1000 items. The question
is, to hit your new profit of 35,000, by how much do you have to
raise your prices?
Create the spreadsheet below, and we'll find a
solution with Goal Seek.
The spreadsheet is split into two: Current Sales, and Future Sales.
We'll be changing the Future Sales with Goal Seek. But for now,
enter the same values for both sections. The formula to enter for
B4 is this:
= B2 * B3
And the formula to enter for E4 is this:
= E2 * E3
The current Price Per Item is 25.00. We want to change this with
Goal Seek, because our prices will be going up to hit our new
profits of 35,000. So try this:
From the Excel menu bar, click on Data
Locate the Data Tools panel and the What if
Analysis item. From the What if Analysis menu,
select Goal Seek
The following dialogue box appears:
Page 58 of 219
For "Set cell", enter E4. This is where the formula is. The "To
Value" is what we want our new profits to be. So enter 35000. The
"By changing cell" is the part we're not sure of. For us, this was
the price each item needs to be increased by. This was coming from
cell E3 on our spreadsheet. So enter E3 in the "By changing cell"
box. Your Goal Seek dialogue box should now look like this:
Our new Price Per Item is 35. Excel has also changed the Profits
cell to 35 000.
Page 59 of 219
Once you have completed this Exercise, save (and email to the
facilitators’ email address) the File as:
Before we start
To follow this exercise, you can use the file excel2013-2013-exercises.xlsx on the demonstrations files web
page.
This model uses the PMT (Rate per period; number of payments; present value) function to determine the
amount of each payment. In this analysis, the payments are due every two weeks or 26 times per year. The
B9 cell will show the yearly. The B10 cell will show the grand total of all the payments. As the present values
indicates, a 200 000 $ mortgage under these conditions will have to pay 368 241, 29 $ to repay the loan.
Data Table with one variable
The first example will consist in determining the amount of each payment and the yearly total if you were to
change the interest rate. You could create this table by hand. But this is much faster. Also, the changes that
you make to this table will immediately be recalculated.
Page 60 of 219
The rates that will be calculated by the table are on the first row. The first column has the cell addresses of
the results you want to see. In this case, the B8 and B9 cell addresses represent the value of each payment
and the yearly total. The table with the values to compare and the cell addresses that you want to see the
results in must be prepared before you can use the Data Table command.
The data from the picture above will be used to create the table.
It will, fill in the blanks by using the values of the first row
and place them one at the time in the B4 cell. That cell represents
the rate used to determine the payments. It will then find what the
values for the B8 and B9 cells are and place them in the table.
Here are the instructions to createthe table.
Page 61 of 219
You can see the results generated by the Data Table. For this example, if the B4 cell is equal to 5%, the B8 cell
will have a value of 539,32 $. The same rule will apply for every other cell in the table. You can now see, how
easily and quickly a Data Table can be generated to help you compare many possibilities. This example only
created a table when one value is changed. The next example of the Data Table will demonstrate how to
create a table when you need to modify two variables.
Data Table with 2 variables
You read how to create a Data Table with one variable and tried it out. You can use the same technique to
create another Data table that can change two variables. But the preparations to create this table are a little
different from the previous example.
The next exercise consists to find what will be the grand total of all payments depending on the interest
rate and the number of years that you take to pay your mortgage (B10). For this case, you need to create a
Data Table with two variables. You must place the values you want to check in the first row and the first
column of the Data Table. The first row will contain the interest rate. The first column will contain the
number of years you want to pay your mortgage.
Page 62 of 219
Data tables with the same values for the first row and the first
column. There is another option available but it will be explained
later.
Select the range of cells from A19 to G23.
Select the Data tab.
Press the What-If Analysis button and select
the Data Table option.
The result of the table above shows you, that the faster you pay
down your mortgage, the less interest you have to pay. Your grand
total will be less.
As mentioned before, this type of Data Table can only show the
result of one cell at the time. But you can change the cell address
to view other results.
Change the content of the A19 cell
from =B10 to =B8.
Page 63 of 219
The Data Table will recalculate itself in an instant. You can now see your payments in the time frame you
chose with the best rate you can have. Paying faster also means bigger payments... Day 2 – Exercise
03 – Solver
Note: Please type the data as shown below in this document.
Once you have completed this Exercise, save (and email to the
facilitators’ email address) the File as:
Page 64 of 219
Formulas for Columns E-G
Use formulas in cells E2:E7 to find the total
cost (Cost per Ad times Number of ads placed).
Use formulas in cells F2:F7 to find the Percent
of Total for each publication. The formula for
F2 should be =E2/$E$8 . The cell reference E2
is a relative cell reference, while the $E$8 is
an absolute cell reference. Watch the TIP on
these types of cell references and understand
the difference.
Use formulas in cells G2:G7 to find the Total
Audience (Audience per Ad times Number of ads
placed).
Use formulas for cells E8, E9, and G8.
Solver
Page 65 of 219
You might be able to work
out this problem yourself
by substituting many
alternatives for the values
currently in D2:D7, keeping
your eye on the
constraints, and noting the
impact of your changes on
the total expenditure
figure in E8. In fact,
that’s what the Solver does
for you—but it does it more
rapidly, and it uses some analytic techniques to home in on the
optimal solution without having to try every conceivable
alternative.
Click the Solver button on the Data tab to
display the dialog box shown here. To complete
this dialog box, you must give the Solver three
sets of information: your objective, or target
(minimizing total expenditure); your variables,
or changing
cells (the
number of
advertisements
you will place
in each
publication);
and your
constraints
(the
conditions
summarized at the bottom of the worksheet.
Stating the objective
In the Set Target Cell box, you indicate the goal, or target, that
you want Solver to achieve. In this example, you want to minimize
your total cost—the value in cell E8—so you specify your objective
by typing E8 in the Set Target Cell box (or by clicking the cell).
In this example, because you want the Solver to set your target
cell to its lowest possible value, you select Min as the Equal To
option.
Page 66 of 219
Specifying variable cells
The next step is to tell the
Solver which cells to change.
In our example, the cells whose
values can be adjusted are
those that specify the number
of advertisements to be placed
in each publication, or cells
D2:D7. Alternatively, you can
click Guess, and the Solver
proposes the appropriate
changing cells based on the
target cell you specified.
Specifying constraints
The last step is to
specify constraints. To
specify a constraint,
click Add in the Solver
Parameters dialog box,
and complete the Add
Constraint dialog box.
Figure 3 shows how you
express the constraint
that total advertising expenditures (the value in cell E8 in the
model) must be less than or equal to the total budget (the value in
cell G11).
Add the rest of the constraints – when you are done – your Solver
dialog box should look like this:
Be sure you understand each
constraint:
$D$2:$D$7>=$G$15
All the values in
cells D2:D7 must
be greater than
or equal to the
value in G15 (6)
$E$8<=$G$11 Total
cost (E8) has to
be less than or equal to the total budget (G11)
Page 67 of 219
$E$9<=$G$12 Total cost of publications C & D
(E9) has to be less than or equal to $7,500,000
(G12)
Page 68 of 219
To stipulate that your ad-placement variables be restricted to
whole numbers, start the Solver, and click the Add button in the
Solver Parameters dialog box. In the Add Constraint dialog box, you
select the cell reference that holds your ad placement numbers—
D2:D7. Click the list in the middle of the dialog box, and select
int. The Solver inserts the word
integer in the Constraint box, as
shown in below. Click OK to return
to the Solver Parameters dialog box.
Your finished solver box should look
like this
Your results should look like
this
Page 69 of 219
When your solver is complete &
correct – name the scenario.
Use your last name as the
Scenario Name.
Click SAVE SCENARIO & then
enter your last name as the
Scenario name. You can view
scenarios by clicking on Data &
then ‘what-if analysis’
Page 70 of 219
1. Before you click OK, select Sensitivity from
the Reports section.
Below you can find the optimal solution and the sensitivity report.
Page 71 of 219
It is optimal to order 94 bicycles and 54 mopeds. This solution
gives the maximum profit of 25600. This solution uses all the
resources available (93000 units of capital and 101 units of
storage). You can find these numbers in the Final Value column.
Reduced Cost
The reduced costs tell us how much the objective coefficients (unit
profits) can be increased or decreased before the optimal solution
changes. If we increase the unit profit of Child Seats with 20 or
more units, the optimal solution changes.
1. At a unit profit of 69, it's still optimal to
order 94 bicycles and 54 mopeds. Below you can
find the optimal solution.
Page 72 of 219
2. At a unit profit of 71, the optimal solution
changes.
Shadow Price
The shadow prices tell us how much the optimal solution can be
increased or decreased if we change the right hand side values
(resources available) with one unit.
Page 73 of 219
1. With 101 units of storage available, the
total profit is 25600. Below you can find the
optimal solution.
Page 74 of 219
Day 2 – Exercise 03 – Solver – Capital Investment
Page 75 of 219
made. Fourth, investment Six and investment Seven can only be made
if investment Five is made.
c. What is the overall measure of performance for these decisions?
The overall measure of performance is the total profit of the
capital investments made, so the objective is to maximize this
quantity.
2. To make the model easier to
understand, name the following ranges.
Range Name Cells
Profit C5:I5
YesNo C13:I13
TotalProfit M13
Page 76 of 219
With this formulation, it becomes easy to analyze any trial
solution.
1. For example, if we make investment One and
Two, the second constraint is violated.
Page 77 of 219
3. However, it's OK to make investment One, Five
and Six. All constraints are satisfied.
Page 78 of 219
To find the optimal solution, execute the following steps.
1. On the Data tab, click Solver.
Note: can't find the Solver button? Click here to load the Solver
add-in.
Enter the solver parameters (read on). The
result should be consistent with the picture
below.
Page 79 of 219
2. Enter TotalProfit for the Objective.
3. Click Max.
4. Enter YesNo for the Changing Variable Cells.
5. Click Add to enter the following constraint.
Page 80 of 219
6. Click Add to enter the following constraint.
Page 81 of 219
The optimal solution:
Page 82 of 219
Day 2 – Exercise 03 – Solver – Assignment Problem
Page 83 of 219
c. What is the overall measure of performance for these decisions?
The overall measure of performance is the total cost of the
assignment, so the objective is to minimize this quantity.
2. To make the model easier to
understand, name the following ranges.
Range Name Cells
Cost C4:E6
Assignment C10:E12
PersonsAssigned C14:E14
Demand C16:E16
TasksAssigned G10:G12
Supply I10:I12
TotalCost I16
Page 84 of 219
Explanation: The SUM functions calculate the number of tasks
assigned to a person and the number of persons assigned to a task.
Total Cost equals the sumproduct of Cost and Assignment.
Page 85 of 219
Note: can't find the Solver button? Click here to load the Solver
add-in.
Enter the solver parameters (read on). The
result should be consistent with the picture
below.
Page 86 of 219
You have the choice of typing the range names or clicking on the
cells in the spreadsheet.
2. Enter TotalCost for the Objective.
3. Click Min.
4. Enter Assignment for the Changing Variable
Cells.
5. Click Add to enter the following constraint.
Page 87 of 219
Note: binary variables are either 0 or 1.
6. Click Add to enter the following constraint.
Page 88 of 219
The optimal solution:
Page 89 of 219
Conclusion: it is optimal to assign Person 1 to task 2, Person 2 to
Task 3 and Person 3 to Task 1. This solution gives the minimum cost
of 129. All constraints are satisfied.
Page 90 of 219
5. Click in the 'Column input cell' box (the
percentages are in a column) and select cell C4.
We select cell C4 because the percentages refer to cell C4 (% sold
for the highest price). Together with the formula in cell B12,
Excel now knows that it should replace cell C4 with 60% to
calculate the total profit, replace cell C4 with 70% to calculate
the total profit, etc.
Note: this is a one variable data table so we leave the Row input
cell blank.
6. Click OK.
Result.
Page 91 of 219
Conclusion: if you sell 60% for the highest price, you obtain a
total profit of $3800, if you sell 70% for the highest price, you
obtain a total profit of $4100, etc.
Note: the formula bar indicates that the cells contain an array
formula. Therefore, you cannot delete a single result. To delete
the results, select the range B13:B17 and press Delete.
Page 92 of 219
5. On the Data tab, click What-If Analysis and
select Data Table from the list.
Page 93 of 219
7. Click in the 'Column input cell' box (the
percentages are in a column) and select cell C4.
We select cell D7 because the unit profits refer to cell D7. We
select cell C4 because the percentages refer to cell C4. Together
with the formula in cell A12, Excel now knows that it should
replace cell D7 with $50 and cell C4 with 60% to calculate the
total profit, replace cell D7 with $50 and cell C4 with 70% to
calculate the total profit, etc.
8. Click OK.
Result.
Page 94 of 219
Conclusion: if you sell 60% for the highest price, at a unit profit
of $50, you obtain a total profit of $3800, if you sell 80% for the
highest price, at a unit profit of $60, you obtain a total profit
of $5200, etc.
Note: the formula bar indicates that the cells contain an array
formula. Therefore, you cannot delete a single result. To delete
the results, select the range B13:D17 and press Delete.
Page 95 of 219
Clicking on the Insert Function icon will
display the Insert Function dialog box, which
allows you to easily locate a particular
function.
Page 96 of 219
You can then scroll down the entire list of functions.
This will display the Functions Arguments dialog box for the IF
function.
Page 97 of 219
Click on help on this function (bottom-left within the dialog box).
This will display help relevant to that function.
Take a quick look at the help available and the close the dialog
box.
Page 98 of 219
7.04 Using date and time functions: DAY
Click on cell B4 and enter the following
function:
=DAY(B3)
Press the Enter key. You will notice that the
current day of the month is displayed:
Page 99 of 219
7.06 Using date and time functions: YEAR
Click on cell B6 and enter the following
function:
=YEAR(B3)
Press the Enter key. You will see that the
current year will be displayed:
When you click on the OK button your will see the result as
illustrated:
Click on the Rate section of the dialog box, and then click on cell C4.
Click on the Value 1 section of the dialog box, and then click on cell C5, as this is an upfront, initial payout,
prefix this amount with a minus (-) sign.
Click on the Value 2 section of the dialog box,
and then click on cell C6.
Click on the Value 3 section of the dialog box,
and then click on cell C7:
NOTE: If you do not get a result as below, it may be because you forgot the minus symbol in front of C5.
Click within the Rate section of the dialog box and enter C4/12.
Click within the Nper section of the dialog box and then click on cell C5.
Click within the Pv section of the dialog box and then click on cell C6:
Click in the Rate section of the dialog box and enter C4/12 (to calculate the rate on a monthly basis).
Click in the Nper section of the dialog box and enter C5*12 (to account for the length of the term in months).
Click in the Pmt section of the dialog box and then click on cell C6:
T
he Function Arguments dialog box will be displayed
Click on the Logical_test section of the dialog box and enter B3>500.
Click on the Value_if_true section of the dialog box and enter B3*5%.
Click on the Value_if_false section of the dialog box and enter 0.
When you press the OK button, you will see the following. As the value in cell B3 is less than 500, the
discount value is zero:
Copy the formula in cell D3 to the cell range D4:D6 and you will see the following:
Copy the formula in cell D3 to the cell range D4:D6 and you will see the following:
The only person to get less than 75 marks in either part of the examination is Elliot, who is the only person to
not pass the entire examination.
Save your changes and close the workbook.
We have used the ISERROR function in cell B6 to pick up the fact that this cell contains an error, using the
syntax:
=ISERROR(B2)
This will display the Insert Function dialog box. Use the Category control to display Database functions.
Click on the Database section of the dialog box and then select cells A7:C12.
Click on the Field section of the dialog box and enter “Sales”.
Click on the Criteria section of the dialog box and then select cells B4:B5.
Note: can't find the Data Analysis button? Click here to load
the Analysis ToolPak add-in.
2. Select Correlation and click OK.
Do we really need the INDIRECT function for this? Yes. Below you can find the result without using the
INDIRECT function.
Note: the & operator is used to join strings. Border for illustration
only.
3. For example, the function below reduces to
=AVERAGE(Scores), 9
Result:
Result:
The CHOOSE function returns a value from a list of values, based on a position number.
DESCRIPTION
The Microsoft Excel LOOKUP function returns a value from a range (one row or one column) or from an array.
There are 2 different syntaxes for the LOOKUP function:
=LOOKUP(10251, A1:A6)
Result: 10251
=LOOKUP("T", {"s","t","u","v";10,11,12,13})
Result: 11
=LOOKUP("t", {"s","t","u","v";"a","b","c","d"})
Result: "b"
=LOOKUP("r", {"s","t","u","v";"a","b","c","d"})
Result: #N/A
=LOOKUP(2, {1,2,3,4;511,512,513,514})
Result: 512
=LOOKUP("CB2",A2:A5,D2:D5)
And yes, even though CB2 exists in the data, the LOOKUP function returns 0.
Now, let's explain what is happening. At first, it looks like the function isn't finding CB2 in the list, but in fact,
it is finding something else. Let's fill in the empty cells in D3:D5 to explain better.
If we place the values TEST1, TEST2, TEST3 in cells D3, D4, D5, respectively, we can see that the LOOKUP
function is in fact returning the value TEST2. So we ask ourselves, when we are looking up CB2 in the data and
CB2 exists in the data, why is it returning the value for CB19? Good question. The LOOKUP function assumes
that the data in column A is sorted in ascending order.
If you look closer at column A, it is not in fact sorted in ascending order. If we quickly sorted column A, it
would look like this:
=VLOOKUP("CB2",$A$2:$D$5,4,FALSE)
The VLOOKUP function does not require us to have the data sorted in ascending order since we used FALSE as
the last parameter - which means that it is looking for an exact match.
DESCRIPTION
The Microsoft Excel SUBTOTAL function returns the subtotal of the numbers in a column in a list or database.
SYNTAX
The syntax for the Microsoft Excel SUBTOTAL function is:
Explanation
Value
(includes hidden values)
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP
Explanation
Value
(ignores hidden values)
101 AVERAGE
102 COUNT
103 COUNTA
104 MAX
105 MIN
106 PRODUCT
107 STDEV
108 STDEVP
109 SUM
110 VAR
Based on the spreadsheet above, the following Excel SUBTOTAL examples would return:
=SUBTOTAL(1, D2:D5)
Result: 22.3925
=SUBTOTAL(2, D2:D5)
Result: 4
=SUBTOTAL(3, D2:D5)
=SUBTOTAL(4, D2:D5)
Result: 35.88
=SUBTOTAL(5, D2:D5)
Result: 7
=SUBTOTAL(6, D2:D5)
Result: 136191.51
=SUBTOTAL(7, D2:D5)
Result: 11.91825316
=SUBTOTAL(8, D2:D5)
Result: 10.32151
=SUBTOTAL(9, D2:D5)
Result: 89.57
=SUBTOTAL(10, D2:D5)
Result: 142.0447583
=SUBTOTAL(11, D2:D5)
Result: 106.5335688
The first step in deciding which lookup formula to use is to determine what kind of lookup you need to
perform. There are essentially three lookup types:
Vertical Lookup
Horizontal Lookup
A horizontal lookup is very similar to a vertical lookup, except that after you define the lookup value, you
must find your lookup value horizontally across the top row of your data set, and then return the value in
the row related to your lookup value.
Matrix Lookup
As mentioned before, a matrix lookup implies that you are looking up both a vertical and horizontal value to
pinpoint the return value you want to pull. This is essentially the process of establishing coordinates on a grid
to locate a value, except in this case the coordinates are lookup values.
Simplicity
Processing Need
Processing need is something people rarely consider when writing lookup formulas. Whenever you write
a Vlookup formula that references a large data set, it requires processing power from Excel to calculate the
formula. If you’re writing a single formula, you won’t notice a difference between referencing a large data
set and a small one. However, if you happen to be building a huge Excel file with thousands of lookup values,
processing need becomes a factor.
This is one area where the Index Match and Offset formulas have an advantage. Because these formulas
don’t reference the entire data set to perform the lookup calculation, they require less processing power
General note: in a similar way, you can use the AVERAGEIF and
AVERAGEIFS function to average cells based on one or multiple
criteria.
As everyone knows, Microsoft Excel provides an array of functions to perform various calculations with data.
A few articles ago, we explored COUNTIF and COUNTIFS, which are designed for counting cells based on a
single condition and several conditions, respectively. Last week we covered Excel SUMIF that adds values
meeting the specified criteria. Now it's time to go over the plural version of SUMIF - Excel SUMIFS that allows
summing values by multiple criteria.
Those who are familiar with the SUMIF function might think that converting it to SUMIFS takes just an extra
"S" and a few additional criteria. This would seem quite logical... but "logical" it's not always the case when
dealing with Microsoft : )
SUMIF function - syntax & usage
SUMIFS function - syntax & usage
How to use SUMIFS in Excel (AND logic)
Excel SUMIF with multiple criteria (OR logic)
Excel SUMIFS with multiple OR conditions
Using Excel SUM in array formulas
Excel SUMIF function - syntax & usage
SUMIFS(sum_range, criteria_range1,
criteria1,[criteria_range2, criteria2],...)
The first 3 arguments are mandatory, additional ranges and their associated criteria are optional.
When you're learning something new, it's always a good idea to start with simple things. So, to begin with,
let's define all the arguments for our SUMIFS formula:
sum_range - C2:C9
criteria_range1 - A2:A9
criteria1 - "apples"
criteria_range2 - B2:B9
criteria2 - "Pete"
Now assemble the above parameters, and you will get the following SUMIFS formula:
To refine the formula further, you can replace the text criteria "apples" and "Pete" with cell references. In this
case, you won't have to change the formula to calculate the quantity of other fruit from a different supplier:
=SUMIFS(D2:D10, C2:C10,">="&TODAY()-7,
C2:C10,"<="&TODAY())
Sum values
corresponding to blank =SUMIFS(C2:C10, A2:A10, "=", B2:B10,
cells that contain "=")Sum values in cells C2:C10 if the
"="
absolutely nothing - no corresponding cells in columns A and B are
formula, no zero length empty.
string.
And now, let's see how you can use a SUMIFS formula with "blank" and "non-blank" criteria on real data.
Suppose, you have an order date in column B, delivery date in column C and Qty. in column D. How do you
find the total of products that have not been delivered yet? That is, you want to know the sum of values
corresponding to non-empty cells in column B and empty cells in column C.
The solution is to use the SUMIFS formula with 2 criteria:
As you see, the first SUMIF function adds the quantities corresponding to "Mike", the other SUMIF function
returns the amounts relating to "John" and then you add these 2 numbers.
As you see, an array criteria makes the formula much more compact compared to SUMIF + SUMIF, and lets
you add as many values as you like in the array.
This approach works with numbers as well as with text values. For instance, if instead of the suppliers' names
in column C, you had supplier IDs like 1, 2, 3 etc., then your SUMIF formula would look similar to this:
=SUMPRODUCT(SUMIF(C2:C9, {"Mike","John","Pete"},
D2:D9))
=SUMIFS(D2:D9,C2:C9, "Mike",
E2:E9,">=10/1/2014", E2:E9, "<=10/31/2014") +
SUMIFS(D2:D9, C2:C9, "John", E2:E9,
">=10/1/2014", E2:E9, "<=10/31/2014") +
SUMIFS(D2:D9, C2:C9, "Pete", E2:E9,
">=10/1/2014" ,E2:E9, "<=10/31/2014")
As you see, you write a separate SUMIFS function for each of the suppliers and include two conditions - equal
to or greater than Oct-1 (">=10/1/2014",) and less than or equal to Oct 31 ("<=10/31/2014"), and then you
Many people wonder why use double dash (--) in SUMPRODUCT formulas. The point is that Excel
SUMPRODUCT ignores all but numeric values, while the comparison operators in our formula return Boolean
values (TRUE / FALSE), which are non-numeric. To convert these Boolean values to 1's and 0's, you use the
double minus sign, which is technically called the double unary operator. The first unary coerces TRUE/FALSE
to -1/0, respectively. The second unary negates the values, i.e. reverses the sign, turning them into +1 and 0,
which the SUMPRODUCT function can understand.
Note: the SUMPRODUCT function performs this calculation: (2 * 1000) + (4 * 250) + (4 * 100) + (2 * 50) =
3500.
data_field - The pivot table data field (ie. the value(s) in the center of the table)
that you want to retrieve
[field1], [item1], - Up to 126 optional pairs of fields and item names, (ie. The rows and
[field2], [item2], columns headers and individual categories) for which you want the
etc returned value.
Note: The item values should be entered as follows:
- Numbers can be entered directly
- Dates should be entered as date serial numbers or by using the date
function
- Times should be entered as decimals or by using the time function
- Text values should be entered in quotations
Note that, if the requested fields are not visible in the specified
Pivot Table, the Getpivotdata function returns the #REF! error.
The easiest way to input the Getpivotdata function is simply to type "=" into a cell and then click on the Pivot
Table value that you want to return. Excel automatically inserts the Getpivotdata function into the active cell.
DESCRIPTION
The Microsoft Excel DAVERAGE function averages all numbers in a column in a list or database, based on a
given criteria.
SYNTAX
The syntax for the Microsoft Excel DAVERAGE function is:
DAVERAGE( range, field, criteria )
Parameters or Arguments
range is the range of cells that you want to apply the criteria against.
field is the column to average the values. You can either specify the numerical position of the column in the
list or the column label in double quotation marks.
criteria is the range of cells that contains your criteria.
APPLIES TO
The DAVERAGE function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Based on the spreadsheet above, the following Excel DAVERAGE examples would return:
=DAVERAGE(A4:D8, 3, A1:B2)
Result: 3.995
=DAVERAGE(A4:D8, 2, A1:A2)
Result: 6.666667
Based on the spreadsheet above, the following Excel DAVERAGE examples would return:
=DAVERAGE(orders, 4, A1:B2)
Result: 30.44
To view named ranges: Under the Insert menu, select Name > Define.
DESCRIPTION
The Microsoft Excel DCOUNT function returns the number of cells in a column or database that contains
numerc values and meets a given criteria.
SYNTAX
The syntax for the Microsoft Excel DCOUNT function is:
DCOUNT( range, [field], criteria )
Parameters or Arguments
range is the range of cells that you want to apply the criteria against.
field is optional. It is the column to count the numeric values that meet the criteria. You can either specify the
numerical position of the column in the list or the column label in double quotation marks. If field is omitted,
the DCOUNT function will count all records that match the criteria.
criteria is the range of cells that contains your criteria.
APPLIES TO
The DCOUNT function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
TYPE OF EXCEL FUNCTION
The DCOUNT function can be used in Microsoft Excel as the following type of function:
Based on the Excel spreadsheet above, you could use the DCOUNT function as follows:
=DCOUNT(A4:D8, 3, A1:B2)
This would return the same results as the first example, except instead of using "Unit Cost" as the second
parameter we use 3 to specify the third position in the range A4:D8.
We could also omit the field parameter if we want to count all of the records that match the conditions in
A1:B2 (and we don't really care about counting numeric values in a particular field) as follows:
=DCOUNT(A4:D8, , A1:B2)
We could limit our criteria to only A1:A2 with the following DCOUNT function example:
=DCOUNT(A4:D8, , A1:A2)
Based on the Excel spreadsheet above, we could replace the range A4:D8 with the named range called orders.
Our DCOUNT function could be modified as follows:
=DCOUNT(orders, , A1:A2)
To view named ranges: Under the Insert menu, select Name > Define.
DESCRIPTION
The Microsoft Excel DCOUNTA function returns the number of cells in a column or database that contains
nonblank values and meets a given criteria.
SYNTAX
The syntax for the Microsoft Excel DCOUNTA function is:
DCOUNTA( range, field, criteria )
Parameters or Arguments
range is the range of cells that you want to apply the criteria against.
field is the column to count the values. You can either specify the numerical position of the column in the list
or the column label in double quotation marks.
criteria is the range of cells that contains your criteria.
APPLIES TO
The DCOUNTA function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Based on the spreadsheet above, the following Excel DCOUNTA examples would return:
=DCOUNTA(A4:D8, 3, A1:B2)
Result: 2
=DCOUNTA(A4:D8, 2, A1:A2)
Result: 3
Based on the spreadsheet above, the following Excel DCOUNTA examples would return:
=DCOUNTA(orders, 4, A1:B2)
Result: 2
To view named ranges: Under the Insert menu, select Name > Define.
DESCRIPTION
The Microsoft Excel DGET function retrieves from a database a single record that matches a given criteria. It
is ia worksheet function (WS).
SYNTAX
The syntax for the Microsoft Excel DGET function is:
DGET( database, field, criteria )
Parameters or Arguments
database is the range of cells that you want to apply the criteria against.
field is the column to retrieve. You can either specify the numerical position of the column in the list or the
column label in double quotation marks.
criteria is the range of cells that contains your criteria.
NOTE
If no record matches the criteria, the DGET function returns #VALUE! error.
If more than one record matches the criteria, the DGET function returns #NUM! error.
APPLIES TO
The DGET function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Based on the spreadsheet above, the following Excel DGET examples would return:
=DGET(A4:D8, 3, A1:A2)
Result: $3.50
=DGET(A4:D8, 4, A1:A2)
Result: $7.00
Based on the spreadsheet above, the following Excel DGET examples would return:
=DGET(orders, 4, A1:A2)
Result: $7.00
To view named ranges: Under the Insert menu, select Name > Define.
DESCRIPTION
The Microsoft Excel DSUM function sums the numbers in a column or database that meets a given criteria.
SYNTAX
The syntax for the Microsoft Excel DSUM function is:
DSUM( range, field, criteria )
Parameters or Arguments
range is the range of cells that you want to apply the criteria against.
field is the column to sum the values. You can either specify the numerical position of the column in the list or
the column label in double quotation marks.
criteria is the range of cells that contains your criteria.
APPLIES TO
The DSUM function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Based on the spreadsheet above, the following Excel DSUM examples would return:
=DSUM(A4:D8, 3, A1:B2)
Result: 7.99
=DSUM(A4:D8, 2, A1:A2)
Result: 20
Based on the spreadsheet above, the following Excel DSUM examples would return:
=DSUM(orders, 4, A1:B2)
Result: 60.88
To view named ranges: Under the Insert menu, select Name > Define.
Pmt
Select cell A2 and insert the PMT function.
Note: The last two arguments are optional. For loans the Fv can be
omitted (the future value of a loan equals 0, however, it's
included here for clarification). If Type is omitted, it is assumed
that payments are due at the end of the period.
Result. The monthly payment equals $1,074.65.
Rate
If Rate is the only unknown variable, we can use the RATE function to calculate the interest rate.
Nper
Or the NPER function. If we make monthly payments of $1,074.65 on a 20-year loan, with an annual interest
rate of 6%, it takes 240 months to pay off this loan.
We already knew this, but we can change the monthly payment now to see how this affects the total number
of periods.
Conclusion: if we make monthly payments of $2,074.65, it takes less than 90 months to pay off this loan.
Fv
And we finish this chapter with the FV (Future Value) function. If we make monthly payments of $1,074.65 on
a 20-year loan, with an annual interest rate of 6%, do we pay off this loan? Yes.
But, if we make monthly payments of only $1,000.00, we still have debt after 20 years.
Basic Description
The Excel FVSCHEDULE function calculates the Future Value of an investment with a variable interest rate.
The syntax of the function is :
Formulas: Results:
A B A B
2 5.0% 2 5.0%
3 3.5% 3 3.5%
4 3.5% 4 3.5%
5 3.5% 5 3.5%
#NAME? - Occurs when Analysis ToolPak add-in is not enabled in your Excel.
You will need to enable the add-in if you want to use the Excel Fvschedule function.
Description
Returns the interest rate for a fully invested security.
Syntax
INTRATE(settlement, maturity, investment, redemption, [basis])
IMPORTANT Dates should be entered by using the DATE function, or as results of other formulas or
functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are
entered as text.
The INTRATE function syntax has the following arguments:
Settlement Required. The security's settlement date. The security settlement date is the date after the
issue date when the security is traded to the buyer.
Maturity Required. The security's maturity date. The maturity date is the date when the security
expires.
Investment Required. The amount invested in the security.
Redemption Required. The amount to be received at maturity.
Basis Optional. The type of day count basis to use.
1 Actual/actual
2 Actual/360
3 Actual/365
4 European 30/360
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default,
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.
The settlement date is the date a buyer purchases a coupon, such as a bond. The maturity date is the date
when a coupon expires. For example, suppose a 30-year bond is issued on January 1, 2008, and is
purchased by a buyer six months later. The issue date would be January 1, 2008, the settlement date
would be July 1, 2008, and the maturity date would be January 1, 2038, which is 30 years after the
January 1, 2008, issue date.
Settlement, maturity, and basis are truncated to integers.
where:
o B = number of days in a year, depending on the year basis.
o DIM = number of days from settlement to maturity.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to
show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to
see all the data.
Data Description
$1,000,000 Investment
2 Actual/360 basis
DESCRIPTION
The Microsoft Excel IRR function returns the internal rate of return for a series of cash flows. The cash flows
must occur at regular intervals, but do not have to be the same amounts for each interval.
APPLIES TO
The IRR function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Values(0) = -7500
Values(1) = 3000
Values(2) = 5000
Values(3) = 1200
Values(4) = 4000
DESCRIPTION
The Microsoft Excel ISPMT function returns the interest payment for an investment based on an interest rate
and a constant payment schedule. This function was created for backwards compatibility with Lotus 1-2-3.
SYNTAX
The syntax for the Microsoft Excel ISPMT function is:
ISPMT( interest_rate, period, number_payments, PV )
Parameters or Arguments
interest_rate is the interest rate for the investment.
period is the period to calculate the interest rate. It must be a value between 1 and number_payments.
number_payments is the number of payments for the annuity.
PV is the loan amount or present value of the payments.
APPLIES TO
The ISPMT function can be used in the following versions of Microsoft Excel:
Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
TYPE OF EXCEL FUNCTION
The ISPMT function can be used in Microsoft Excel as the following type of function:
Worksheet function (WS)
9.00 Audit
9.01 Tracing precedent cells
Open a workbook called Auditing.
To see the auditing tools available, click on the Formulas tab and
look within the Formula Auditing section.
You see the results of the calculations, rather than the formula
displayed. Press CTRL + ` (grave accent), the table will then look
like this.
1
3
4
3
8
3
3
Page 204 of 219
should be able to select the picture which you
previously saved, then click the OK and then the
other OK button, and your image would now be
displayed in the cell you have chosen:
8
3
2. Part Two: A Cost Comparison of a Single Project Implemented Via Traditional Methods,
Subsequently Re-Implemented in PowerPivot
3. Part Three: Total ROI Analysis and Breakdown of How the Savings Are Achieved
Rearrange the Pivot and the Formula Just Does the Right Thing
For more details on this, see this article on how PowerPivot makes your formulas Portable.
And for more details on points 4-7 above, see this article on the Top Five Ways in Which PowerPivot Helps Excel
Pros.
4. Schedule it to regularly refresh itself with the latest data. You never have to touch it again,
unless you want to improve it.
Edit Links
On the Data tab, in the Connections group, click
the Edit links symbol to launch the Edit Links
dialog box.
Exercise