Spreadsheet Fundamentals: What If and The Function of The Cell

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46

Spreadsheet Fundamentals

Enhancing Readability | Ensuring Reliability | Building in Reusability | Adding Visual Representation of Data

Welcome to the wonderful world of spreadsheets! You are probably telling yourself that anyone who thinks spreadsheets are
wonderful should get a life, but the truth is that spreadsheet technology actually spawned the personal computer revolution.
People who had never before seen personal computers as having a value that could outweigh the cost of purchasing one, saw
the spreadsheet as the first tool that could actually pay back the cost of the machine. Why? Very simply, spreadsheets allow us
to automate the process of turning raw data into information.

WHAT IF AND THE FUNCTION OF THE CELL


Hear and see why spreadsheets were the killer app that spawned the PC revolution.

(Time 1:15)

What if and the function of the cell

Note: This video opens in a new window once clicked.

Want to know more?


VisiCalc was the first computer spreadsheet program as we know them today. If you want to know more about the history of
this application and why it changed computer history, visit the website of VisiCalc inventor, Dan Bricklin, at
http://www.bricklin.com/visicalc.htm. You can actually get a copy of VisiCalc you can run.

To illustrate, let's take an example that we can all relate to. Unless you are a close relation to Bill Gates, you probably have to
monitor the amount of money you spend each month in order to ensure that you spend less money than you make. The raw
data you have to work with is the amounts of money you earn and the amounts of money you spend each month. On the
simplest level, you can add the income and subtract the expenses and come up with how much you have left over to spend --
or save -- each month. Spreadsheets can perform this simple transformation of data into information, but they can also enable
you to track more complex items -- like the percentage of change in each budget category over time or the percentage of your
total income you spend in each area of your budget. They allow you to change your assumptions and see how these changes
impact your overall budget. They allow you to easily chart your expenses over time in order to have a graphical understanding
of your budget -- or to group and categorize your monthly expenses in one simple click. The possibilities are only limited by
your ability to define your information needs.

In this course, we will be exploring the many capabilities of Microsoft Excel, the most commonly used spreadsheet application
on the market, so that you will have a richer sense of how to turn data into information. The first week is focused on ensuring
that you have a strong grasp of the fundamentals. While you have probably developed spreadsheets in the past, this week's
tutorial will walk you through Best Practices of spreadsheet design so that you understand the features of professional
spreadsheets. We will cover the basics of Excel that enable us to ensure spreadsheets are readable, reliable, and reusable. Let's
take a look at the importance of each of these 3 R's.

Enhancing Readability

Take a look at the two spreadsheets below:

Spreadsheet 1:

Spreadsheet 2:
There is little difference in the data stored in these two spreadsheets, but there is a significant amount of difference in the
readability. While many spreadsheets are just created for the purpose of performing calculations or recording data, it is always
important to design the spreadsheet with readability in mind. Readability includes items such as differentiating header rows
from the rows that hold data. It includes adding a title, lining up numbers and using the same data format for all items in a
column. It includes sizing columns to fit the data that is stored. Excel 2007 provides a number of tools that make formatting
spreadsheets for readability relatively simple. This week's reading will introduce these tools and work through applying them to
spreadsheets examples.

As you work through these tools, think about why you want to take the time to make your spreadsheet readable. One primary
reason is that the features that make the spreadsheet readable also make it communicate clearly what information you are
including and why that information is important. The header row sets up an explanation of the data that is included in the
spreadsheet. Most spreadsheets grow over time. Having clear headings keeps the data elements you have selected clear and
memorable. Secondly, you never know when others will need to review -- or add to -- your spreadsheet. Readable
spreadsheets are made for sharing and enable others to understand the logic behind the data.

Ensuring Reliability

The most readable spreadsheet in the world is of no real value if it is not also reliable. Spreadsheets are used extensively in
developing calculations upon which business (and personal) decisions are made. So what happens when they go wrong? Below
are some instances of costly spreadsheet mistakes.

 Forecast sales of $55 million for planned new computer product. Forgot planned price discount on key components to
one supplier. Forecast was $8 million over. It was caught in time to prevent damage.
 End users shared diskettes containing old data. In one case, a person ordered 30,000 units of a $4 part; but the plan
had changed and the company only needed 1,500.
 A Midwestern firm's estimated taxes were $5,000 off from a correct paper and pencil value. The spreadsheet had an
incorrect formula for assessing salvage value.
 Two spreadsheets with 15,000 cells were used to project the market for CAD equipment. Numbers were rounded off to
whole dollars. But the inflation multiplier, which should have been 1.06, became 1. Without inflation, the market was
underestimated by $36 million.

(How personal computers can trip up executives. (1984, September 24). Business Week, pp. 94-102.

While we will work with more advanced formulas and spreadsheet functions in later weeks, it is critical that you approach each
spreadsheet with an eye for reliability. This week's reading presents a number of ways to ensure that your formulas are
accurate, but probably the most critical practice is to desk check your formulas. Desk checking means that you create a
formula, enter trial data, and then compare the result of the calculation to an expected result. Because it is so easy to copy
formulas from cell to cell in Excel, doing this preliminary desk check will enable you to verify the correctness of the data before
you have replicated an error over and over again. And to be even more certain that the calculations are correct, you can print a
spreadsheet with the formulas displayed and have another person double check them. In this week's reading, you will also
learn some fundamentals of spreadsheet design that you must understand in order to ensure that your spreadsheet does not
include costly errors.

Building in Reusability

Readable and reliable spreadsheets bring real value to businesses and personal decision-making. Designing spreadsheets for
reusability means that you include documentation to explain the purpose of the spreadsheet and its data, to provide
information about where the data came from, and to provide details about the date and author of the spreadsheet. Again, Excel
provides tools such as cell commenting and headers and footers to document the spreadsheet. Taking advantage of these tools
creates reusability. Have you ever opened a spreadsheet that someone else -- or even you -- created only to discover that you
have completely forgotten how you arrived at your calculations or where the data came from? Most of those who have designed
spreadsheet have experienced this at one time or another. Perhaps even worse is the problem created when an important
spreadsheet is designed without documentation by someone who then leaves the organization. Recreating the logic of the
spreadsheet can take almost as much time as it took to create the spreadsheet in the first place. By thoroughly documenting a
spreadsheet, you can avoid this kind of time loss and ensure that the spreadsheet you spent so much time developing is
reusable by you and by others.

Readability, reliability, and reusability are the foundations of spreadsheet design that ensures you can use the spreadsheet for
the bigger purpose -- for the purpose of analyzing data and making decisions based on that data. In addition to working
through these design fundamentals this week, we will also look at the first of the data analysis tools that this course focuses on
-- spreadsheet charting and graphing. Charting and graphing enable us to actually use the data in a table to understand trends,
differences, and relationships.

Adding Visual Representation of Data


Finding the Message and Delivering it Clearly
See how Karen, a Data Analyst, uses charts to make data easier to understand.

(Time 1:40)

Finding the message and delivering it clearly

Note: This video opens in a new window once clicked.

In Chapter 3 of the text, you will work through the charting and graphing tools in Excel. From a data analysis perspective, there
are three basic types of analysis that charts and graphs perform.

Use charts to show trends. One of the most common types of data analysis we do is showing trends. For example, suppose
you manage a Help Desk. One of your goals for the year is to reduce the number of tickets you receive by providing self-help
documentation. You export the call volume each day for the previous year from your Help Desk system into a spreadsheet. This
provides you with a baseline of data which you can use to compare ticket volume by month from last year to this year. By
adding a second trend line to track ticket volume for the current year, you transform the numeric data into a graphic that
allows you to track the trend:
Notice how the title and shading help to communicate the change that has occurred since Self-Help was rolled out.

Use charts to show differences. Another common type of analysis is to show differences between entities. Charts can also
help to analyze differences between component parts. Component parts can be any type of breakdown of a whole -- specific
regions of a company, types of sales items, parts of a product, and so on. If we wish to see a comparison of parts to the whole,
we can use Bar Charts or Pie Charts to visually analyze the differences. Let's stay with our Help Desk example. The Help Desk
has four types of tickets it tracks. When Self Help was rolled out, it was rolled out to help users who were having Login
Problems. Therefore, we may wish to see the difference in proportion of tickets for Login Problems after we rolled out the Self-
Help functionality. Here's a chart we might create:
Trend Lines and comparison charts are covered in detail in the text. There is one last type of charting that is used less
frequently, but is still a powerful type of analysis.

Use Charts to Show Relationships. Some charts, such as Scatter Charts and Radar Charts, allow us to see how one set of
data relates to another. Let's stay with our Help Desk analysis, only this time we want to see the relationship between customer
perception of Help Desk service before and after the rollout of Self Help. But in order to really understand the impact, we also
want to see the change in perception in relation to what users see as most important. We can use a radar chart to see the
relationship clearly:
This chart lets us see where we were, where we currently are, and what is really important to our customers. While we may
have been able to do this same type of analysis with other types of charts, the Radar Chart creates a very helpful visual to see
the relationship between these three parameters.

This week, you will be working with Spreadsheet Design as well as Charting and Graphing. The text will help you to go through
the steps in creating professional spreadsheets and charts, but knowing why and when to use these tools is just as important as
knowing how. In this week's Threaded Discussion, we will be discussing your experience with spreadsheets in order to gain
even more understanding of why spreadsheet design is so important in business today.

Note: These videos open in a new window once clicked.

Tutorial 1: Get to Know Excel 2007: Your First


Worksheet
Duration: 30–40 minutes
Your first worksheet
Tutorial 2: How to Create a Chart in Excel 2007
Duration: 30 - 40 minutes

Creating a chart

Excel Formulas and Functions


Excel Formulas | Taking Advantage of Excel Functions | Excel Applications

Last week, we focused on professional spreadsheet design (readability, reliability, and reusability), and we did our first data
analysis using charts. This week, we will take a deeper dive into the power of Excel as a calculator. If you are one of those who
never really loved math, Excel is an incredible tool that actually takes much of the pain out of math. If you can figure out what
you want to know, you can most likely make Excel do the lion's share of the mathematical work for you. Excel formulas take
advantage of the simple mathematical functions (addition, subtraction, multiplication and division), and Excel's over 240
functions are pre-programmed to write standard formulas, such as financial and statistical calculations, for you. Let's take a
look at Excel formulas and functions and see why they are really the lazy mathematician's friend.

Excel Formulas

In the simplest terms, you build Excel formulas by knowing what you want to know, providing the inputs you need, and then
letting Excel do the math work for you. Sound hard? Let's look at an example so that you can see how Excel really lessens the
work you have to do. Suppose you want to figure out your salary for a week. The data you need to figure this out is the number
of hours you worked and the rate of pay. These two numbers are called arguments in Excel terminology. They are simply the
information you (or any user) provide to Excel. To get to the output you want, you enter an equal sign to tell Excel you want to
complete a calculation and then create your formula, referencing the input cells. In this case, A2 is our Hour input cell, B2 is our
Rate input cell, and C2 holds the salary calculation, =A2*B2 and displays the output from that calculation:
This may not seem too impressive, but if you were calculating salary for thousands of employees, you would see the benefit
pretty quickly. You could simply enter the hours and rate and let Excel do all of the math for you.

In the real world, you would probably discover that these salary calculations are not quite as simple as this little table would
have us believe. At least one of those thousands of employees probably worked over 40 hours, and we need to make sure that
they are given overtime pay (time and a half) in addition to their base pay. As long as we know the rules for a calculation, we
can make Excel do all of the work for us.

Here's our spreadsheet with formulas displayed:

This employee will get paid $812.135:

Remember our thousands of employees? Once we have desk-checked our formula, we can copy it to each of the employees we
want to pay, and Excel will calculate all of their salaries as quickly as we can type in their base pay and hours.

But let's not stop. Excel allows us to simplify the calculation process even more as we gain more experience with the calculator
toolset. Unlike humans, Excel isn't even slowed down by complex formulas. We can consolidate the calculations into one
complex formula, as we do in cell F3 below:
Taking Advantage of Excel Functions

But what if we want Excel to figure out the hours and the overtime so we do not have to do this calculation on our own?
(Remember, Excel is the lazy mathematician's tool of choice.) We want Excel to look at the hours worked and decide for us how
to break them apart into straight pay and overtime pay.

Now we can harness Excel's built-in functions to do the work for us. One of Excel's over 240 functions is the IF function. This
function allows us to look at a cell and see if it meets a condition we have set.

Excel functions have several components -- a name (such as IF) and one or more arguments -- or required pieces of
information -- which are separated by commas. The IF function works like this:

Name: =IF

Argument one: Condition to be tested

Argument two: What Excel should do if the condition is true

Argument three: What Excel should do if the argument is not true

In this case, we want to look at the hours worked and decide if the hours are 40 or less. If they are 40 or less, then we just
need to pay the number of hours times the wage. Let's break down the logic a bit so we can tell Excel what we want it to do:

(1) Check to see if the hours worked are less than 40 (the condition).

(2) If the hours worked are less than 40 (our condition is true), pay the hours worked * the payrate = (hours* rate).

(3) If not, do the following:


(a) Pay 40 hours at the pay rate (40*rate).

(b) Calculate the overtime by taking the hours worked, subtracting 40, and multiplying by the rate times 1.5 (hours-40 * (rate
* 1.5)).

(c) Add straight time and overtime to come up with the total pay.

Here's what the formula will look like. (In this example, I named the Hour and Rate cells to make the formula a bit easier to
understand):

Now that may not have seemed easy, but once you have started practicing and using Excel formulas and functions, developing
even complex formulas like this one is not as difficult as it may seem in the beginning. Working through examples and different
scenarios is well worth the initial effort. Once this kind of a formula is developed and desk-checked (for reliability), it can be
copied and reused for infinite numbers of employees. You save large amounts of time and you add accuracy to work that might
easily introduce errors if done manually.

There is one other important value that Excel calculations bring to your work (or personal) life, and that is the ability to make
changes on the fly. Let's look at this concept in the context of the spreadsheet model we have been working on. Remember
that we have thousands of employees who need to get paid. We can reuse our formula by copying it into cells. As we copy it
from one cell to another, Excel automatically adjusts the cell reference so that as we move to the next person who needs to be
paid, we evaluate their hours and rate of pay to come up with their total for the week. This auto adjusting of formulas (called
relative cell references because it adjusts the reference based on the position of the formula in the spreadsheet relative to the
position from which it was copied). Therefore, our copied cells correctly reference the next record in the spreadsheet without
any changes being made to the formula:
In fact, once we have the names and rates of pay, we only have to go in each week and enter the new hours worked and we
have our payroll calculated automatically. But what happens if we change the algorithm for overtime pay. Instead of paying
time and a half, we decide to begin paying double time. We will have to go into each cell with the formula and change it to
reflect our new overtime rate. Excel has a solution for that as well. Instead of hard-coding the overtime rate by typing 1.5 into
our formula, we can use an absolute cell reference. By typing a dollar sign before our row and column reference, we can tell
Excel not to change the reference as we copy the formula:

Look what happens when we change the overtime rate to 1.75. Without any change to the cells we have referenced, all of the
calculations adjust:
In this week's readings, you will be learning about the formulas and functions you can use to get the most out of Excel's power
as a calculator. It is important to understand that you will not become a master at using these functions unless you practice
solving specific problems, working through the inputs needed to solve the problem and applying the various types of functions
that are available in Excel.

Functions in Excel
Overview of how functions act like an obedient retriever in developing Excel formulas.

(Time 3:09)

Functions in Excel

You are not alone...


Microsoft estimates that there are 40 million users of Excel. Because Excel is such a widely used tool, most of the problems
you are trying to solve have been problems for someone else at some time. Take advantage of the various help tools available
to you when learning how best to solve your problem. Want to find out how many workdays there are between today and the
next holiday? Need to figure out how to calculate the payments on a loan at a certain rate of interest? Try an Internet search
to see if you can locate the formula. What other kind of help is available to you as you work through developing Excel
calculations?
Excel Applications

Excel applications are an extension of the calculator concepts we worked through in the example above. The only difference is
that an Excel application is built to let a user -- you or others -- enter data and get immediate results. This is really not much
different from designing a calculation into a standard spreadsheet, but rather than a spreadsheet with multiple rows and
columns, you can design a spreadsheet with an input area and an output area. The user provides information in the input area,
and the spreadsheet provides the output. To illustrate, let's design a My Pay Calculator that will enable users to input their
hours and payrate and find out how much they will make for the week.

The basic functionality of an interactive application is the same as we worked through earlier. However, now we want to add
clear instructional labels to make it easy for the user to understand what data they need to input:

2. Add Data Validation. We want to make certain that the user adds correct data. We can use Excel's Data Validation tools to
tell the user what kind of data to add -- and we can even prevent them from adding incorrect information. In this example, we
want to prevent the user from claiming more than 80 hours in a week, since this is against company policy. We can add Data
Validation that requires the user to enter a number between 1 and 80 in the Hours input section. If they enter more than 80
hours, we can either warn them or stop them from proceeding:
3. Cell protection. We want to prevent our users from changing the labels or output cells. We can protect all of the cells except
those that we want the user to be able to change by Locking those cells and then by protecting the worksheet. When the user
tries to enter data into a Locked cell, they will be prevented from doing so.
4. Finally, we can create a Macro to automate tasks. A Macro is simply a set of steps that we record in Excel. We turn on the
Macro recorder, perform the steps, and then turn off the Macro Recorder. If, for example, we want to make it very easy for the
user to send their Pay Calculator to their boss, we can turn on the Macro recorder, perform the steps to send the spreadsheet in
an email, and then turn off the recorder. We can associate these steps with a button that will allow the user to click on the
button and email the spreadsheet.
When the user clicks the button, an email spawns -- ready to address and send off:
Remember that workbooks that include Macros should be saved with the xlsm filetype.  This filetype (Macro-Enabled Worbook)
is used any time a workbook includes Macro code. It was developed by Microsoft due to the security problems with Macros in
standard Excel files.

Chapter 10 of the textbook covers Macros.  Other useful materials are in Chapter 7, pages 475 - 476 (Data Validation) and
Chapter 4, page 248 - 250 (Cell and Worksheet Protection). 

Tutorial 1: Learn how to enter formulas


Duration: 50 minutes
Entering Formulas

Analyzing Data
Setting up an Excel Table  | Sorting Data | Filtering Data | Subtotals | Pivot Tables

This week, we’ll look at some tools we can use to help us manage and analyze large sets of data. Excel has always been able to
work with fairly large sets of data (in older versions, up to 256 columns [A-IV] and 65,536 rows), but with the 2007 version of
Office, it’s theoretically possible to use up to 16,384 columns [A-XFD] and 1,048,576 rows. Keep in mind that this is a
theoretical size. Large sheets are affected by your computer’s free memory and the speed of your processor, but it’s likely that
Excel will be able to handle many of your applications.

When you are dealing with small amounts of data, it is relatively easy to see key features. If you only have five rows of data,
for example, you can easily see which values are high, which are low, and so on. However, as the data set grows larger, it is
much more difficult to make sense of that data. This is where Excel's built-in analytical tools become really important. In week
one, we used one of those charting and graphing tools. This week, we will look at other tools that allow us to manage and
analyze data.

Setting up an Excel Table

We’ll start with a small data set to demonstrate how tools such as Sorting, Filtering, Subtotals, and Pivot Tables can help us
analyze our data. As we learned in week one, with any set of data, how you organize the spreadsheet is the key. Set up your
spreadsheet with Fields in each column and Records in each row. Do NOT leave blank rows or columns in your data set – it
might look nice for formatting purposes, but it will mess up sorting and filtering your information. Keep the field names short
and sweet – one word is better – you can always add a Comment to each cell containing the field names to help explain what is
entered in each column. Finally, it’s best to experiment before you enter in too much data. You want to make sure you know
how you want to analyze your data before you spend too much time entering the information. Save early and often!

In order to demonstrate some of Excel’s data analysis tools, we will start with a small table of records for used cars. A table is
simply a set of contiguous records. Our fields of information will include the Make, Year, Color, and Price of each car:

Sorting Data

The first analysis tool we will use on this data is a sort. Sorting the data will allow us to rearrange the data in an order that will
help us get different views of the data in our table. Suppose we want to see the most expensive to least expensive of our
vehicles. We can sort the data in just a few clicks. We can even add multiple sort levels that will break ties between the data.
For example, if we want to see all vehicles sorted in order by Color, Make, Year, and Price, we can do that as easily. By
applying a little formatting to the cells, we can easily view the sorted data quite clearly.

Before you begin sorting data, it’s a good idea to make sure you can get the data back to the original order. It’s always smart
to back up your file before you make changes, so save your file with a different name. For example, if you have a spreadsheet
called Cars.xlsx, save the file under the name, Cars_v2.xlsx. This way, you can always go back to the original file if you need
to.

Another tip is to add an additional Field (Column) to keep track of the original sequence. You can do this by clicking on column
A to select the column, right click on A, and choose Insert. Type in the numbers 1, 2, and 3 in cells A4:A6, highlight these cells
(A4:A6) and double click on the Fill Handle to extend the series for your records. Excel will automatically number the cells
sequentially. By providing a reference number, you can always go back and resort the data into its original order.
Filtering Data

Sorting data is a good way to look through your records, but with a large set of data, you’ll spend all your time scrolling
through the records rather than analyzing what you need. A good way to narrow down your focus is to Filter the records.
Suppose we wanted to look at just the Blue colored cars in our table. We can add a filter, which allows us to select the records
we want to see based on the criteria we have identified. When we add a filter to a table, Excel 2007 displays a small filter next
to the column that is filtered so that it is easy to see that we are viewing filtered data.

If we want to remove the filter and see all of the records, we can click on the Filter box and Select All. Or we can filter for
multiple options, such as both Blue and red vehicles, or we can filter for multiple criteria, such as all Black Dodge cars. Filtering
is a powerful tool that enables us to view only the data we need at any given time.

Subtotals

Another important tool for analyzing your data is to use subtotals. Suppose we want to find out the Average Price of all the cars
of a certain Make or Color. Without subtotals, we’d have to sort and filter our data, type in many =AVERAGE( ) formulas, and
spend a long time completing our analysis. Instead, we can use Excel’s subtotal feature to do the work for us.

Any time you subtotal your list of records, you must SORT it first by the field/column you want to create the subtotals for. If
you don’t sort the list properly, you’ll still get subtotals, but it breaks each time the values in the column change, so you’ll get a
mess.  Just remember, SORT FIRST, SUBTOTAL SECOND (if you don’t believe it, try this yourself – sort by Price and try
subtotaling by Make – you’ll have a mess).

So for our example, we’ll sort by Make, and then add Subtotals by Make. We’ll show both the average Year and Price:
The subtotals function can be used to provide averages within a group of data, or it allows us to do totals (What is the total
value of each Make of car?) or counts (How many vehicles of each Make do we have?), and a variety of other different types of
summaries. We can also just view the subtotal data as an outline without the detail, so we can see only the averages without
viewing all of the records in our Table:
Pivot Tables

An even more powerful tool for analyzing data is the Pivot Table. Pivot tables allow us to count, summarize, and average data a
variety of ways. Because Pivot Tables give you a lot of flexibility for analyzing data, they can be a little overwhelming to set up
for the first time. The best advice is to save your work before you start, and just try experimenting. You can always undo your
work if things go wrong. Pivot Tables are similar to Subtotals in that they are used to summarize data. What makes them so
powerful is that they allow you to group data by multiple categories and then create a summary chart. For example, suppose
you want to know the total value of your inventory summed up by Make and Color. To do this, you can create a new table -- a
Pivot Table -- then grab and summarize your vehicle's average value by Make and Color:

Pivot Tables then give us the ability to easily modify our groupings. Maybe we want to see the vehicles grouped by year. We
can just turn off the Color Row heading and replace it with Year. Or suppose we want the Sum rather than the average. We just
change the settings in our table and the data changes. What is most important in using Pivot Tables is that when we start
looking at the data pivoted and summarized, we can get ideas about what other information might be important to us. And as
the amount of data becomes larger and larger, the ability to quickly group and summarize becomes more important.

Think about sales data. You have thousands of records of sales for your company, which you have pulled into a spreadsheet.
Each sale record includes a date, a region, a sales person, a suggested sale price, and an actual sale price. By pivoting the
data, you can evaluate which region made the most sales. You can look at how a reduced sale price impacted sales over time.
(Were more of the items sold? Less?). You can see by region which salespersons are most active and which items are most
popular. Change the category and see if sales change over time. Is there a better month for a product? The possibilities for
pivoting and summarizing data are endless.

In this week's reading, you will learn how to create Pivot Tables and use the other tools for Viewing and Summarizing data. But
in this week's discussion, we will focus on the type of questions we can ask and answer using Excel's Data Analysis tools.

Tutorial 1: Organize your data by using an Excel table

Data Tables
Tutorial 2: Get started with PivotTable reports in Excel 2007
Duration: 20-30 minutes
PivotTable

Tutorial 3: Filter PivotTable report data in Excel 2007


Duration: 20-30 minutes
Reports

Tutorial 4: Calculate data in PivotTable reports in Excel 2007


Duration: 20-30 minutes

Calculating Data

Integrating Office Applications


Pasting from Excel | Mail Merge | Importing Data into Excel
We have been looking at using Excel as a data analysis tool, and you have been seeing how we can use its power to perform
calculations and to analyze data. However, when we wish to report the results of our analysis to others, we typically want to
report them in the form of documents or presentations. Moving data from Excel into other applications is our focus this week.
We will first look at moving raw Excel data into Word documents and PowerPoint presentations, and then we will focus on using
Mail Merge to customize Word documents by drawing on data from within Excel.

Pasting from Excel

In Office 2007, the ability to move data from Excel into other Office applications is as simple as copying the data you wish to
use and pasting it. Because of Excel's ability to track numbers and perform calculations, you will typically use Excel to hold your
numerical data. However, when you want to present that data in a request or a proposal, you simply need to copy and paste
the original data. Let's say you are developing a request for capital to fund a project. In this case, you must report the exact
amount of money you wish to spend in addition to providing your justification. Here's the data you will assemble in Excel:
To move this into the document that justifies the expenditure, you simply select the appropriate cells, use Ctrl-C to copy, and
then use Ctrl-V to paste the cells into your Word document:
Additionally, you may need to justify the expense by making a presentation. Again, you can insert Excel data into a PowerPoint
slide in order to use this data for a presentation. Note that Office applies the same design to the data as used in the rest of the
slide show:
Mail Merge
Moving data between applications is relatively straightforward. A bit more complex is actually integrating data from two Office
applications. Mail Merge is a great example of this type of integration. In business today, there are many reasons to send out
letters, reports, and or memos to employees or customers. An efficient way to accomplish this task is to use both Excel and
Word. Imagine if you have a large number of people to send the same memo to; it does not make sense to type a separate
memo for each person, rather you can type the memo once and let Excel and Word add the names, addresses, and other
information to the memo. Let’s see how this might work.

STEP 1: Create a contact list in Excel. Last week, you learned how to set up an Excel table. Using this knowledge, you can
set up a table to hold all the names and addresses of individuals or companies you wish to send your memo to. All your data
must be in a single worksheet. If you have data in different workbooks or worksheets you can either merge that data into a
single sheet or do more than one merge.

To ensure your mail merge will work correctly, the field names in your Excel table must begin in the top left corner of your
worksheet. In the example above, that is cell A1. Notice there is a header row in the example shown here. You must add a
header row to represent the data each column holds. This is optional; however it does make the merge operation easier.

STEP 2: Merge Excel contact list and Word document

To import the data from your Excel table, you will open your existing memo or create a new memo. Once you have your memo
open, select the Mailings command tab on the Ribbon. 

Select Start Mail Merge groups, and click on Start Mail Merge. Then choose the document type. Since you are merging your
Excel data into a memo, you should select Letters.
Next, you will need to select the data type you wish to import. Since you have your data in an Excel table, you will click on
Select Recipients and then select Use Existing List:
You will be asked to locate your Data Source. Since your Excel Contact list will be the Data Source, you will browse to the
appropriate folder on your hard drive to locate the Excel file with your contacts:

Word will locate the Workbook and display the names of the worksheets in that workbook. Select the worksheet that holds your
contact list. (Note: Naming the worksheet can make this step easier.)
Now, let's add an address to each letter we want to produce. If you added headings to your worksheet as we did in our
example here, make sure you select First row of data contains column headers checkbox. Select Insert Merge Field from the
Write & Insert Fields ribbon.
You can continue writing your document and adding fields from Excel where needed. You can place the merge fields in your
document wherever you need them. Finally, click the Finish & Merge button on the ribbon.
You can either merge to the printer, which will allow you to print each document with the fields from your Excel file, or you can
merge all of the documents into a new file so that you can edit each one individually. You can now preview the document with
the Merged data:
STEP 4: Create Mailing labels. Now that you have your memo created, you will need to mail them out to your recipients. You
can use the same Excel data table to create the mailing labels. On the Mailings tab in the Start Mail Merge group, select Start
Mail Merge and click on labels. In the Label Options dialog box, you can select the type of label you would like to use. Word will
then create a document consisting of the label you choose and the data from your Excel data table. You can then print them.

Importing Data into Excel

Before we move on, we need to discuss one last component of integration that is frequently used. Since much of the data that
we need to analyze resides in other applications, such as enterprise information systems, financial applications, or even the
web, Excel provides tools to import that data into spreadsheets so we can use the analytical power of Excel to analyze that
data. Let's go back to the example of our contact list. Suppose the contact list for our company resides in a database. We want
to get a file of current customers from the database and use that list for our Mail Merge. Many databases actually allow the data
to be exported in Excel format, but if that is not the case, we can usually import data as a text file and then import that data
into Excel. This data must follow some basic rules. It must be organized with one record on each line, and then you must
separate each field in a predictable way. One type of separation includes creating each field a set width (which is called a fixed
width file), and the other is to separate each field with a delimiter. The most common type of delimiter is commas, but some
text files use tabs or even spaces between fields.
Once you understand the type of file you are dealing with, you can use the Data Menu to get data from that file by using the
Data Ribbon and the Get External Data tab. Here's our contact list as a Comma Delimited text file. Notice how each record is on
one line, and each field is separated with a comma:

To import this file into Excel, we create a new workbook and then select the Data Ribbon:

Select the From Text option, locate your data source text file, and Excel will go through a 3-step wizard to import the data.

Step 1: Verify the Data Type. Excel will make a guess as to whether the data is Fixed Width or Delimited.
Step 2: Select the Delimiter. You may have multiple delimiters or just one. Excel will provide you a sample of the spreadsheet
set up as you apply delimiters:

Step 3: Verify the Data Type for each field. When you are done, click Finish, select the location to begin the import, and the
data will be imported.

In this week's discussion, we will discuss how and why Excel data can be shared between various applications and how data in
other applications can be imported into Excel.

Tutorial 1: Using mail merge feature during holidays.


Mail merge

Consolidating Data and What-If Analysis


Consolidating Data | Lookup Tables | What-If Analysis | One Variable Data Tables | Two Variable Data Tables |
Scenarios

This week, we will look at two final ways we can use spreadsheets to manage and analyze data. We will first look at
consolidating data from multiple spreadsheets, and then we will look at performing What-If Analysis using Data Tables and
Scenarios.

Consolidating Data

In previous weeks, we have worked with single worksheets. There are times, however, when we will want to keep multiple
worksheets with related data. For example, think about a teacher who has multiple sections of a class. Each class has the same
assignments and exams, but she needs to record them separately. She can use multiple worksheets, each with the same
format, headings, point values, etc. by creating a worksheet group. When worksheets are grouped, all of the data she enters
into one sheet is automatically replicated to all of the sheets in the group.

During the semester, the instructor enters grades for each of her students into the appropriate worksheet. This gives her a
section-by-section view of each class's progress. If she later wants to compare the results for the multiple class groups, she can
use a Summary Worksheet to consolidate her data. She might want to see the average, minimum, and maximum grades on an
exam across class sections, for example. By using 3-D cell reference, she can consolidate data from multiple worksheets.

Notice the efficiency she gains as she sets up her course spreadsheets using Worksheet Groups:
Each of the subsequent spreadsheets can include the baseline information -- headers, formatting, formula for calculating the
final grade, and the analysis section at the bottom. Rather than having to create each of the subsequent sheets from scratch,
she can create a worksheet group by selecting the sheet name and holding the CTRL key while she selects the rest.

She can also create a summary spreadsheet that can gather information from each of these sheets and give her the ability to
summarize and compare the performance of each group. All of the Data in the Summary Sheet is pulled from the data in each
class section. Therefore, each term she can create a new set of data and perform the same comparative analysis as the term
progresses:
Lookup Tables

One additional functionality that can help manage data in a multi-sheet Workbook is a Lookup Table. In this example, grades
for all class sections are based on a common percentage. The instructor can create a single table with those percentages and
then use a Lookup function to compare the student's percentage to the grade chart and calculate the final grade. While this
could be done with a very long nested IF statement, lookup tables are a much more eloquent way to look up a value based on
another value. Here's the Grade Table, which is placed on the Documentation Sheet at the beginning of the workbook:
Using this table, we can compare each student's grade to the percentage in the Grade Table and determine which percent that
grade falls into. The VLOOKUP function has the following arguments:

Argument 1: Compare Value. What value in this sheet should be evaluated? In this case, we want to evaluate the student's
final percentage.

Argument 2: Table Array. Which set of rows and columns (table) holds the data I want to compare the student's score to?
Because this is a VLookup (or Vertical Lookup) function, Excel will automatically compare the value from the first argument to
the value in the first column of the table.

Argument 3: Column Index Number. This argument tells Excel where to find the information that will be pulled into the cell with
this formula. In this case, we want to pull the data held in the second column (column 2 in our table) into the Grade field.

Argument 4: Range Lookup. This argument has a True/False argument. The default is TRUE. This argument lets us specify
whether we want an exact match between our Compare Value and our Lookup Table (False) or an approximate match. In this
case, we want an approximate match. Let's think through how this works. Suppose the student received 72 as an average.
Excel looks at the table and sees that 72 is larger than the first value, 0. Excel looks at the next value to see if 72 is larger than
60. Excel looks at the next value to see if 72 is larger than 70. Excel looks at the next value to see if 72 is larger than 80.
Because the number falls between 70 and 80, Excel matches the range of 70 - 80 with the student score and puts a C in the
grade column.

Here's the formula:


Notice how we use absolute referencing for the Table location which never changes. We use relative referencing for the
Compare Value which is different for each row of the spreadsheet.

Excel in Action
"One challenge my department faces is managing the software licensing for our multiple locations. We send
Excel templates to each location. This way we are sure that we get the data we need in a pre-defined
format, so we can combine the information for our corporate software licensing renewals. Excel has made
life a whole lot easier."

Nancy LaChance
Dir. of Academic Computing, DeVry University
What-If Analysis

This week, we will also be looking at What-If Analysis. In addition to the functionality we experienced using our Excel calculator,
we can take advantage of several tools Excel provides to do What-If Analysis. To illustrate, let's take a look at planning a dream
vacation to Hawaii. What-If analysis begins with setting up a set of data. Within that set of data, there will be multiple
dependencies. For example, our trip to Hawaii will include airfare for all of the travelers. It may later be possible to change the
number of travelers. Therefore, we want to split apart the cost of airfare from the number of travelers. Later we will be able to
change the number of travelers and see how that impacts the overall cost of the trip. We can set up a budget for lodging, new
clothes, food, and entertainment based on the number of days or nights we are staying. The total cost of the trip will vary
depending on how many days we stay in Hawaii -- and perhaps the amount of money we allocate. In the end, our starting data
may look something like the following:
One Variable Data Tables

Now that we have a starting point, we can do What-If Analysis. Maybe we did some research and found out that hotel costs can
vary from $99 per night to $350 per night. Excel has a tool that will enable us to see the impact of changing this one variable.
A one-variable Data Table from the What-If Analysis Group on the Data Ribbon will allow us to enter varying hotel costs and
view the impact of this change on the overall trip cost and the weeks it will take to save for this trip:
Two Variable Data Tables

We can take this analysis one step further and look at what will happen if we vary both the hotel costs and the number of days
we stay. In this case, because we are varying two of our items, we can create a Two-Variable Data Table. In a Two-Variable
Data Table, we can only look at the impact on one item, so let's look at how changing the hotel cost (the Column Values) and
number of days (the Row values) will impact the overall trip cost:
Scenarios

You can also use Scenario Manager to perform a What-If Analysis on your data. Suppose you want to analyze three different
Trip Options. Option One is Long Trip, Sleep on the Beach. In this option, you make the trip last for 10 days, but you remove
the Hotel Costs. Option two is Short Trip, High Living. In this option, you have a four-day stay, but you select the most
expensive hotel and plan on spending $125 per day on food and entertainment. Option three is the Go It Alone plan. In this
case, you stay five days and leave the spouse at home (which also eliminates Pet Care costs). Scenario Manager allows you to
define each of these options and then create a Summary that will show the Total Cost of the trip under each Scenario:
As you can see from this example, Excel's What-If analysis tools can really help you to look at your data from various
perspectives and see what will happen if you make changes to that data. In this week's reading, you will see how this type of
analysis can be used to evaluate business situations. By the end of this lesson, you should be able to see the value of turning
data into variables in order to look at how changes in the data will impact business results.

You might also like