Professional Documents
Culture Documents
Excel Tutorial For Windows - Final
Excel Tutorial For Windows - Final
The purpose with this Excel tutorial is to illustrate some Excel tips that will dramatically improve your efficiency. N
attempt has been made to be as encyclopedic as some of the 800-page Excel books available. The focus here is on
common tasks, not every last thing you can do in Excel. Also, this tutorial presumes that you have some Excel
knowledge. For example, you should know about rows and columns, values, labels, and formulas, and other basic
Excel elements. If you know virtually nothing about Excel, you should probably work through an “Excel given to yo
book and then work through this tutorial.
dramatically improve your efficiency. No
el books available. The focus here is on
resumes that you have some Excel
s, labels, and formulas, and other basic
ably work through an “Excel given to you”
Home Ribbon
Insert Ribbon
Formulas Ribbon
Data Ribbon
Review Ribbon
View Ribbon
Developer Ribbon
Customize Ribbon dialog box
Backstage view in Excel 2016
QAT
10 13 7 9
1 9 12 7
5 4 1 1
6 12
15 2
13 4 10
3 3 9 6 Cutting 2 3
4 1 7 4
2 3 3 6
2 1 3 9
5 1 6 7
4 2 6 6
3 5 1 4
9 2
1
4 9
7 6
2 3
8 5
3 9
10 7 70
6 9
4 9
5 1
2 8
8 10
10 7
7 8 56
2 1
10 2
4 1
4 5
3 8
7 8
7 8 56
2 1
10 2
4 1
4 5
3 8
7 8
6
28
18
27
42
36
4
Paste Special types
When you do a "regular" paste with Ctrl+v or one of the equivalent methods discussed
in the Copying and Pasting topic of this tutorial, several things are pasted to the paste
range:
(1) if a copied cell has a value or text, it is pasted;
(2) if a copied cell has a formula, the formula is pasted, adjusted for relative and
absolute addresses;
(3) the number formatting of any copied cell is pasted;
(4) other formats of the copied cell, including font, background color, and border, are
pasted. This is what you expect, and this is why you usually use Ctrl+v or an equivalent
method to paste.
However, Excel contains many paste variations in its Paste Special options. One of the
most common is to copy formulas and paste them as values, but there are quite a few
other options.
Pasting Special as Values
You often have a range of cells that contain formulas, and you would like to replace
the formulas with the values they produce. Usually, you paste these values over the
copy range, that is, you overwrite the formulas with values. However, it is also
possible to select another range for the paste range. This is totally up to you.
Copy the range with formulas with Ctrl+c, and select the range where you want to
paste the values, often the same as the copy range. Then select the Paste dropdown
on the Home ribbon, and select one of the "Paste Values" options in the third row of
icons. Alternatively, press Ctrl+Alt+v to open the Paste Special dialog box and select
one of the "Values" options.
Try it! Copy the top gray range to the right and paste it over itself as values. Then
check that the paste range contains values, not formulas.
Try it again! Copy the bottom gray range to the right and select a cell in column O for
pasting. Then hover the mouse over the three "Paste Values" options in the third row
of Paste Special icons. You should see clearly how they differ. Eventually, click the one
you prefer.
Here is something interesting about the examples you just tried. In the first example,
it doesn't matter which of the three icons in the third row you choose. The gray
background and dollar formatting are retained because they start this way, and
pasting special doesn't change them. However, in the second example, when you
paste the bottom gray range to a range that starts with plain formatting, it does
matter which "Paste Values" option you choose.
Shortcut tip: If you paste values over formulas frequenty, as many users do, there is a
quick keyboard shortcut you might want to memorize. It is actually based on the
menu system from Excel 2003, but it still works fine. First, press Ctrl+c to copy. Then
press Alt+e and then s to open the Paste Special dialog box. Finally, press the Down
Arrow key twice and then Enter to choose Values option. Here is the entire keystroke
sequence. With some practice, you'll be able to do it in your sleep!
Try it! The gray range to the right contains formulas and various formatting. Paste
these formulas to column O, but don't paste the formats. Again, it is instructive to copy
the formulas, select a cell in column O for pasting, and hover the mouse over the
options in the first row of the Paste Special icons to see their differences.
One rather long way to do this is to select the range, press Ctrl+c, select the paste
range, and select either the first icon from the fourth row of the Paste Special icons or
the Formats option from Paste Special dialog box.
However, a quicker alternative to this method, and one that you should definitely use,
is to use the Format Painter button next to the Paste dropdown, shown to the right.
Select a cell with the format you want to copy, click the paint brush, and click a cell (or
drag a range) that you want to format. Note that if you double-click the paint brush,
you can copy the format multiple times. Press the Esc key when you are finished.
Try it! Copy the formats (numbers formats, font, background, and border) in column K
to column M. Don't copy the values, just the formats. Then enter some values in
column M to check that the formatting is correct.
Paste Special: Multiplying (or Adding, Subtracting, Dividing) by a Constant
Sometimes you would like to multipy each number in a range by a constant. For
example, if you have revenues expressed in thousands of dollars, you might want to
multiply each value by 1000 so that they are expressed in dollars. Fortunately, you do
this without any formulas!
Enter the constant in a blank cell, and copy this cell. Then select the range of values to
multiply and select Multiply from the Paste Special dialog box.
This same method can also be used to add, subtract, or divide by a constant. However,
note that you do need to do this from the Paste Special dialog box. These options
aren't available on the Paste icon gallery.
Try it! Multiply each value in the range to the right by 1000. Then restore them to their
original values by dividing each value by 1000. Notice that no formulas are involved;
the numbers simply change. So once you are finished, you can delete the multiplier
from the cell where you entered it.
Often you set up a spreadsheet and then decide that you would rather have a portion
of it transposed. That is, you would like to “turn it on its side,” so that rows become
columns and vice versa. This is simple with one of Excel’s Paste Special options.
To transpose a range:
Copy a range that you want to transpose with Ctrl+c. Then select the upper left cell of
the range where you want the transposed version, click the Paste dropdown, and
select the Transpose option circled to the right. Alternatively, you can click Paste
Special to open the Paste Special dialog box, and then select its Transpose option.
Make sure there is enough room for the transposed version. For example, if the
original range has 3 rows and 5 columns, the transposed version will have 5 rows and 3
columns. If you select cell D5, say, as the upper left cell for the transposed version,
everything in the range D5:F9 will be overwritten by the transposed version.
Try it! Transpose the range K19:O23 to a range with upper left cell K25. Note that the
gray cells contain formulas. Do the corresponding pasted cells still have formulas? Are
they still correct? Does the number formatting get pasted? What about other
formatting?
Transposing a Range with the TRANSPOSE Function
A more advanced way of transposing a range is with Excel's TRANSPOSE function. This
a special kind of function that is used only in an array formula. An array formula
operates on a whole range at once. More information about array formulas is provided
in the Array Formulas topic in this tutorial.
1. Select the entire range where you want the result to go. For example, if you are
transposing a range with 3 rows and 5 columns, select a blank range with 5 rows and 3
columns for the result.
Try it! Use the TRANSPOSE function, starting in cell K40, to transpose the range to the
right. After you press Ctrl+Shift+Enter, look at the formula bar. You will see that there
are curly brackets around the formula. You do not actually type these curly brackets.
They simply indicate that this is an array formula.
At least for this example, the TRANSPOSE function method has a couple of
disadvantages. First, the formatting is lost. Second, you will see a 0 in the upper left
cell of the transpose range. This is because the upper left cell of the copied range is
blank. Unfortunately, you can't delete this 0 (although you could paint it white). The
result of TRANSPOSE comes as a "package," and you can't delete or move any part of
the package; you can only delete or move the whole thing.
However, there is one place where the TRANSPOSE function is really useful, namely,
when you perform matrix multiplication (which is discussed in the Array Formulas
topic of this tutorial). Then you often need to use TRANSPOSE so that the matrix
multiplication is well-defined. For example, you aren't allowed to multiply a 3x1
column by a 3x3 matrix. But you can multiply a 1x3 row (the column's transpose) by a
3x3 matrix.
Paste dropdown
Value Formula
$132 $192 $324 324 $648
$282 $128 $410 410 820
$285 $266 $551 551 1102
$230 $129 $359 359 718
$111 $296 $407 407 814
$211 $191 $402 402 804
$190 $251 $441 441 882
$132 $192 $324
$282 $128 $410
$285 $266 $551
$230 $129 $359
$111 $296 $407
$211 $191 $402
$190 $251 $441
Format painter
$47.65
$44.20
$37.68
$31.34
$89.36
$68.15
$28.57
147
173
217
178
120
203
137
217
153
Ctrl+Home: go to cell A1
Ctrl+Arrow Key: move in the direction of the arrow to the last nonblank cell (if the
next cell is nonblank) or to the next nonblank cell (if the next cell is blank)
Page Down or Page Up: move one screen down or one screen up
Alt+Page Down or Alt+Page Up: move one screen to the right or one screen to the
left
End: turns "end" mode on, and then arrow keys work just like with Ctrl+Arrow
Keys listed above
Shift+Arrow Key: extend the selection by one cell in the direction of the arrow
Ctrl+Shift+Arrow Key: extend the selection to the last cell nonblank cell in the
direction of the arrow
Ctrl+Shift+Home: extend the selection to the beginning (cell A1) of the worksheet
Ctrl+Shift+End: extend the selection to include all used cells below and to the right
of the active cell
Ctrl+c: copy
Ctrl+x: cut
Ctrl+v: paste
Ctrl+Alt+v: open the Paste Special dialog box (if clipboard is nonempty)
Ctrl+c: copy
Ctrl+x: cut
Ctrl+v: paste
Ctrl+Alt+v: open the Paste Special dialog box (if clipboard is nonempty)
Formatting
F4: enter dollar signs for an absolute address (or keep pressing to cycle through
relative/absolute possibilities)
Ctrl+a: display the Function Window after starting a formula and typing a function
name
Shift+F3: display the Insert Function dialog box (same as clicking the f x button)
Ctrl+Shift+Enter: enter a formula as an array formula (e.g., when using MMULT for
matrix multiplication)
Ctrl+F3: open the Name Manager dialog box
Ctrl+Shift+Enter: enter a formula as an array formula (e.g., when using MMULT for
matrix multiplication)
Miscellaneous
F2: display the formula in a selected cell (instead of looking the Formula bar)
Ctrl+Enter: press after entering something in a cell to stay in the same cell (This
shortcut combination can also be used to copy; see the Copying and Pasting
worksheet.)
Alt+Enter: press while entering text in a cell to force a new line (for long labels)
Alt+o, then r, then h to hide rows Hide and Unhide items fro
Alt+o, then r, then u to unhide rows
Alt+o, then c, then h to hide columns
Alt+o, then c, then u to unhide columns
press Alt+e and then d (e for edit, d for delete).
press Alt+i and then r (i for insert, r for row).
Hide and Unhide items from Home ribbon
Sorting
Simple Sorting with A-Z or Z-A A-Z and Z-A buttons on Data ribbon
Sorting the Correct Range
Custom Sorts
Sorting Text
Creating a Custom List for Sorting
Creating a Custom List for Sorting
Person Age
1 35
2 61
3 35
4 37
5 32
6 33
7 65
8 45
9 40
10 32
11 57
12 38
13 37
14 42
15 38
16 48
17 40
18 57
19 44
20 40
21 21
22 49
Order Time
1 Morning
2 Evening
3 Evening
4 Afternoon
5 Evening
6 Morning
7 Afternoon
8 Afternoon
9 Afternoon
10 Morning
11 Evening
12 Morning
13 Afternoon
14 Morning
15 Afternoon
16 Morning
17 Afternoon
18 Afternoon
19 Afternoon
20 Evening
21 Morning
22 Morning
23 Morning
24 Morning
25 Morning
A buttons on Data ribbon
Relative Referance
Absolute Refrence
Mixed Referance
51 94 15 7
37 6 2 41
13 83 29 88
73 64 46 32
38 11 3 80
Operation On Formula
Profit model
Unit printing cost $0.10
Unit mailing cost $0.15
Variable cost of printing and mailing $0.25
Number mailed 100000
Response rate 3%
Number of responses 3000
Watch window
SUM(Range)
Table of costs for units produced in one month (along side)
for use in another month (along top)
Total cost
Average( Range)
Student ID xam score Average (only for students who took the exam)
1533 68
8031 74
9859 80 Average (giving 0s to students who were absent)
9106 63
3535 72
8192 Absent
6102 85
6774 70
7558 64
314 72
9082 81
2397 75
2517 80
2432 73
6016 63
5269 80
4847 88
6537 71
9922 73
4525 71
1491 71
7897 68 Product
4088 82
166 76
7925 75
6405 81
802 76
2931 83
7625 67
2628 67
5417 92
7804 72
3994 69
394 85
8847 78
7855 81
8668 Absent
3738 77
5534 70
6965 71
8863 69
8762 73
6466 60
6100 76
1878 74
5970 67
9691 62
8666 77
4865 91
6198 81
8554 87
6753 76
9574 77
3891 81
8186 Absent
1306 73
6835 83
3136 59
4938 74
4807 74
4421 78
Total cost $47,500
Student IDExam score With 0s Average (only for students who took the exam)
1533 68 68 74.75862
8031 74 74
9859 80 80 Average (giving 0s to students who were absent)
9106 63 63 71.08197
3535 72 72
8192 Absent 0
6102 85 85
6774 70 70
7558 64 64
314 72 72
9082 81 81
2397 75 75
2517 80 80
2432 73 73
6016 63 63
5269 80 80
4847 88 88
6537 71 71
9922 73 73
4525 71 71
1491 71 71
7897 68 68 Product
4088 82 82 1.83E+09
166 76 76
7925 75 75
6405 81 81
802 76 76
2931 83 83
7625 67 67
2628 67 67
5417 92 92
7804 72 72
3994 69 69
394 85 85
8847 78 78
7855 81 81
8668 Absent 0
3738 77 77
5534 70 70
6965 71 71
8863 69 69
8762 73 73
6466 60 60
6100 76 76
1878 74 74
5970 67 67
9691 62 62
8666 77 77
4865 91 91
6198 81 81
8554 87 87
6753 76 76
9574 77 77
3891 81 81
8186 Absent 0
1306 73 73
6835 83 83
3136 59 59
4938 74 74
4807 74 74
4421 78 78
Intro To Chart
Month Sales
Jan-13 $8,627 Sales
Feb-13 $5,343 $10,000
Mar-13 $6,244 $9,000
Apr-13 $9,451 $8,000
May-13 $6,698 $7,000
Jun-13 $6,752 $6,000
Jul-13 $5,985 $5,000
Aug-13 $5,586 $4,000
Sep-13 $8,476 $3,000
Oct-13 $9,191
$2,000
Nov-13 $7,242
$1,000
Dec-13 $8,277
$0
Jan-13 Feb-13 Mar-13 Apr-13 May-13 Jun-13 Jul -13 Aug-13 Sep-13
Month Sales2
Jan-13 $8,627 $8,452 Monthly Sales of Two Pro
Feb-13 $5,343 $6,801 $12,000
Mar-13 $6,244 $5,497
$10,000
Apr-13 $9,451 $10,329
May-13 $6,698 $5,995 $8,000
Jun-13 $6,752 $8,103
$6,000
Jul-13 $5,985 $6,386
Aug-13 $5,586 $5,047 $4,000
Sep-13 $8,476 $8,641
$2,000
Oct-13 $9,191 $10,696
Nov-13 $7,242 $6,914 $0
Dec-13 $8,277 $9,004 Jan-13 Ma r-13 May-13 Jul -13
Col umn D Sa l e
$10,000
$8,000
Monthly Sales of Two Products
$12,000
$10,000
$8,000
$6,000
$4,000
$2,000
$0
Ja n-13 Ma r-13 May-13 Jul -13 Sep-13 Nov-13
Sal es 1 Sal es 2
4 Switching the Roles of Rows and Columns and Changing the Chart Type
Monthly Sales of T
$1,200,000
$1,000,000
Month Sales1 Sales2 Monthly Sales of T
Jan-13 $8,627 $845,200 $1,200,000
Feb-13 $5,343 $680,100
$1,000,000
Mar-13 $6,244 $549,700
Apr-13 $9,451 $1,032,900 $800,000
May-13 $6,698 $599,500
$600,000
Jun-13 $6,752 $810,300
Jul-13 $5,985 $638,600 $400,000
Aug-13 $5,586 $504,700
$200,000
Sep-13 $8,476 $864,100
Oct-13 $9,191 $1,069,600 $0
Nov-13 $7,242 $691,400 Jan-13 Mar-13 May-13
Dec-13 $8,277 $900,400 Sa l es 1
6000
5000
4000
3000
2000
1000
0
1 2 3 4 5 6
Col umn D Col umn E Col umn F Col umn G
7 Scatter Charts
0
58 60 62 64 66 68 70
Sales
4 66 68 70 72 74 76 78
Chart Title
oduct2Product3Product4Product5Product6
Jan-13 Feb-13
COUNT,COUNTA,COUNTBLANK
COUNT(Value1, Value2,…Value[n])
COUNTBLANK(range)
COUNTA(Value1, Value2,...Value[n])
The COUNT function counts all of the cells in a range with numeric values. The
COUNTA function counts all nonblank cells in a range. For example, if cells A1, A2,
and A3 contain Month, 1, and 2, respectively, then =COUNT(A1:A3) returns 2,
whereas =COUNTA(A1:A3) returns 3.
77
57 Number who were absent
67
90
77
83
71
75
72
82
68
86
77
68
86
80
81
84
71
76
81
99
72
78
67
89
70
77
83
74
87
75
86
77
73
74
79
80
77
72
77
71
70
68
79
75
80
73
61
62
68
92
85
77
79
86
83
83
76
89
72
69
66
71
80
61
COUNTIF, SUMIF, AVERAGEIF
COUNTIF(range, criteria)
AVERAGEIF(range, criteria)
SUMIF(range, criteria)
IF functions are very useful for performing logic, and they vary from simple to
complex. A few typical examples are illustrated here.
For each product, if the en
To enter a basic IF function: enough units are ordered t
Enter the formula =IF(condition,expression1,expression2), where condition is any units of that product are o
condition that is either true or false, expression1 is the value of the formula if the
condition is true, and expression2 is the value of the formula if the condition is
false. Product
1
A simple example is =IF(A1<5,10,“NA”). Note that if either of the expressions is 2
text, as opposed to a numeric value, it should be enclosed in double quotes.
3
Try it! Enter appropriate IF formulas in columns M and N. (Scroll to the right for 4
answers.)
Try it! Use a nested IF function to get the grades in column M. (Scroll to the right
for answers.)
Try it! Use an IF function with an AND condition to fill in the gray range for selling
to the right. Make sure you use double quotes for text. (Scroll to the right for
answers.)
The key to writing (and reading) such complex formulas is to pay careful attention Examples
to the parentheses. Fortunately, Excel helps you by color-coding pairs of
parentheses. From now on, pay close attention to this color coding. You will come =IF(B15>=10,"Bonus","Slac
to depend on it! =IF(AND(B15>=10,C15<=3)
=IF(OR(B15>=10,C15<3),"B
Business
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
OSCM1
For each product, if the end inventory is less than or equal to 50 units,
enough units are ordered to bring stock back up to 200; otherwise, no
units of that product are ordered
Each student gets an A (if score is 90 or above), S for satisfactory (if score
is 60 or above but less than 90) or U for unsatisfactory if score is below 60
Score Grade
70
95
55
80
60
90
Investor sells stock only if its price has gone up three consecutive days
(including the current day)
Any student who scores at least 95 on any of the exams gets a bonus
which is 1% of their total score.
Examples
=IF(B15>=10,"Bonus","Slacker")
=IF(AND(B15>=10,C15<=3),"Bonus","Slacker") Bonus
=IF(OR(B15>=10,C15<3),"Bonus","Slacker") Slacker
The TRUE, FALSE section can also be a cell references or additional formulas
Days Between IF AND OR
Vchr Entry and Bonus / Bonus / Bonus /
# of VoucherPayment User Slacker Slacker Slacker
5 2 Jim Ignatowski
13 5 John Locke
8 5 Kim Bauer
33 4 Liz Lemon
14 3 Lorelai Gilmore
25 2 Lynette Scavo
5 3 Maddie Hayes
2 3 Matt Saracen
15 4 Monica Bing
12 3 Natalie Teeger
7 3 Niles Crane
11 3 Norm Peterson
1 3 Phil Dunphy
2 1 Phillip J. Fry
27 4 Red Forman
15 1 Robert Barone
VLOOKUP(value,lookup_table,column #,TRUE or FALSE)
Lookup Tables and VLOOKUP Function (Lookup & Reference Category) Student
1
Lookup tables are useful when you want to compare a particular value to a set of
values, and depending on where your value falls, return the appropriate result. 2
For example, you might have a tax table that shows, for any income, what the 3
corresponding tax is. There are two versions of lookup tables, vertical (VLOOKUP) 4
and horizontal (HLOOKUP). Because they are virtually identical except that
vertical goes down and horizontal goes across, only the VLOOKUP function is 5
discussed here. Besides, VLOOKUP is used much more frequently than HLOOKUP. 6
The VLOOKUP function takes three arguments plus an optional fourth 7
argument: 8
9
1. The value to be compared
2. A lookup table, with the values to be compared always in the left column
3. The column number of the lookup table where you find the “answer” Order #
4. TRUE or FALSE (which is TRUE by default if omitted) 1
That is, the general syntax is: 2
3
=VLOOKUP(value,lookup_table,column #,TRUE or FALSE) 4
The optional fourth argument requires some explanation. The default value, 5
TRUE, indicates that you are looking for an approximate match; you don't 6
necessarily expect to find your exact lookup value in the lookup table. In this 7
case, the first column of the lookup table must be in ascending order. However, if
the fourth argument is FALSE, this indicates that you are looking for an exact 8
match in the first column of the lookup table. In this case, it doesn't matter
whether the first column is in ascending order or not. However, the function will
return an error if no exact match can be found.
The most common use of a lookup table is when you want to see where a value
fits in a range of values. Then the fourth argument can then be omitted because
its default value is TRUE. For example, suppose you want to assign letter grades
to students based on a straight scale: below 60, an F: at least 60 but below 70, a
D; at least 70 but below 80, a C; at least 80 but below 90, a B; and 90 or above,
an A. The lookup table to the right (columns O and P) shows how you would set
this up. The comparison column in the lookup table starts at 0 (the lowest grade
possible) and then records the cutoff scores 60 through 90.
Looking Up a Value in a Range (an Approximate Match)
The most common use of a lookup table is when you want to see where a value
fits in a range of values. Then the fourth argument can then be omitted because
its default value is TRUE. For example, suppose you want to assign letter grades
to students based on a straight scale: below 60, an F: at least 60 but below 70, a
D; at least 70 but below 80, a C; at least 80 but below 90, a B; and 90 or above,
an A. The lookup table to the right (columns O and P) shows how you would set
this up. The comparison column in the lookup table starts at 0 (the lowest grade
possible) and then records the cutoff scores 60 through 90.
Try it! For the orders to the right, create a lookup table in columns O and P, and a
copyable VLOOKUP formula in column M. Assume there is quantity discount
pricing: for orders less than 300 units, the unit price is $3.00; for orders of at least
300 units but less than 400, the unit price is $2.50; for orders of 400 units or
more, the unit price is $2.00. (Scroll to the right for the answer.)
In the examples above, it wouldn't make sense to look for an exact match
because there usually isn't one. For example, a typical score such as 67
does not exactly match any of the values in the first column of the lookup
table. However, there are many cases when it does make sense to look for
an exact match. Then there are three things to remember. (1) The fourth
arguments is not optional; it must be FALSE. (2) The first column of the
lookup table doesn't have to be in ascending order; it can be, but order
doesn't matter. (3) If no exact match exists, the function returns an error.
Try it! Use a VLOOKUP function in column M to find the gradepoints for
each student, using the lookup table in columns O and P. What happens
with Williams? (Scroll to the right for the answers.)
Note that the grades in column O of the lookup table are in the “natural”
order, but they are not in Excel’s A-Z sort order. Therefore, FALSE must be
entered as the fourth argument in the VLOOKUP function. Try it with the
fourth argument TRUE to confirm that you get incorrect results.
Score Grade Lookup table Character Show
67 D 0 F Carlton Lassiter
72 60 D Dale Cooper
77 70 C David Addison
70 80 B Dexter Morgan
66 90 A Dr. Elliot Reid
81 Dr. Gregory House
93 Edmund Blackadder
59 Eric Cartman
90 Fox Mulder
George Costanza
Units sold Total cost Gloria Pritchett
373 Hank Hill
475 Harold T. Stone
459 Harry Solomon
441 Homer Simpson
238 Hurley Reyes
349 Jack Bauer
344 Jack Malone
203 Jeff Greene
Jim Ignatowski
John Locke
Kim Bauer
Liz Lemon
Lorelai Gilmore
Lynette Scavo
Maddie Hayes
Grade Gradepoints Grade Gradepoints Matt Saracen
B A 4 Monica Bing
A- A- 3.7 Natalie Teeger
C+ B+ 3.3 Niles Crane
B- B 3 Norm Peterson
B+ B- 2.7 Phil Dunphy
A C+ 2.3 Phillip J. Fry
C C 2
D C- 1.7
Character Show Student Grade Letter Grade
Maddie Hayes Moonlighting Russ Geller 98
Sam Malone Cheers Sheldon Cooper 79
David Addison Moonlighting Dexter Morgan 72
Adrian Monk Monk Red Forman 93
Jeff Greene Curb Your Enthusiasm Harold T. Stone 64
Norm Peterson Cheers Shawn Spencer 92
Matt Saracen Friday Night Lights Jim Ignatowski 70
Barney Stinson How I Met Your Mother John Locke 91
Bill McNeal NewsRadio Bill McNeal 96
Harry Solomon 3rd Rock from the Sun Adrian Monk 68
Kim Bauer 24 Lynette Scavo 51
Gloria Pritchett Modern Family Robert Barone 94
Jack Bauer 24 Sam Malone 74
George Costanza Seinfeld Homer Simpson 53
Phil Dunphy Modern Family Dr. Elliot Reid 89
Lynette Scavo Desperate Housewives Bob Kelso 55
Hank Hill King of the Hill Dr. Gregory House 79
Veronica Mars Veronica Mars Dale Cooper 98
Walter White Breaking Bad Hurley Reyes 95
Shawn Spencer Psych Lorelai Gilmore 63
Bob Kelso Scrubs Harry Solomon 57
Monica Bing Friends Hank Hill 91
Harold T. Stone Night Court Carlton Lassiter 95
Carlton Lassiter Psych Barney Stinson 97
Eric Cartman South Park Walter White 97
Mark Green ER Matt Saracen 70
Red Forman That '70s Show George Costanza 55
Phillip J. Fry Futurama Jack Malone 89
Robert Barone Everybody Loves Raymond Carlton Banks 77
Benjamin Linus Lost Veronica Mars 90
Fox Mulder The X Files Jack Bauer 79
Jack Malone Without A Trace Kim Bauer 84
John Locke Lost Jeff Greene 56
Jim Ignatowski Taxi Norm Peterson 52
Homer Simpson The Simpsons Eric Cartman 94
Edmund Blackadder Blackadder Natalie Teeger 55
Carlton Banks The Fresh Prince of Bel-Air David Addison 54
Dr. Elliot Reid Scrubs
Russ Geller Friends
Dale Cooper Twin Peaks
Natalie Teeger Monk
Dr. Gregory House House, M.D.
Dexter Morgan Dexter
Hurley Reyes Lost
Lorelai Gilmore Gilmore Girls
Niles Crane Frasier
Liz Lemon 30 Rock
Sheldon Cooper The Big Bang Theory
No. Grade Letter Grade
0 F
60 D-
64 D
67 D+
70 C-
74 C
77 C+
80 B-
84 B
87 B+
90 A-
94 A
97 A+
Gradepoints
3
3.7
2.3
2.7
3.3
4
2
#N/A
Williams's grade
Williams's grade (D)
(D) isn't
isn't in
in the
the
lookup table, so an error results.
lookup table, so an error results.
LN,EXP,RAND,RANDBETWEEN,CONCATENATING,ABS,SQRT,INT,ROUND
LN function
1023 0.7 1 0 -40
EXP function
1 -4 2.3 0 15
Rand
RandBetween
Concatenating
Ampersand CONCATENATE
Bob E Jones
Stephen C Davis
Andy T Thompson
John F Wilson
Kathy C Fredericks
Karen D Williams
Tom T Smith
Peter F Jennings
Ted R Benson
Jason E Samson
ABS function
6 -50 0
SQRT function
64 0.5 -20 0
INT function
1.7 -3.2 14 -7
ROUND function
100.35 14325 16.3467 154432 0.3569
0 -2 2 -3 1
Min, Max
Sales rep Allison Baker Jones Miller Smith Taylor
Jan sales $3,700 $2,400 $2,300 $3,000 $3,800 $3,700
Feb sales $2,600 $2,200 $2,400 $2,800 $3,600 $2,300
SUMPRODUCT(range1,range2),
Total cost
Forth Highest 70
Forth Lowest 46
106
Text to Columns button on Data ribbon
606,360,516,1757,371
1631,1337,1260,1855,2823
904,749,486,1852,1612
2463,1324,1889,2597,312
1256,1839,1745,244,1508
2159,2917,1699,1351,974
1084,2379,1791,1933,507
1686,2454,1954,256,1068
1274,2330,2334,343,255
303,2128,578,824,1714
2989,2317,2196,642,2812
1743,2122,2428,871,2701
2817,2330,1217,407,327
894,1893,1963,1641,2533
2747,1952,243,2832,1487
358,2674,1660,1006,1249
1032,939,2172,2112,347
2639,2489,2905,412,2877
730,696,639,454,1591
1774,2506,2690,2498,2407
2406,493,1457,1317,2993
1359,894,2281,2454,1239
2847,1432,381,1518,941
1597,313,1231,596,702
2838,2547,846,868,1753
2049,558,201,1034,351
1395,1314,1004,489,275
2628,2596,1901,2114,381
1439,1574,2318,277,1202
918,2177,621,1777,2106
867,2906,2844,2173,1370
2314,236,1387,1586,1106
1316,1475,1791,1494,2405
1006,795,1804,861,979
Function text Function
11/13/2018 MONTH
11/13/2018 DAY
11/13/2018 YEAR
RICKY PONTING LEFT
RICKY PONTING RIGHT
RICKY PONTING MID
RICKY PONTING TRIM
RICKY PONTING FIND
11/13/2018 TEXT
X Y CONCATINATE
ISBLANK
11/13/2018 ISTEXT
45 ISNUMBER
20.33 ROUND
20.33 ROUNDUP
20.33 ROUNDDOWN
20.33 FLOOR
20.33 CEILING
RICKY PONTING REPLACE
riCkY PonTinG PROPER
riCkY PonTinG UPPER
Function syntex Output
MONTH(G3) 11
DAY(G4) 13
YEAR(G5) 2018
LEFT(G6,5) RICKY
RIGHT(G7,7) PONTING
MID(G8,4,5) KY PO
TRIM(G9) RICKY PONTING
FIND("P",G10,1) 7
TEXT(MONTH(G11),"mmmm") January
CONCATENATE(G12,H12) XY
ISBLANK(H13) 1
ISTEXT(G14) 0
ISNUMBER(G15) 1
ROUND(G16,1) 20.3
ROUNDUP(G17,1) 20.4
ROUNDDOWN(G18,1) 20.3
FLOOR(G19,1) 20
CEILING(G20,1) 21
REPLACE(G21,1,3,"ABC") ABCKY PONTING
PROPER(G22) Ricky Ponting
UPPER(G23) RICKY PONTING
Text Function
Original Number
Right( text, [number_of_characters] ) 10
LEFT( text, [number_of_characters] ) 10
MID (text, start_num, num_chars) 10
TRIM ( TexT) 10
10.25
Jones, Bob Bob Jones 10.25
Davis, Stephen 1/1/2009
Thompson, Andy 1/1/2009
Wilson, John 1/1/2009
Fredericks, Kathy 1/1/2009
Williams, Karen 1/1/2009
Smith, Tom 1/1/2009
Jennings, Peter 1/1/2009
Benson, Ted 1/1/2009
Samson, Jason 1/1/2009
TODAY
Full n Length Comma Space First name Last name
Jones, Bob
Davis, Stephen
Thompson, Andy
Wilson, John
Fredericks, Kathy
Williams, Karen
Smith, Tom
Jennings, Peter
Benson, Ted
Samson, Jason
Yes
Yes
Yes
No
Yes
Yes
Flash Fill
Has Excel become a mind reader with the new Flash Fill tool introduced in Excel
2013? You might think so after you read this topic. However, it's not really about
mind reading but rather about the ability to recognize patterns.
Specifically, Flash Fill allows you to parse names, numbers, or dates without any
formulas if the items in your list follow a recognizable pattern.
Method 1. Try it! Type the first name in the top row: Bob in cell L7. Then select
Flash Fill from the Fill dropdown on the Home ribbon. Pretty amazing, isn't it? Now
you could repeat with the other columns. Note that right after doing a flash fill,
you get a mini dropdown that provides several options, such as undoing the flash
fill.
Method 2. Try it! Type the middle initial and period in the top row: E. in cell M7.
Then start typing the next initial in the second row: T. in cell M8. Pretty soon, Excel
will guess the pattern and show it for all rows in light font, at which time you can
press Enter to accept the results. Again, you could now repeat with the other
columns.
Method 3. Try it! Type the last name in the top row: Jones in cell N7. Then with
any gray cell in column N selected, use the Flash Fill shortcut key combination,
Ctrl+e. Now repeat this method for the other columns.
By the way, as you do any of these, you might see text appear in row 6, not just in
the gray range. This is because Flash Fill is also parsing the Names to parse label in
cell K6!
Results for a typical name
Roberts, Julie T. Julie T. Roberts Julie Roberts Julie T. Roberts JTR
Names to parse
Jones, Bob E. Bob E. Johnes
Davis, Stephen T.
Thompson, Andy S.
Wilson, John T.
Kelley, Jennifer B.
Williams, Karen S.
Smith, Tom F.
Jennings, Peter R.
Benson, Ted A.
Samson, Jason T.
21
Date And Time Function
The value
The valuein
incell
cell AF8
AF8 was
was
formatted to
formatted to show
show time
timeonly,
only,
notdate
not date and
and time.
time.
F8 was
8 was
timeonly,
time only,
Average, Median,Percenrile, Quartile, Mean, Variance, Standard Deviation
Average AVERAGE(RANGE)
Median MEDIAN(RANGE)
Percentiles PERCENTILES(RANGE)
Variance VAR(RANGE)
Standaed DeviSTDV(RANGE)
Quartiles QUARTILES(RANGE)
Data 1 Data 2
0 1034.44 Average Mean
0 877.35 Median Variance
0 794.42 Standard deviation
0 828.45 Quartiles
0 765.9 Q1 792.79
1 1088.95 Q2 965.18
1 786.05 Q3 792.79
1 1523.02
1 920.48 Percentiles
1 777.23 P01
1 1247.63 P05
2 1117.87 P10
2 1157.3 P25
2 641.35 P50
2 520.49 P75
2 586.68 P90
3 952.22 P95
3 878.36 P99
3 1582.12
3 807.99
3 913.13
3 1051.65
3 628.44
3 651.86
3 843.55
4 1233.37
4 1036.55
4 543.17
4 866.31
4 883.25
4 1285.68
4 650.44
4 1412.4
4 1105.44
4 671.55
4 1077.21
5 1471.87
5 1362.55
5 1044.37
5 601.52
5 1256.48
5 1069.69
5 407.54
5 1609.11
5 1141.03
6 972.54
6 851.91
6 1324.67
6 1061.09
7 809.91
7 655.81
7 1224.02
7 1105.52
7 1102.63
7 342.62
7 642.01
7 762.48
9 945.73
9 1431.55
9 695.66
9 871.12
10 827.21
10 1468.62
11 863.17
11 582.4
12 919.07
12 1314.83
12 1418.85
13 909.82
13 1086.11
14 620.14
14 668.74
14 598.66
14 1175.09
14 1139
15 1369.23
15 618.31
15 693.67
16 1341.85
16 1479.33
16 477.41
17 962.29
17 686.64
18 1495.96
18 1101.87
19 1018.6
19 1027.43
21 921.99
22 868.49
22 856.14
24 724.87
27 1345.72
29 1127.91
31 1467.66
33 918.88
35 997.56
36 965.11
38 1059.32
41 1157.35
45 1116.73
1410.39
786.62
1477.32
1328.5
753.26
905.17
821.06
1052.57
926.89
579.01
873.54
1100.79
727.32
718.17
948.09
866.89
684.5
1391.63
678.82
961.36
1023.22
851.44
1247.63
1373.37
1177.79
929.79
690.18
736.95
1293.14
1134.24
1316.3
1440.09
1249.47
787.9
1320.84
1263.38
1212.95
1081.63
1214.14
1367.41
1579.93
1405.68
965.25
1081.01
713.61
1033.28
999.4
361.42
721.3
1052.62
1094.3
937.92
1217.14
225.9
707.88
856.16
949.8
1510.56
1234.83
1147.42
820.95
1049.69
915.41
862.87
1017.05
763.08
978.67
1357.03
1279.62
1361.16
952.66
523.33
1375.14
545.6
847.12
1464.07
1113.21
1292.26
634.98
651.65
602.12
1367.6
891.63
1197.37
1355.34
904.44
1638.89
1325.24
892.26
1553.37
697.54
1127.03
854.27
810.98
902.46
623.26
952.45
853.4
1029.52
1172.72
1 2.5 2.5
2
3
4
5
6
7
28
Average 10.27
Median 7
Quartiles
Q1 3.75
Q2 7
Q3 14.25
Percentiles
P01 0
P05 0.95
P10 1
P25 3.75
P50 7
P75 14.25
P90 22.2
P95 33.1
P99 41.04
CORREL and COVAR Functions (Statistical Category)
If there are two columns of data that are matched in a particular way, such as
monthly sales of two company products, it is often useful to see how they are
related. If one is unusually large, does the other tend to be unusually large or
does it tend to be unusually small? The statistical measure for this is correlation, Month
and it can be calculated with the CORREL function. A correlation is a number
between -1 and +1. If the correlation is positive, the two sets of numbers tend to Jan-09
vary in the same direction. If one is small, the other tends to be small; if one is Feb-09
large, the other tends to be large. Exactly the opposite is true if the correlation is
negative. In this case, the two sets of numbers tend to vary in opposite directions. Mar-09
The magnitude of the correlation indicates the strength of the relationship Apr-09
between the two sets of numbers. There is a strong relationship (positve or May-09
negative) if the correlation is close to -1 or +1. The relationship is much weaker,
or nonexistent, if the correlation is close to 0. Jun-09
Jul-09
To calculate a correlation between two sets of numbers: Aug-09
Enter the formula =CORREL(range1,range2), where range1 and range2 contain Sep-09
the two matched sets of numbers. Oct-09
Nov-09
Try it! The data to the right represent monthly sales of three products. Calculate
the indicated correlations in column Q. (Scroll to the right for the answers.) Dec-09
Jan-10
There is a similar function COVAR for calculating covariances. A covariance is a Feb-10
correlation multiplied by the product of the two variables' standard deviations.
Because a covarance is affected strongly by the units in which the variables are Mar-10
measured, such as dollars versus thousands of dollars, it is not as easy to Apr-10
interpret as a correlation.
May-10
Note: Two new functions, COVARIANCE.S and COVARIANCE.P, were added in Jun-10
Excel 2010. COVARIANCE.P (P for population) is identical to the old COVAR Jul-10
function, which still works fine. Its denominator is n, the sample size. In contrast,
COVARIANCE.S (S for sample) uses denominator n-1. However, no new CORREL Aug-10
function was required. Sep-10
Oct-10
Nov-10
Dec-10
Jan-11
Feb-11
Mar-11
Apr-11
May-11
Jun-11
Jul-11
Aug-11
Sep-11
Oct-11
Nov-11
Dec-11
Jan-12
Feb-12
Mar-12
Apr-12
May-12
Jun-12
Jul-12
Aug-12
Sep-12
Oct-12
Nov-12
Dec-12
Jan-13
Feb-13
Mar-13
Apr-13
May-13
Jun-13
Jul-13
Aug-13
Sep-13
Oct-13
Nov-13
Dec-13
Jan-14
Feb-14
Mar-14
Apr-14
May-14
Jun-14
Jul-14
Aug-14
Sep-14
Oct-14
Nov-14
Dec-14
Jan-15
Feb-15
Mar-15
Apr-15
May-15
Jun-15
Jul-15
Sales1 Sales2 Sales3 Correlations
800 1750 640 Sales1 vs Sales2
1360 2970 280 Sales1 vs Sales3
1150 2370 230 Sales2 vs Sales3
940 2010 410
740 1690 290
1090 2590 460
780 1640 760
910 2100 840
990 1620 760
800 1790 710
1200 2320 690
1150 2090 640
880 2170 530
870 1640 640
870 1980 560
760 1360 980
1010 2110 880
820 1740 570
1140 2040 650
730 1940 600
1150 2000 540
690 890 1130
1210 2480 600
1080 2050 660
1420 2840 330
1230 2490 710
1170 2330 610
1140 2540 840
560 1750 1010
910 2490 950
1260 2930 150
1050 2500 390
1020 2240 440
760 1630 420
710 1380 880
1000 2000 660
940 2200 630
1270 2510 510
1370 2610 560
1050 2180 620
1110 2590 470
1170 2160 580
990 2020 480
1040 1870 300
1350 2590 540
820 1440 520
860 1870 620
1190 2640 460
910 1980 590
950 2290 510
820 1850 550
770 1710 610
810 1480 720
1370 2820 770
940 2360 540
1020 1940 420
930 1900 800
1110 2520 660
1230 2320 610
1080 2240 990
890 1840 530
970 1940 520
920 2510 480
1000 2360 370
1250 2400 380
1280 2490 640
790 1760 450
940 2000 290
1140 2570 460
1020 2760 370
1060 1680 560
1130 2000 60
1050 2270 710
1380 2350 660
770 1410 800
860 2410 360
1130 1980 700
1350 2960 300
920 2320 380
Correlations
Sales1 vs Sales2 0.776112
Sales1 vs Sales3 -0.31274
Sales2 vs Sales3 -0.41242
INDEX Function (Lookup & Reference Category)
The INDEX function is useful for finding the value in a particular cell of a
rectangular range. You access this value by the indexes of the cell you want.
Specifically, you specify a row index and a column index. For example, if the range
has 10 rows and 20 columns, the indexes 4, 8 indicate the 4th row and 8th
column of the range.
For example, the formula =INDEX(D11:F20,4,2) refers to the value in cell E14, the
cell in the 4th row and 2nd column of the range.
Plant 1
City 2
Unit shipping cost
MATCH Function (Lookup & Reference Category)
The MATCH function is handy for finding a cell in a range that matches a given
value. It is often used in the following situation. Suppose you have a decision
variable such as order quantity that needs to be chosen to maximize profit. You
enter some formulas that link order quantity to profit. Then you create a data
table that finds the profit for a number of possible order quantities. The MATCH
function lets you locate the order quantity in the data table with the largest
profit.
Enter the formula =MATCH(value,range,0). This returns the index of the cell in
range that matches value. For example, if the match occurs in the third cell of the
range, this returns 3. The last argument, 0, indicates that you want an exact
match. If there is no exact match, the formula returns an error. (Actually, the
MATCH function can also look for an inexact match by using a +1 or -1 for the
third argument. You can look up the details in online help.)
The top example to the right indicates how MATCH can be used in conjunction
with INDEX. Imagine that a profit model has led to the table shown, where each
order quantity listed leads to the corresponding profit. For this small example, it
is obvious that the largest profit is $5,640, corresponding to an order quantity of
300. However, if inputs (not shown here) that drive the profit model change, the
best order quantity and the corresponding profit could change. You want
formulas in the two gray cells to show the best profit and best order quantity
regardless of where they appear in the table.
Try it! The table to the right shows the profit for each order quantity (along the
side) and each unit stockout cost (along the top). Enter copyable formulas in the
gray range to find the best order quantity for each unit stockout cost. (Scroll to
the right for the answers.)
Table of profit versus order quantity
Order quantity Profit
200 $5,325
250 $5,430
300 $5,640
350 $5,565
400 $5,235
Profit for various order quantities (column L) and unit stockout costs (row 32)
$2 $3 $4 $5
200 $5,235 $5,175 $5,025 $4,935
250 $5,465 $5,285 $5,190 $5,085
300 $5,355 $5,325 $5,265 $5,100
350 $5,215 $5,195 $5,130 $5,125
400 $5,145 $5,085 $5,015 $5,005
The OFFSET function allows you to reference a range (or a single cell) relative to
another cell. It is hard to appreciate this function unless you see some examples,
so some typical examples are illustrated here.
A good example of the OFFSET function appears in the example to the right. A
company sells to a retailer, and the retailer pays a certain number of months
later, as indicated by the payment delay (in months) in cell L30. The sales occur as
indicated in row 33, but the receipts from the retailer occur two months later, as
indicated in row 34. The goal is to calculate the receipts from January on.
Without the OFFSET function, you could simply put links in the Receipts row that
point to sales two months earlier. For example, the formula for receipts in
January would be =M33. But what if the retailer decides to delay payments by
three months instead of two? Then you would need to fix the links in the
Receipts row. However, the OFFSET function avoids this updating of links. You can
use the formula =OFFSET(O33,0,-$L$30) in cell O34 for January and copy it across
row 34 for the other months. This formula says to start in the January sales cell
and go a certain number of cells to the left (because of the minus sign), where
this number is specified in cell L30. To see how it works, change the value in cell
L30 to 3 or 1. (If the delay is 3, you will need to copy the formula ahead to
September; if the delay is 1, you can delete the August formula.)
Try it! Suppose that a manufacturing company buys raw materials from a
supplier. If the cost in any month is $x, the company pays 40% of this cost one
month from now and the other 60% two months from now. Use the OFFSET
function to calculate the payments made in January through August, based on
the costs through July. These calculated payments should update automatically if
you change the inputs in the blue cells. For example, make sure your formulas
react correctly if you enter 2 and 3 in the blue cells in column N. (Scroll to the
right for answers.)
Try it! Suppose that a manufacturing company buys raw materials from a
supplier. If the cost in any month is $x, the company pays 40% of this cost one
month from now and the other 60% two months from now. Use the OFFSET
function to calculate the payments made in January through August, based on
the costs through July. These calculated payments should update automatically if
you change the inputs in the blue cells. For example, make sure your formulas
react correctly if you enter 2 and 3 in the blue cells in column N. (Scroll to the
right for answers.)
To do this, select the Define Name dropdown in the Formulas ribbon. In the
Name box at the top of the resulting dialog box, enter Sales as the range name,
as shown to the right. In the Refers To box at the bottom, enter the formula
=OFFSET($L$61,0,0,COUNTA($L:$L)-COUNTA($L$1:$L$60),1).
Then click OK. Finally, enter the formula =SUM(Sales) in the gray cell. Note that
COUNTA($L:$L) returns the number of nonblank cells in column L, and
COUNTA($L$1:$L$60) returns the number of nonblank cells in the first 60 rows of
column L. So the difference is the number of sales values in column L. Therefore,
this OFFSET function refers to a range that starts in cell L61 and has as many rows
as there are sales values in column L. To see how it adjusts, enter a sales value for
June in cell L66 and watch how the total changes automatically.
Try it! Create the dynamic range name just described. Then enter the formula for
the total in the gray range, and add a new sales value for June to see if your
formula updates as it should.
1 2 3 4 45
Month Oct Nov Dec Jan Feb Mar Apr May Jun
Sales 3200 4600 5500 2500 3300 4200 2900 4500 2750
Receipts 4600 5500 2500 3300 4200 2900
Month Oct Nov Dec Jan Feb Mar Apr May Jun
Cost $1,950 $2,900 $4,150 $2,500 $3,350 $2,850 $3,550 $1,850 $4,200
Payment
Month Sales Total
Jan-11 $2,450
Feb-11 $3,140
Mar-11 $3,250
Apr-11 $4,510
May-11 $3,680
4500 2750
Jul Aug
$2,300
Total sales
Smith Jones Wilson Donalds
Jan-05 $6,700 $7,400 $5,800 $9,000
Feb-05 $5,800 $8,900 $5,500 $7,900
Mar-05 $5,000 $7,900 $5,900 $8,300
Apr-05 $6,700 $5,800 $6,000 $9,700
May-05 $9,400 $7,800 $6,700 $8,400
Jun-05 $6,200 $5,800 $9,400 $8,500
Jul-05 $8,700 $5,300 $6,900 $7,500
Answer: Open
Answer: Open the
thename
namemanager
manager and
and look
look at
atthe
the
definition of
definition of the
the SalesDynamic1
SalesDynamic1 range
range name.
name.
INDIRECT Function (Lookup & Reference Category)
The INDIRECT function is useful when you have named ranges and want to refer to
these, via labels, in your formulas. For example, suppose you have ranges named
Sales1, Sales2, and Sales3. Each of these is a long column of data. Then suppose
you have labels Sales1, Sales2, and Sales3 in some other cells, say, G1, G2, and G3.
If you enter the formulas =AVERAGE(INDIRECT(G1)), =AVERAGE(INDIRECT(G2)),
and =AVERAGE(INDIRECT(G3)) in cells H1, H2, and H3, this is the same as entering
the formulas =AVERAGE(Sales1), =AVERAGE(Sales2), and =AVERAGE(Sales3). The
name of the function implies that you are indirectly referencing a range via a label
with this range name.
Try it! Name the data ranges in columns L-O by their labels in row 4. Then use the
AVERAGE, STDEV, and CORREL functions, along with the INDIRECT function, to
enter copyable formulas in the gray ranges below. As you should appreciate, this is
particularly useful for the matrix of correlations. (See to the right for the answers.)
Monthly sales
Month Product1 Product2 Product3 Product4
Jan-13 1043 1047 957 1031
Feb-13 993 832 883 796
Mar-13 968 1114 1206 1048
Apr-13 1461 1487 1495 1519
May-13 1137 1183 1035 1045
Jun-13 1103 999 931 1133
Jul-13 1140 1025 1124 982
Aug-13 772 927 797 922
Sep-13 1195 1297 1231 1230
Oct-13 1140 1358 1267 1253
Nov-13 1236 1120 1107 1275
Dec-13 696 573 513 687
Jan-14 749 581 481 711
Feb-14 984 1005 998 804
Mar-14 1114 933 1084 963
Apr-14 758 832 950 745
May-14 307 418 428 508
Jun-14 1055 807 865 1102
Jul-14 1108 1149 1240 1275
Aug-14 1286 1041 919 968
Correlations
Product1 Product2 Product3 Product4
Product1
Product2
Product3
Product4
Averages, standard deviations
Average Stdev
Product1 1012.25 254.51
Product2 986.40 265.33
Product3 975.55 272.93
Product4 999.85 245.84
Correlations
Product1 Product2 Product3 Product4
Product1 1.000 0.855 0.824 0.855
Product2 0.855 1.000 0.942 0.891
Product3 0.824 0.942 1.000 0.858
Product4 0.855 0.891 0.858 1.000
Total sales
Smith
Jan-05 $6,700
Feb-05 $5,800
Mar-05 $5,000
Apr-05 $6,700
May-05 $9,400
Jun-05 $6,200
Jul-05 $8,700
Jones Wilson Donalds
$7,400 $5,800 $9,000 Answer: Open
Answer: Openthe
thename
name manager
manager and
andlook
lookat
at
the definition
the definitionof
of the
the Sales1
Sales1 range
range name.
name.
$8,900 $5,500 $7,900
$7,900 $5,900 $8,300
$5,800 $6,000 $9,700
$7,800 $6,700 $8,400
$5,800 $9,400 $8,500
$5,300 $6,900 $7,500
anager and
anager andlook
lookat
at
1 range
range name.
name.
Date Day Time Region Paid With Gender ms Ordered Total Cost SumIF Usin
### Sunday Morning West VISA Female 4 $136.97
### Sunday Morning West Mastercar Female 1 $25.55 162.52
### Sunday Afternoon West VISA Female 5 $113.95 276.47
### Sunday Afternoon NorthEast VISA Female 1 $6.82 283.29
### Sunday Afternoon West Mastercar Male 4 $147.32 430.61
### Sunday Afternoon NorthEast VISA Female 5 $142.15 572.76
### Monday Evening West Mastercar Male 1 $18.65 18.65
### Monday Evening South VISA Male 4 $178.34 196.99
### Monday Evening West Cash Male 2 $25.83 222.82
### Tuesday Morning MidWest Mastercar Female 1 $18.13 18.13
### Tuesday Morning NorthEast Mastercar Female 2 $54.52 72.65
### Tuesday Afternoon South VISA Male 2 $61.93 134.58
### ### Morning NorthEast VISA Male 3 $147.68 147.68
### ### Afternoon NorthEast Mastercar Male 1 $27.24 174.92
### Thursday Morning West Mastercar Female 3 $46.18 46.18
### Thursday Afternoon West VISA Male 5 $107.44 153.62
### Thursday Afternoon South Cash Female 6 $96.53 250.15
### Thursday Afternoon West VISA Female 4 $77.44 327.59
### Friday Morning South Mastercar Male 1 $15.19 15.19
### Friday Afternoon South Cash Male 1 $45.52 60.71
### Saturday Morning West VISA Male 4 $157.05 157.05
### Saturday Afternoon West VISA Male 2 $51.95 209
### Saturday Evening West Mastercar Female 9 $429.98 638.98
### Sunday Afternoon South VISA Female 1 $33.37 33.37
### Sunday Evening West VISA Male 3 $71.84 105.21
### Monday Morning NorthEast Mastercar Female 5 $139.51 139.51
### Monday Afternoon South Mastercar Male 3 $78.46 217.97
### Monday Evening MidWest Mastercar Male 3 $125.13 343.1
### Tuesday Afternoon MidWest VISA Male 1 $14.76 14.76
### Tuesday Afternoon South Cash Female 2 $83.38 98.14
### ### Morning West Mastercar Female 3 $104.91 104.91
### ### Afternoon NorthEast VISA Male 4 $101.37 206.28
### ### Afternoon NorthEast VISA Female 2 $53.16 259.44
### ### Evening West VISA Female 2 $40.63 300.07
### Thursday Morning West VISA Female 7 $286.41 286.41
### Thursday Afternoon South Mastercar Female 2 $59.39 345.8
### Thursday Evening NorthEast VISA Male 4 $185.45 531.25
### Friday Morning NorthEast Mastercar Female 2 $35.08 35.08
### Friday Morning MidWest Mastercar Male 2 $91.62 126.7
### Friday Morning NorthEast Cash Female 8 $155.50 282.2
### Friday Evening West VISA Male 4 $20.89 303.09
### Friday Evening West Mastercar Male 6 $186.29 489.38
### Friday Evening West Cash Female 1 $42.22 531.6
### Friday Evening West VISA Male 2 $42.19 573.79
### Saturday Afternoon MidWest VISA Female 1 $47.86 47.86
### Sunday Morning South Mastercar Female 3 $139.76 139.76
### Sunday Morning NorthEast Mastercar Female 6 $186.42 326.18
### Sunday Afternoon South Mastercar Female 1 $54.08 380.26
### Sunday Afternoon West Mastercar Female 3 $84.98 465.24
### Sunday Afternoon South Cash Female 2 $27.13 492.37
### Monday Morning West Mastercar Female 2 $54.70 54.7
### Monday Afternoon South Mastercar Female 5 $229.54 284.24
### Monday Evening West Cash Male 4 $124.21 408.45
### Tuesday Morning West VISA Female 2 $26.39 26.39
### ### Morning West Mastercar Female 4 $106.97 106.97
### ### Afternoon West Cash Female 8 $377.18 484.15
### Thursday Morning NorthEast Mastercar Female 1 $24.31 24.31
### Thursday Afternoon South Mastercar Female 1 $34.47 58.78
### Thursday Afternoon West Mastercar Male 3 $106.19 164.97
### Thursday Evening NorthEast VISA Male 2 $55.30 220.27
### Friday Morning NorthEast VISA Female 2 $82.98 82.98
### Friday Morning NorthEast Cash Male 4 $101.79 184.77
### Friday Morning MidWest Mastercar Male 3 $99.28 284.05
### Friday Morning NorthEast Mastercar Female 3 $100.09 384.14
### Friday Afternoon NorthEast Cash Female 3 $88.91 473.05
### Friday Afternoon MidWest Cash Male 2 $62.58 535.63
### Friday Afternoon South VISA Female 1 $28.87 564.5
### Friday Afternoon MidWest VISA Male 4 $141.29 705.79
### Friday Evening NorthEast Cash Male 4 $66.54 772.33
### Friday Evening South VISA Female 2 $69.03 841.36
### Saturday Afternoon South Mastercar Female 2 $65.51 65.51
### Saturday Evening West VISA Female 2 $35.59 101.1
### Sunday Afternoon South VISA Female 7 $320.18 320.18
### Sunday Afternoon MidWest Mastercar Male 5 $128.57 448.75
### Sunday Evening West Mastercar Male 6 $248.42 697.17
### Sunday Evening NorthEast Cash Male 2 $50.04 747.21
4/1/2013 Monday Morning NorthEast Cash Male 4 $145.48 145.48
4/1/2013 Monday Afternoon West Mastercar Female 9 $403.60 549.08
4/1/2013 Monday Afternoon NorthEast Cash Female 6 $284.14 833.22
4/1/2013 Monday Afternoon West Mastercar Female 1 $81.14 914.36
4/2/2013 Tuesday Morning MidWest Mastercar Female 3 $82.36 82.36
4/2/2013 Tuesday Afternoon MidWest Mastercar Female 2 $32.65 115.01
4/2/2013 Tuesday Afternoon NorthEast VISA Female 6 $200.70 315.71
4/2/2013 Tuesday Afternoon NorthEast Mastercar Female 3 $99.13 414.84
4/3/2013 ### Morning South VISA Female 4 $85.88 85.88
4/3/2013 ### Afternoon South Mastercar Male 3 $183.52 269.4
4/3/2013 ### Afternoon West VISA Female 2 $53.87 323.27
4/3/2013 ### Evening NorthEast Mastercar Male 3 $44.08 367.35
4/4/2013 Thursday Morning MidWest VISA Female 1 $82.34 82.34
4/4/2013 Thursday Afternoon South Cash Male 3 $151.29 233.63
4/5/2013 Friday Morning NorthEast VISA Male 5 $87.02 87.02
4/5/2013 Friday Afternoon MidWest VISA Male 2 $54.96 141.98
4/5/2013 Friday Afternoon MidWest Mastercar Female 1 $65.11 207.09
4/5/2013 Friday Afternoon NorthEast Mastercar Female 3 $76.69 283.78
4/5/2013 Friday Evening NorthEast VISA Female 2 $48.38 332.16
4/6/2013 Saturday Morning NorthEast Cash Female 5 $76.64 76.64
4/6/2013 Saturday Afternoon NorthEast VISA Female 2 $54.08 130.72
4/6/2013 Saturday Afternoon South Mastercar Female 3 $130.00 260.72
4/6/2013 Saturday Evening MidWest Mastercar Female 4 $218.29 479.01
4/7/2013 Sunday Evening West VISA Male 1 $38.10 38.1
4/8/2013 Monday Morning NorthEast VISA Male 4 $100.02 100.02
4/8/2013 Monday Morning West Cash Female 4 $248.73 348.75
4/8/2013 Monday Morning West Mastercar Female 2 $25.80 374.55
4/8/2013 Monday Evening MidWest Cash Male 1 $52.83 427.38
4/9/2013 Tuesday Morning West VISA Male 3 $131.89 131.89
4/9/2013 Tuesday Morning NorthEast Mastercar Male 3 $82.69 214.58
4/9/2013 Tuesday Morning West Mastercar Male 1 $70.03 284.61
4/9/2013 Tuesday Morning NorthEast Mastercar Female 1 $102.86 387.47
4/9/2013 Tuesday Morning West Cash Male 4 $174.13 561.6
### ### Morning South Mastercar Female 2 $49.80 49.8
### ### Morning MidWest Cash Female 2 $29.97 79.77
### ### Afternoon MidWest Mastercar Male 2 $82.53 162.3
### ### Afternoon South Mastercar Female 4 $142.76 305.06
### ### Evening NorthEast Cash Male 2 $72.58 377.64
### ### Evening MidWest VISA Male 2 $55.39 433.03
### Thursday Afternoon West VISA Female 4 $206.39 206.39
### Friday Morning MidWest Mastercar Female 4 $245.67 245.67
### Friday Morning NorthEast Mastercar Female 5 $265.69 511.36
### Friday Afternoon South Mastercar Female 3 $124.46 635.82
### Friday Afternoon NorthEast Mastercar Female 6 $206.26 842.08
### Saturday Afternoon South Mastercar Female 7 $306.23 306.23
### Sunday Morning South Cash Female 1 $48.12 48.12
### Sunday Afternoon MidWest Mastercar Male 4 $113.95 162.07
### Sunday Afternoon West VISA Female 6 $261.44 423.51
### Monday Morning South Cash Male 2 $59.90 59.9
### Monday Morning MidWest VISA Female 2 $49.73 109.63
### Monday Morning MidWest VISA Female 3 $65.06 174.69
### Monday Afternoon West VISA Male 4 $97.71 272.4
### Monday Afternoon NorthEast Cash Female 1 $49.84 322.24
### Monday Evening MidWest Cash Female 6 $233.94 556.18
### Monday Evening West Mastercar Female 9 $370.26 926.44
### Tuesday Afternoon West Cash Male 6 $313.11 313.11
### Tuesday Afternoon NorthEast Cash Female 6 $141.77 454.88
### Tuesday Evening South Mastercar Female 1 $27.99 482.87
### ### Morning MidWest VISA Female 3 $81.34 81.34
### ### Afternoon West VISA Female 2 $97.15 178.49
### ### Evening West Cash Male 7 $352.49 530.98
### Thursday Morning South VISA Female 3 $88.75 88.75
### Thursday Afternoon NorthEast VISA Female 4 $107.95 196.7
### Thursday Evening NorthEast Mastercar Male 5 $186.22 382.92
### Friday Morning MidWest Mastercar Female 4 $159.23 159.23
### Friday Afternoon MidWest Mastercar Female 2 $82.43 241.66
### Friday Evening NorthEast Mastercar Male 4 $99.42 341.08
### Saturday Afternoon NorthEast Cash Male 3 $79.32 79.32
### Saturday Evening South VISA Male 3 $160.01 239.33
### Saturday Evening West VISA Male 2 $51.99 291.32
### Sunday Morning West VISA Female 8 $267.67 267.67
### Sunday Afternoon NorthEast Mastercar Female 9 $429.22 696.89
### Sunday Afternoon NorthEast Cash Female 1 $46.20 743.09
### Sunday Afternoon NorthEast VISA Female 5 $240.02 983.11
### Monday Morning South Cash Male 4 $157.14 157.14
### Monday Afternoon MidWest Mastercar Female 5 $140.40 297.54
### Monday Evening NorthEast Mastercar Male 5 $204.93 502.47
### Tuesday Morning South VISA Female 2 $88.18 88.18
### Tuesday Afternoon South Cash Female 3 $95.47 183.65
### ### Morning South Mastercar Female 5 $224.73 224.73
### ### Morning West Mastercar Female 8 $344.73 569.46
### ### Afternoon NorthEast VISA Female 4 $185.32 754.78
### ### Afternoon South VISA Female 6 $297.31 1052.09
### ### Evening South Cash Male 4 $223.32 1275.41
### ### Evening South VISA Female 3 $164.40 1439.81
### Thursday Morning West Mastercar Female 2 $123.57 123.57
### Thursday Evening NorthEast Mastercar Male 5 $236.97 360.54
### Friday Morning West VISA Female 2 $82.75 82.75
### Friday Morning South Cash Male 6 $307.75 390.5
### Friday Afternoon MidWest Cash Female 4 $200.73 591.23
### Saturday Morning MidWest VISA Female 4 $242.06 242.06
### Saturday Evening South VISA Male 4 $215.09 457.15
### Saturday Evening NorthEast Mastercar Male 3 $162.90 620.05
### Sunday Afternoon West Mastercar Female 5 $214.31 214.31
### Sunday Afternoon South Mastercar Female 1 $42.07 256.38
SumIFS using Array
162.52
113.95
120.77
268.09
410.24
18.65
196.99
222.82
18.13
72.65
61.93
147.68
27.24
46.18
107.44
203.97
281.41
15.19
45.52
157.05
51.95
429.98
33.37
71.84
139.51
Pivot Table
PivotTable button on Insert ribbon
(empty)
4/29/2013 Monday
4/29/2013 Monday
4/29/2013 Monday
4/29/2013 Monday
4/29/2013 Monday
4/29/2013 Monday
4/30/2013 Tuesday
4/30/2013 Tuesday
4/30/2013 Tuesday
5/1/2013 Wednesday
5/2/2013 Thursday
5/3/2013 Friday
5/3/2013 Friday
5/4/2013 Saturday
5/5/2013 Sunday
5/5/2013 Sunday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/6/2013 Monday
5/7/2013 Tuesday
5/7/2013 Tuesday
5/8/2013 Wednesday
5/8/2013 Wednesday
5/8/2013 Wednesday
5/8/2013 Wednesday
5/8/2013 Wednesday
5/8/2013 Wednesday
5/9/2013 Thursday
5/9/2013 Thursday
5/9/2013 Thursday
5/9/2013 Thursday
5/10/2013 Friday
5/10/2013 Friday
5/11/2013 Saturday
5/11/2013 Saturday
5/12/2013 Sunday
5/12/2013 Sunday
5/13/2013 Monday
5/13/2013 Monday
5/13/2013 Monday
5/13/2013 Monday
5/14/2013 Tuesday
5/15/2013 Wednesday
5/15/2013 Wednesday
5/15/2013 Wednesday
5/15/2013 Wednesday
5/15/2013 Wednesday
5/15/2013 Wednesday
5/15/2013 Wednesday
5/16/2013 Thursday
5/16/2013 Thursday
5/16/2013 Thursday
5/16/2013 Thursday
5/17/2013 Friday
5/17/2013 Friday
5/17/2013 Friday
5/17/2013 Friday
5/18/2013 Saturday
5/18/2013 Saturday
5/18/2013 Saturday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/19/2013 Sunday
5/20/2013 Monday
5/21/2013 Tuesday
5/21/2013 Tuesday
5/21/2013 Tuesday
5/21/2013 Tuesday
5/22/2013 Wednesday
5/22/2013 Wednesday
5/22/2013 Wednesday
5/22/2013 Wednesday
5/22/2013 Wednesday
5/22/2013 Wednesday
5/23/2013 Thursday
5/24/2013 Friday
5/24/2013 Friday
5/24/2013 Friday
5/25/2013 Saturday
5/25/2013 Saturday
5/25/2013 Saturday
5/26/2013 Sunday
5/26/2013 Sunday
5/26/2013 Sunday
5/26/2013 Sunday
5/27/2013 Monday
5/27/2013 Monday
5/28/2013 Tuesday
5/28/2013 Tuesday
5/29/2013 Wednesday
5/29/2013 Wednesday
5/30/2013 Thursday
5/30/2013 Thursday
5/30/2013 Thursday
5/30/2013 Thursday
5/31/2013 Friday
5/31/2013 Friday
5/31/2013 Friday
5/31/2013 Friday
5/31/2013 Friday
6/1/2013 Saturday
6/1/2013 Saturday
6/1/2013 Saturday
6/1/2013 Saturday
6/1/2013 Saturday
6/1/2013 Saturday
6/1/2013 Saturday
6/1/2013 Saturday
6/2/2013 Sunday
6/2/2013 Sunday
6/3/2013 Monday
6/3/2013 Monday
6/4/2013 Tuesday
6/4/2013 Tuesday
6/4/2013 Tuesday
6/4/2013 Tuesday
6/4/2013 Tuesday
6/5/2013 Wednesday
6/6/2013 Thursday
6/6/2013 Thursday
6/7/2013 Friday
6/7/2013 Friday
6/7/2013 Friday
6/7/2013 Friday
6/8/2013 Saturday
6/8/2013 Saturday
6/8/2013 Saturday
6/8/2013 Saturday
6/9/2013 Sunday
6/10/2013 Monday
6/10/2013 Monday
6/10/2013 Monday
6/10/2013 Monday
6/10/2013 Monday
6/10/2013 Monday
6/11/2013 Tuesday
6/11/2013 Tuesday
6/11/2013 Tuesday
6/11/2013 Tuesday
6/11/2013 Tuesday
6/12/2013 Wednesday
6/12/2013 Wednesday
6/12/2013 Wednesday
6/12/2013 Wednesday
6/13/2013 Thursday
6/13/2013 Thursday
6/13/2013 Thursday
6/14/2013 Friday
6/14/2013 Friday
6/14/2013 Friday
6/14/2013 Friday
6/14/2013 Friday
6/15/2013 Saturday
6/15/2013 Saturday
6/15/2013 Saturday
6/15/2013 Saturday
6/15/2013 Saturday
6/16/2013 Sunday
6/17/2013 Monday
6/17/2013 Monday
6/18/2013 Tuesday
6/18/2013 Tuesday
6/19/2013 Wednesday
6/19/2013 Wednesday
6/19/2013 Wednesday
6/20/2013 Thursday
6/21/2013 Friday
6/21/2013 Friday
6/21/2013 Friday
6/21/2013 Friday
6/21/2013 Friday
6/21/2013 Friday
6/21/2013 Friday
6/22/2013 Saturday
6/22/2013 Saturday
6/22/2013 Saturday
6/22/2013 Saturday
6/23/2013 Sunday
6/23/2013 Sunday
6/23/2013 Sunday
6/23/2013 Sunday
6/23/2013 Sunday
6/23/2013 Sunday
6/23/2013 Sunday
6/24/2013 Monday
6/24/2013 Monday
6/24/2013 Monday
6/25/2013 Tuesday
6/25/2013 Tuesday
6/25/2013 Tuesday
6/26/2013 Wednesday
6/26/2013 Wednesday
6/26/2013 Wednesday
6/26/2013 Wednesday
6/26/2013 Wednesday
6/26/2013 Wednesday
6/26/2013 Wednesday
6/27/2013 Thursday
6/27/2013 Thursday
6/27/2013 Thursday
6/28/2013 Friday
6/28/2013 Friday
6/28/2013 Friday
6/28/2013 Friday
6/28/2013 Friday
6/28/2013 Friday
6/29/2013 Saturday
6/29/2013 Saturday
6/29/2013 Saturday
6/29/2013 Saturday
6/29/2013 Saturday
6/29/2013 Saturday
Time Region Paid With Gender Items Ordered Total Cost
Morning West VISA Female 4 $136.97
Morning West Mastercard Female 1 $25.55
Afternoon West VISA Female 5 $113.95
Afternoon NorthEast VISA Female 1 $6.82
Afternoon West Mastercard Male 4 $147.32
Afternoon NorthEast VISA Female 5 $142.15
Evening West Mastercard Male 1 $18.65
Evening South VISA Male 4 $178.34
Evening West Cash Male 2 $25.83
Morning MidWest Mastercard Female 1 $18.13
Morning NorthEast Mastercard Female 2 $54.52
Afternoon South VISA Male 2 $61.93
Morning NorthEast VISA Male 3 $147.68
Afternoon NorthEast Mastercard Male 1 $27.24
Morning West Mastercard Female 3 $46.18
Afternoon West VISA Male 5 $107.44
Afternoon South Cash Female 6 $96.53
Afternoon West VISA Female 4 $77.44
Morning South Mastercard Male 1 $15.19
Afternoon South Cash Male 1 $45.52
Morning West VISA Male 4 $157.05
Afternoon West VISA Male 2 $51.95
Evening West Mastercard Female 9 $429.98
Afternoon South VISA Female 1 $33.37
Evening West VISA Male 3 $71.84
Morning NorthEast Mastercard Female 5 $139.51
Afternoon South Mastercard Male 3 $78.46
Evening MidWest Mastercard Male 3 $125.13
Afternoon MidWest VISA Male 1 $14.76
Afternoon South Cash Female 2 $83.38
Morning West Mastercard Female 3 $104.91
Afternoon NorthEast VISA Male 4 $101.37
Afternoon NorthEast VISA Female 2 $53.16
Evening West VISA Female 2 $40.63
Morning West VISA Female 7 $286.41
Afternoon South Mastercard Female 2 $59.39
Evening NorthEast VISA Male 4 $185.45
Morning NorthEast Mastercard Female 2 $35.08
Morning MidWest Mastercard Male 2 $91.62
Morning NorthEast Cash Female 8 $155.50
Evening West VISA Male 4 $20.89
Evening West Mastercard Male 6 $186.29
Evening West Cash Female 1 $42.22
Evening West VISA Male 2 $42.19
Afternoon MidWest VISA Female 1 $47.86
Morning South Mastercard Female 3 $139.76
Morning NorthEast Mastercard Female 6 $186.42
Afternoon South Mastercard Female 1 $54.08
Afternoon West Mastercard Female 3 $84.98
Afternoon South Cash Female 2 $27.13
Morning West Mastercard Female 2 $54.70
Afternoon South Mastercard Female 5 $229.54
Evening West Cash Male 4 $124.21
Morning West VISA Female 2 $26.39
Morning West Mastercard Female 4 $106.97
Afternoon West Cash Female 8 $377.18
Morning NorthEast Mastercard Female 1 $24.31
Afternoon South Mastercard Female 1 $34.47
Afternoon West Mastercard Male 3 $106.19
Evening NorthEast VISA Male 2 $55.30
Morning NorthEast VISA Female 2 $82.98
Morning NorthEast Cash Male 4 $101.79
Morning MidWest Mastercard Male 3 $99.28
Morning NorthEast Mastercard Female 3 $100.09
Afternoon NorthEast Cash Female 3 $88.91
Afternoon MidWest Cash Male 2 $62.58
Afternoon South VISA Female 1 $28.87
Afternoon MidWest VISA Male 4 $141.29
Evening NorthEast Cash Male 4 $66.54
Evening South VISA Female 2 $69.03
Afternoon South Mastercard Female 2 $65.51
Evening West VISA Female 2 $35.59
Afternoon South VISA Female 7 $320.18
Afternoon MidWest Mastercard Male 5 $128.57
Evening West Mastercard Male 6 $248.42
Evening NorthEast Cash Male 2 $50.04
Morning NorthEast Cash Male 4 $145.48
Afternoon West Mastercard Female 9 $403.60
Afternoon NorthEast Cash Female 6 $284.14
Afternoon West Mastercard Female 1 $81.14
Morning MidWest Mastercard Female 3 $82.36
Afternoon MidWest Mastercard Female 2 $32.65
Afternoon NorthEast VISA Female 6 $200.70
Afternoon NorthEast Mastercard Female 3 $99.13
Morning South VISA Female 4 $85.88
Afternoon South Mastercard Male 3 $183.52
Afternoon West VISA Female 2 $53.87
Evening NorthEast Mastercard Male 3 $44.08
Morning MidWest VISA Female 1 $82.34
Afternoon South Cash Male 3 $151.29
Morning NorthEast VISA Male 5 $87.02
Afternoon MidWest VISA Male 2 $54.96
Afternoon MidWest Mastercard Female 1 $65.11
Afternoon NorthEast Mastercard Female 3 $76.69
Evening NorthEast VISA Female 2 $48.38
Morning NorthEast Cash Female 5 $76.64
Afternoon NorthEast VISA Female 2 $54.08
Afternoon South Mastercard Female 3 $130.00
Evening MidWest Mastercard Female 4 $218.29
Evening West VISA Male 1 $38.10
Morning NorthEast VISA Male 4 $100.02
Morning West Cash Female 4 $248.73
Morning West Mastercard Female 2 $25.80
Evening MidWest Cash Male 1 $52.83
Morning West VISA Male 3 $131.89
Morning NorthEast Mastercard Male 3 $82.69
Morning West Mastercard Male 1 $70.03
Morning NorthEast Mastercard Female 1 $102.86
Morning West Cash Male 4 $174.13
Morning South Mastercard Female 2 $49.80
Morning MidWest Cash Female 2 $29.97
Afternoon MidWest Mastercard Male 2 $82.53
Afternoon South Mastercard Female 4 $142.76
Evening NorthEast Cash Male 2 $72.58
Evening MidWest VISA Male 2 $55.39
Afternoon West VISA Female 4 $206.39
Morning MidWest Mastercard Female 4 $245.67
Morning NorthEast Mastercard Female 5 $265.69
Afternoon South Mastercard Female 3 $124.46
Afternoon NorthEast Mastercard Female 6 $206.26
Afternoon South Mastercard Female 7 $306.23
Morning South Cash Female 1 $48.12
Afternoon MidWest Mastercard Male 4 $113.95
Afternoon West VISA Female 6 $261.44
Morning South Cash Male 2 $59.90
Morning MidWest VISA Female 2 $49.73
Morning MidWest VISA Female 3 $65.06
Afternoon West VISA Male 4 $97.71
Afternoon NorthEast Cash Female 1 $49.84
Evening MidWest Cash Female 6 $233.94
Evening West Mastercard Female 9 $370.26
Afternoon West Cash Male 6 $313.11
Afternoon NorthEast Cash Female 6 $141.77
Evening South Mastercard Female 1 $27.99
Morning MidWest VISA Female 3 $81.34
Afternoon West VISA Female 2 $97.15
Evening West Cash Male 7 $352.49
Morning South VISA Female 3 $88.75
Afternoon NorthEast VISA Female 4 $107.95
Evening NorthEast Mastercard Male 5 $186.22
Morning MidWest Mastercard Female 4 $159.23
Afternoon MidWest Mastercard Female 2 $82.43
Evening NorthEast Mastercard Male 4 $99.42
Afternoon NorthEast Cash Male 3 $79.32
Evening South VISA Male 3 $160.01
Evening West VISA Male 2 $51.99
Morning West VISA Female 8 $267.67
Afternoon NorthEast Mastercard Female 9 $429.22
Afternoon NorthEast Cash Female 1 $46.20
Afternoon NorthEast VISA Female 5 $240.02
Morning South Cash Male 4 $157.14
Afternoon MidWest Mastercard Female 5 $140.40
Evening NorthEast Mastercard Male 5 $204.93
Morning South VISA Female 2 $88.18
Afternoon South Cash Female 3 $95.47
Morning South Mastercard Female 5 $224.73
Morning West Mastercard Female 8 $344.73
Afternoon NorthEast VISA Female 4 $185.32
Afternoon South VISA Female 6 $297.31
Evening South Cash Male 4 $223.32
Evening South VISA Female 3 $164.40
Morning West Mastercard Female 2 $123.57
Evening NorthEast Mastercard Male 5 $236.97
Morning West VISA Female 2 $82.75
Morning South Cash Male 6 $307.75
Afternoon MidWest Cash Female 4 $200.73
Morning MidWest VISA Female 4 $242.06
Evening South VISA Male 4 $215.09
Evening NorthEast Mastercard Male 3 $162.90
Afternoon West Mastercard Female 5 $214.31
Afternoon South Mastercard Female 1 $42.07
Data sets are often stored in "plain vanilla" text files, usually with a .txt, .dat, or .prn
extension, simply because everyone can view text files. All you need is a text editor, such as
Notepad. Fortunately, Excel has a wizard for importing data from a text file into Excel. It is
easy to use, but you have to be careful that everything lines up properly in the import.
Text files come in two varieties: fixed width and delimited. In a fixed width data set, each
variable starts in the same column. For example, First Name might be in columns 1-15, Last
Name might be in columns 16-30, and so on. This is a carryover from the old days of IBM
punched cards, but fixed width text files are still fairly common. In contrast, in a delimited
text file, pieces of data are separated by a delimiter character, the most common being a
space, a tab, a common, and a semicolon. You can tell that a data set is delimited when you
open it in a text editor and see that the columns don't line up; they are "ragged."
Once you understand this distinction, importing text data is easy. To do so, click the From Text
button in the Get External Data group on the Data ribbon (see to the right), and then browse
to find your text file. This launches a three-step wizard, shown in the three dialog boxes to
the right.
In the first dialog box, you can see from the data in the first few rows that the data are not
fixed width, so Delimited is the correct choice. You also have the option to start the import at
a row other than the first row. Text files often have data you don't want to import in the first
few rows.
In the second dialog box, you can choose the delimiter, in this case, a comma.
In the third dialog box, you can fine-tune the import, but it usually suffices to click the Finish
button. If any fine-tuning is necessary, you can do it in Excel.
There is a final dialog box, not shown here, where you can select the location of the imported
data. For this example, the imported data are listed below.
Always look carefully at the imported data to make sure everything lines up correctly. If it
doesn't, you have to fix the imported data or fix something in the original text file. One
"small" error, such as when some of the Salary values end up in the Age column, can
completely mess up the data to be analyzed.
Note: Starting in Excel 2016, another option is to use Power Query, which is discussed in
another topic in this tutorial. (You select From File and then From Text from the New Query
dropdown.
No. 2
From Text button on Data ribbon
Of all the tools available in Excel, conditional formatting is arguably the coolest.
As the name implies, conditional formatting allows you to format cells depending
on conditions you specify. The cool part is that the formatting changes
automatically if the cell values change. For example, suppose you use conditional
formatting to color a cell red if its value is greater than 100. If its current value is
90, it won't be red, but if you change its value to 110, it will turn red
automatically. Conditional Formatting op
Conditional formatting was available before Excel 2007, but it wasn't very
prominent, and many users didn't even know it was available. Now it is very
prominent, right in the middle of the Home ribbon, as shown to the right. It is
also much easier to use. As illustrated here, most uses of conditional formatting
are really easy, but a few are tricky.
The user interface for conditional formatting is shown in the screenshots to the
right. When you click the Conditional Formatting button on the Home ribbon, you
see five categories of built-in conditional formatting rules: Highlight Cell Rules to
Icon Sets. Each of these leads to a list of possibilities. For example, the Highlight
Cell Rules options and Top/Bottom Rules options are shown to the right. These
are all fairly self-explanatory: you select a range, click one of these options, and
specify parameters and a format to apply a rule.
There are also three options at the bottom of the main Conditional Formatting
list: New Rule, Clear Rules, and Manage Rules. The New Formatting Rule dialog
box shown to the right lets you build a new rule, and the possibilities are almost
unlimited. The Clear Rules option (dialog box not shown) lets you delete rules for
the selected range or for the entire workbook. Finally, the Manage Rules dialog
box shown to the right lets you see and edit the rules, if any, for the current
selection or any of the worksheets in the current workbook.
New Formatting Rule dialo
It is impossible to explain all of the possibilities, but a few typical options are
illustrated below.
A typical use of conditional formatting is to color all "high" values one color and
all "low" values another color. In the exam scores to the right, suppose you want
to color all high scores green and all low scores red, where a high score is greater 77
than the value in the green cell and a low score is less than the value in the red 62
cell. To do so:
94
1. Select all exam scores in column K. 68
73
2. Click the Conditional Formatting dropdown, then Highlight Cell Rules, and then
Greater Than. 61
99
3. In the Greater Than dialog box, enter a cell reference to the green cell and
select a green format of your choice. 94
88
4. Repeat steps 2 and 3 in the obvious way for the low values. 82
Try it! Perform the above steps. Then change the values in the green and red cells 87
in column N to see how the formatting changes automatically. 65
82
To delete the formatting, click Conditional Formatting and then Clear Rules.
70
To change the formatting rules, click Conditional Formatting and then Manage 94
Rules. You can experiment with the possible options. 80
96
Person
Other Built-in Conditional Formatting Possibilities 1
2
As you can see when you click the Conditional Formatting dropdown,
there are a lot of built-in choices that are very easy to apply. Try out some 3
of the following: 4
5
The Highlight Cell rules let you format numbers that satisfy inequalities, as
in the example above, and they also let you format text or dates that 6
satisfy natural conditions. 7
8
The Top/Bottom rules let you format the top (or bottom) x items (or x
percent of items), where you can choose x. For example, you can format 9
the maximum number in a list by specifying the top 1 item. 10
11
The Data Bars, Color Scales, and Icon Sets are amazing -- and they can be
overdone. The point of all of them is to differentiate levels of values, such 12
as salaries or sales values. 13
Try it! Use any interesting formats you like to format the dates, text, or 14
numbers to the right. Remember that you can always modify the formats 15
or clear them. 16
17
18
numbers to the right. Remember that you can always modify the formats
or clear them.
19
20
21
22
Scroll down for more below… 23
24
25
26
27
28
29
30
Month
Building Your Own Conditional Formatting Rules with Formulas Jan-13
Feb-13
You can get even more control by building your own rules. You do this by Mar-13
clicking Conditional Formatting and then New Rule. The resulting dialog
box has more options than can be explained here, but the following Apr-13
explains one typical and useful possibility. May-13
Jun-13
The data set to the right contains monthly sales data for six regions.
Actually, they have been entered as random numbers with the Jul-13
RANDBETWEEN function, so if you press the F9 key, they will all change Aug-13
in a random way. (This makes the example even more impressive!)
Suppose you want to color the maximum sales value in each column Sep-13
green. One way is to do it separately for each column, formatting the top Oct-13
1 item as explained above. However, this would take too much time, Nov-13
especially if there were many more columns. Here is a better way.
Dec-13
1. Select all the dollar values, dragging from the top left cell. This makes
the top left cell the active cell, the one in white.
3. In the "Format values where this formula is true:" box, enter the
formula
=(L107=MAX(L$107:L$118)). Make sure you get the dollar signs right.
Then select a green format of your choice.
Try it! Apply the above steps to the sales data. Apply a similar formula to
format the minimum value in each column red. Then press the F9 key a
few times and watch how the green and red cells bounce around.
Once you understand how this formula works, you can do some amazing
conditional formatting. Remember that you selected the entire sales
range, but L107 is the active cell because you started the dragging from
it. The formula as written applies to cell L107. Specifically, if its value is
the maximum value in column L, it is formatted green. But because the
entire sales range is selected, the formula is applied, in a
relative/absolute sense, to each cell in the range. The rows in the MAX
function are absolute because the maximum is always over these rows,
but the columns in the MAX function are relative because you want this
formula to apply to all cells in all columns. And L107 is totally relative
because you want this rule to be applied to every cell in the range.
the maximum value in column L, it is formatted green. But because the
entire sales range is selected, the formula is applied, in a
relative/absolute sense, to each cell in the range. The rows in the MAX
function are absolute because the maximum is always over these rows,
but the columns in the MAX function are relative because you want this
formula to apply to all cells in all columns. And L107 is totally relative
because you want this rule to be applied to every cell in the range.
Conditional Formatting button on Home ribbon
Conditional Formatting options Higlight Cell Rules options Top/Bottom Rules options
90 57 88 55 54 50 58
52 52 58 91 55 55 100
97 75 92 63 53 97 56
54 80 100 51 99 94 95
90 96 59 95 90 78 82
64 64 62 63 52 51 52
94 88 78 99 66 91 84
96 74 66 55 68 90 53
60 79 100 68 97 60 90
61 89 80 78 94 84 65
68 59 90 71 51 94 74
66 76 80 57 83 87 81
79 99 81 97 86 68 92
98 61 68 85 84 91 98
93 77 96 51 54 62 93
63 76 84 69 51 74 78
85 52 57 100 50
71 99 60 61 95
63 82 100 92 90
82 72 69 80 64
87 73 71 55 76
100 80 57 86 92
70 84 83 63 66
62 72 82 99 88
55 56 55 98 86
50 58 56 60 65
65 96 52 59 97
76 67 76 77 66
69 90 71 51 75
80 50 93 51 90
80 63 65 55 82
52 52 71 99 97
Introduction to Data Validation
At some point, you might be developing spreadsheets for others to use, and you
might want to force them to use certain values in certain cells because other
values wouldn't make sense or wouldn't satisfy business rules. You can do this
fairly easily with data validation. There are actually many possibilities, but only
the most common are illustrated here. All of the options are found from the Data
Validation item on the Data ribbon shown to the right. This leads to the fairly self-
explanatory Data Validation dialog box also shown to the right. All of the
examples below assume you have selected the cell you want to validate, and they
assume that you have opened this dialog box and have chosen the Settings tab.
Choose Whole Number (if you want only integers) or Decimal in the Allow
dropdown list, choose Between from the resulting Data dropdown, and enter
values in the Min and Max boxes. You can also place cell references in the Min
and Max boxes. You can experiment with the other options in the Data
dropdown. They are all quite straightforward.
The Data Validation dialog box has two other tabs, Input Message and Error Alert.
The first allows you to create a message that the user sees when the cell is
selected. The second allows you to create a message that appears if an incorrect
value is entered in the cell.
Try it! Force the values in the gray cells in column K to have values indicated by
the labels to their right. Add your own input messages and error alerts. Then try
entering appropriate and inappropriate values in the gray cells.
Probably the easiest data validation is to allow the user to choose from a
dropdown list of values. To do this, first create the list in some column, usually
out of sight to the far right. Then from the Allow dropdown in the Data Validation
dialog box, select List, and in the Source box, provide a cell reference to the list.
That's all you need to do. When the user selects the cell to be validated, a
dropdown arrow automatically appears, with the values in the list to choose
from.
Try it! The example to the right lets a user enter an amount to be financed, an
annual interest rate, and a term (number of months to pay), and it returns the
monthly payment (using the PMT function that has already been entered). Create
a list in a column out to the right that contains the possible terms: 12, 24, 36, 48,
and 60, and then create a data validation for the term cell that lets the user
choose from these values. Check that it works.
dropdown arrow automatically appears, with the values in the list to choose
from.
Try it! The example to the right lets a user enter an amount to be financed, an
annual interest rate, and a term (number of months to pay), and it returns the
monthly payment (using the PMT function that has already been entered). Create
a list in a column out to the right that contains the possible terms: 12, 24, 36, 48,
and 60, and then create a data validation for the term cell that lets the user
choose from these values. Check that it works.
Validating a Date
Suppose you want to make sure the person enters a valid date in a cell.
This is a great place for data validation. By choosing the Date option from
the Allow dropdown list, you can force users to enter only values that are
recognized as dates. This is no small achievement!
In addition, you can put limits on the dates. For example, suppose you
want the person to enter the date she took out a loan. This must not only
be a date, but it can't be in the future. To allow only such dates, you can
select "less than or equal to" from the Data dropdown and then enter the
following formula in the End date box: =TODAY(). The effect is that the user
will not be allowed to enter a future date, regardless of today's date.
Try it! Create the date validation just described in the gray cell to the right.
Then enter incorrect and correct entries to see how it works. (Can you
change it so that only dates that are at least a week ago are allowed? Just
change the formula slightly.)
Data Validation button on Data ribbon
Date of loan
for these values)
Protecting a Worksheet or Workbook Protect options on Review
If you create an Excel file for others to use, you probably don't want them to
mess up the formulas you entered so carefully. In fact, you might not even want
them to see the formulas. Maybe they are company secrets. Excel gives you
plenty of options for protecting, or unprotecting, your work. Only a few of them
are explained here. You can then experiment with others.
The key idea is locking cells. Right-click any cell on this worksheet, select Format Protect Sheet dialog box
Cells, and click the Protection tab. You will see that the Locked option is checked.
By default, all cells are locked until you unlock them. However, this locking has no
effect until you protect the worksheet (or the workbook). Therefore, protecting is
a two-step process.
1. Unlock all cells you want users to have access to. These are typically input cells
where a user can enter data like unit cost, amount ordered, and so on.
2. Protect the worksheet (or workbook). To do this, select Protect Sheet (or
Protect Workbook) from the Review ribbon, as shown to the right. For example,
when you select Protect Sheet, you see the Protect Sheet dialog box to the right.
You clearly have a lot of options for what you want to allow users to do. With the
settings shown, users will be allowed to select locked cells but not modify them.
If the "Select locked cells" were unchecked, users wouldn't even be allowed to
select locked cells, so any formulas in these cells would be hidden. Note that you
can also add a password when you protect a worksheet or workbook. Just be
careful to remember it. Otherwise, you won't be able to unprotect (and then
modify) your own work!
Protect options on Review ribbon
123
If you want even more power in Excel, you can automate just about any task with
a macro. Macros are written in the programming language for Excel and the rest
of Office, called Visual Basic for Applications (VBA). VBA is a relatively easy
programming language to learn, but it does take some study and a lot of practice.
(If you are interested, check out the VBA for Modelers book at
http://www.kelley.iu.edu/albrightbooks.)
Even if you know nothing about programming, you can still record macros to
perform some simple tasks. You can then create buttons to run these macros and
place them on you Quick Access Toolbar (QAT) so that they are always available
to you. There are several things you should know before you start working with
macros:
1. There is a Developer tab and ribbon, shown to the right, that you should make
visible. This has various buttons for working with macros. If the Developer tab
isn't visible, right-click any ribbon, select Customize the Ribbon, and check the
Developer item in the right pane of the resulting dialog box.
2. Starting in Excel 2007, files that contain macros must have the .xlsm extension
("m" for macro). You aren't allowed to save such a file as an .xlsx file.
4. If you want to write your own macros, or if you want to look at recorded
macros, you need to go to the Visual Basic Editor. You can do this from the Visual
Basic button on the Developer tab, or more easily, with the Alt+F11 keyboard
shortcut.
Try it now. Press Alt+F11. This opens a new window. When you are finished
looking around, you can close this window. Excel will still be open.
Now let's record a macro and then try it out. This will be a very simple Record Macro dialog box
macro that formats the selected cell(s) as integers, that is, as Number
with zero decimals.
1. Make the Developer ribbon visible, if necessary. Select any range such
as the numbers in the gray range to the right, and click the Record Macro
button on the Developer ribbon. This turns the recorder on. It will record
everything you do until you turn the recorder off. Note: There is also a
Recording a Macro
Now let's record a macro and then try it out. This will be a very simple
macro that formats the selected cell(s) as integers, that is, as Number
with zero decimals.
1. Make the Developer ribbon visible, if necessary. Select any range such
as the numbers in the gray range to the right, and click the Record Macro
button on the Developer ribbon. This turns the recorder on. It will record
everything you do until you turn the recorder off. Note: There is also a
handy Record Macro/Stop Recording button at the left side of the Status
Bar. See the screenshot above to the right.
2. When you click the Record Macro button, you will see the dialog box
to the right. Fill it out as shown and click OK. You can give the macro a
meaningful name (no spaces), and you can specify where it should be
stored. The choice shown here is the Personal Macro Workbook, which is
the same as the Personal.xlsb file mentioned above. This will make the
macro available at all times.
3. Now perform the task you want to record. In this case, format the
selected range as Number with zero decimals.
4. From the Developer ribbon (or the button on the Status Bar), click the
Stop Recording button. Macros list for QAT custom
5. If you want to see the recorded mcaro, press Alt+F11 and look at the
module(s) under Personal on the left side of the Visual Basic Editor.
(Modules are where macros are stored.) Even if you know nothing about
programming or VBA, the recorded code probably makes sense. With
some experience, you can modify this code to suit your exact needs. For
now, though, you can leave it as is.
6. Now you have a nice macro, but you need a button to run it. To create
such a button, click the dropdown arrow next to the QAT, and then More
Commands to bring up the Customize dialog box shown to the right.
Under the "Choose commands from" dropdown, choose Macros. Select
your recorded macro from the resulting list, and click the Add>> button
to create a button for it on your QAT. The button will have a generic icon,
but if you click the Modify button near the bottom, you can choose a
more appealing icon.
7. Now that you have a nice button on your QAT, try it out. Select the
numeric cells in the red range to the right and click your button. They
should be reformatted.
Note that you were instructed to select a range before recording the
macro. The reason is that the macro will then apply to whatever range is
selected. If you began recording and then selected a range to format,
your macro would work only for that specific range.
Try it! Think of a simple task you perform frequently, like coloring the
background of a range green, changing the number format to currency
with zero decimals, or changing the print settings to your favorite
settings. Record a macro to perform any of these tasks, store it in your
Personal Macro Workbook, and assign it to a button on your QAT. You will
then be a click away from instant productivity!
Developer ribbon
Legend
34%
34%
7.89%
34.05% 24%
23.67%
8%
34.39%
We st NorthEast
South Mi dWest
Saturday Trend
0
0
0
0