Вы находитесь на странице: 1из 295

Changes in Excel

If Excel 2007 or a later version is your first exposure to Excel, you will love it.
However, if you are used to Excel 2003 or an earlier version, you will have
some unlearning and relearning to do. Several big changes were made in Excel
2007, along with many smaller changes. The changes made in Excel 2010 and
later versions were much less dramatic, so moving from Excel 2007 to 2010 or
a later version is quite easy. The text boxes below indicate the primary
changes in each of the post-2003 versions of Excel.

Changes in Excel 2007 Changes in Excel 2010


1. Excel 2007 introduced a completely new user interface, with tabs and 1. The Office button w
ribbons replacing the old menus and toolbars. backstage view, and th
2. Worksheets are much larger than before. You used to have about 65,000 2. You can now custo
rows and 256 columns. Now you have over a million rows and over 16,000 restrictions on what y
columns.
3. A number of new fu
3. An Office button was added at the top left of the Excel window. This Actually, a lot of these
takes you to a "backstage" view for file operations and information about
files. This is also where you access the old Excel Options dialog box. 4. Two new buttons w
to "regular" or COM a
3. A customizable Quick Access Toolbar (QAT) was added to the top of the
Excel window. This can be used to store your favorite buttons. 5. Sparklines were add
4. Excel files are now stored in a different format, as reflected in the new 6. Slicers were added
.xlsx and .xlsm file extensions, replacing the old .xls extension.
7. The Solver add-in w

Changes in Excel 2013 Changes in Excel 201


1. The style of the user interface changed. For example, the tabs are now 1. The style of the us
all in uppercase, and the ribbon icons are more abstract. Also, the layout of long all in uppercase,
the backstage view (from the File menu) changed once again. changed to dark gray
General tab of Excel O
2. There is now a single document interface, where each open Excel file (from the File menu)
gets its own window.
2. The Insert ribbon h
3. A new Flash Fill tool was added. This lets you copy patterns, such as chart types include h
name patterns, very easily, without the need for complex text functions. sunburst charts, wate
4. Timeline slicers were added to the regular slicers. These allow you to 3. The Data ribbon co
filter on dates. time series automati
5. A number of tools for data analysis were added. These include Quick 4. The Data ribbon co
Analysis, where you can get charts, tables, pivot tools, and more with a external data sources
couple mouse clicks. They also include several extremely powerful tools for Microsoft's querying
advanced data analysis: the Data Model, PowerPivot, and Power View.
2. The Insert ribbon h
3. A new Flash Fill tool was added. This lets you copy patterns, such as chart types include h
name patterns, very easily, without the need for complex text functions. sunburst charts, wate
4. Timeline slicers were added to the regular slicers. These allow you to 3. The Data ribbon co
filter on dates. time series automati
5. A number of tools for data analysis were added. These include Quick 4. The Data ribbon co
Analysis, where you can get charts, tables, pivot tools, and more with a external data sources
couple mouse clicks. They also include several extremely powerful tools for Microsoft's querying
advanced data analysis: the Data Model, PowerPivot, and Power View. suite of tools.

5. The other Power B


are all part of Excel 2
interfaces than befor
Excel. If you plan to u
you purchase Office (
Changes in Excel 2010

1. The Office button was replaced by the File menu for accessing the
backstage view, and the layout of this backstage view changed slightly.

2. You can now customize ribbons, although there are quite a few
restrictions on what you are allowed to change.

3. A number of new functions, mostly statistical functions, were added.


Actually, a lot of these are just renamed versions of older functions.

4. Two new buttons were added to the Developer ribbon for quick access
to "regular" or COM add-ins.

5. Sparklines were added to provide quick "mini" charts.


6. Slicers were added for pivot tables, These show filters more visually.

7. The Solver add-in was improved.

Changes in Excel 2016

1. The style of the user interface changed yet again. Now the tabs are no
long all in uppercase, and the bar at the top is all green. (This can be
changed to dark gray or white from the Office Theme options in the
General tab of Excel Options.) Also, the layout of the backstage view
(from the File menu) changed once again.

2. The Insert ribbon has several new items in the Charts group. The new
chart types include histograms, box and whisker plots, tree maps,
sunburst charts, waterfall charts, and combo charts.

3. The Data ribbon contains a new Forecast Sheet item for forecasting
time series automatically, using exponential smoothing.

4. The Data ribbon contains a new Get & Transform group for querying
external data sources. These actually implement Power Query,
Microsoft's querying add-in, part of its Power BI (Business Intelligence)
2. The Insert ribbon has several new items in the Charts group. The new
chart types include histograms, box and whisker plots, tree maps,
sunburst charts, waterfall charts, and combo charts.

3. The Data ribbon contains a new Forecast Sheet item for forecasting
time series automatically, using exponential smoothing.

4. The Data ribbon contains a new Get & Transform group for querying
external data sources. These actually implement Power Query,
Microsoft's querying add-in, part of its Power BI (Business Intelligence)
suite of tools.

5. The other Power BI add-ins, Power Pivot, Power View, and Power Map
are all part of Excel 2016, available as COM add-ins, with slightly different
interfaces than before. However, these are not available in all versions of
Excel. If you plan to use these tools, you should check carefully before
you purchase Office (or Office 365).
lookup_value lookup value is the input value or input cell in this function
ideally the look up value any blank cell anywhere in the sheet apart from table array

table_array table array is the selection of the entire table


excluding the coloum header

col_index no is the coloum no from the table array from where we fetch the value

range_lookup will provide 2 option


a. true= approximate match represented by no 1
b. false= exact match represented by no 2
MEDICINE STATUS COUNTER NO
CALPOL AVAILABLE 9
CROCIN NON AVAILABLE 10
BUFFIN AVAILABLE 13
RADO AVAILABLE 52
SUN PHARMA NON AVAILABLE 25
ADVIL AVAILABLE 25
XOLO 650 NON AVAILABLE 155
PARACETAMOL NON AVAILABLE 96
MESTROL AVAILABLE 65
DETTOL AVAILABLE 33
VICKS ORDERED 25

INPUT CELL VICKS ORDERED 25


;
Tabs and Ribbons

Starting in Excel 2007, Microsoft completely reorganized the user interface of the
Office products. Instead of the old menus and toolbars, there are now tabs and
ribbons. Each tab (Home, Insert, Page Layout, etc.) has an associated ribbon that is
similar to the old toolbars. (See to the right for the ribbons in Excel 2016. Those in
Excel 2007, 2010, and 2013 are similar.) For example, if you click the Formulas tab,
you get a ribbon with buttons that are useful for working with formulas. Each ribbon
has several groups of buttons. For example, the Formulas ribbon has one group
called Defined Names for manipulating range names. There is only one way to learn
these ribbons: by practicing and experimenting. Eventually, you will appreciate that
the ribbons are more logically organized than the old menus.

If you are using Excel 2007, you can’t customize the new ribbons; they are built in
and fixed. (Well, that isn't quite true. You can use the RibbonX technology, not
covered here, to customize them.) However, you can customize the ribbons fairly
easily in post-2007 versions. This is explained in another topic of this tutorial.

With the old menus gone, what about the keyboard shortcuts many of you like to
use? Most of them still work. For example, you can still press Ctrl+s to save a file or
Ctrl+p to print.

If you are a mouse person, hover the mouse above any tab and move the scroll
wheel. This will cycle through all of the tabs. Also, if you prefer keyboarding to
mousing, here's something you will like. Press the Alt key. In the ribbon area, you will
see a shortcut key for each tab. For example, M is for Formulas. Press any of these
shortcut keys to see the corresponding ribbon, and each one of its buttons will have
a shortcut key. Press the one you want, which is equivalent to clicking the button. To
make these shortcut keys disappear, press the Alt key again.

Try it! Use the Alt method to open the Name Manager on the Formulas ribbon.

A few of the new tabs are not visible until you select an appropriate object. For
example, when you select a chart, two Chart Tools tabs (Design, Format) become
visible. (There were three Chart Tools tabs in previous versions.) Or when you select
an Excel table, a Table Tools Design tab becomes visible.

If you need more space, you can right-click any ribbon and select Collapse the
Ribbon. You can then restore it in the same way. Also, note that depending on the
width of the Excel window, some ribbons might not show fully, but everything is still
available.

In general, Excel 2007 and later versions are more intelligent about context. In the
context of what you are doing, if something is relevant, it is likely to appear.
Otherwise, it remains hidden.
Home Ribbon

Insert Ribbon

Page Layout Ribbon

Formulas Ribbon

Data Ribbon

Review Ribbon

View Ribbon
Developer Ribbon
Customize Ribbon dialog b
Customizing Ribbons

Starting in Excel 2010, Microsoft made a welcome change that allows you
to customize the built-in ribbons. You might recall that in Excel 2003 and
earlier versions, you could change the menu structure to your liking fairly
easily. Then came the new ribbons in Excel 2007, which were pretty
much fixed (unless you were willing to use the rather obscure RibbonX
technology with XML code). Evidently, Microsoft received enough
complaints about the fixed ribbons that it returned to customizable
ribbons in Excel 2010. Fortunately, customizing is quite easy.

To do so, right-click any ribbon and select Customize the Ribbon. This
opens the dialog box to the right. (This dialog box is also available from
the Excel Options group.) From here, the options are straightforward. You
can create a new tab, create a new group under a given tab, and rename
either of these. Then you can move buttons from the left pane to the
right. As an example, the screenshot to the right illustrates how you
could create a new Tables group under the Data tab and then populate it
with PivotTable and Table buttons. This would allow you to get pivot
tables or tables from either the Insert ribbon or the Data ribbon.

Note that the Reset button lets you restore all of the ribbons or a
particular ribbon to its original state.

You shouldn't go overboard with ribbon customization. Microsoft


performed usability studies with thousands of Excel users to find the
ribbon organization that seems to work best, so a lot of thought went
into it. Still, you might prefer a few tweaks of your own.

Note: The changes described above are the easy "point and click"
changes. If you are more ambitious, you can use RibbonX technology to
make more extensive changes by writing XML code. Do a Web search for
RibbonX if you're interested.
Customize Ribbon dialog box
File Menu

Just as users were getting used to the Office button in Office 2007 for getting into
"backstage view," Microsoft replaced it with the File menu in Office 2010, and this
has remained in later versions. The File menu in Excel 2016 leads to slightly different
options than in earlier versions, as shown to the right. In each of these versions of
Excel, the File menu (or Office button) takes you to the backstage view where you
can perform file operations, and it is where you can open the Excel Options dialog
box. There are too many options to explain here, so it is best to experiment. You
shouldn't have any trouble finding what you want. For example, to see exactly which
version of Excel you have, click the Account option.

To leave backstage view, simply click the back arrow at the top left.
Backstage view in Excel 2016
QAT
Quick Access Toolbar (QAT)

Starting in Excel 2007, there is a Quick Acess Toolbar (QAT) at the top left of QAT Customize list
the Excel window. You can put your favorite buttons on this toolbar so that
they are always visible and available. The QAT comes with a few favorite
buttons, but you can add more. The one shown to the right contains several
favorite buttons in addition to the default buttons.

To modify your QAT:

Click the dropdown arrow to the right of your QAT. You will see the list to the
right of the most commonly used buttons, which you can then check to add
them to your QAT. You can also click the More Commands item in this list to
see the dialog box to the far right. If contains a huge number of other buttons
you can add to your QAT. In fact, if you create your own macros to perform
common tasks, you can place buttons to run them on your QAT.

In Excel 2010 or later, you can get to the Customize dialog box by clicking the
File button, then Options, and then Quick Access Toolbar. Or in any of these
versions, you can simply right-click any QAT button and select the Customize
Quick Access Toolbar option.

You can also right-click any button on the visible ribbon and select Add to
Quick Access Toolbar to add this button to your QAT. Similarly, a quick way to
delete a button from your QAT is to right-click any of its buttons and select
Remove from Quick Access Toolbar.

Try it! Add some of your favorite buttons to the QAT. Fortunately, you will have
to do this only once on any given PC.
QAT Customize list QAT Customize dialog box
Excel Options

Excel has many options for changing the software's behavior. To get to it,
click the File button in the upper left corner of the screen and then
Options. As shown to the right, you will see that the options are grouped
in categories: General, Formulas, and others. You might have to hunt a
while, but you will eventually find what you are looking for among the
large number of options available.

Try it! Under the General group, change the default number of worksheets
in a new file from 3 to 1. (Why have 3 when you usually need only 1? If
you need more, you can always add them. Note that Microsoft seems to
have changed the default to 1 in Excel 2016.)

Try it! Under the Advanced group, the first Editing option lets you choose
the direction you want the cursor to move when you press Enter. Change
it to the direction you prefer.

Try it! Excel makes some automatic changes for you when you type certain
characters. For example, if you type (c), it automatically changes this to a
copyright symbol. If you find this annoying, you can change it through the
AutoCorrect Options button in the Proofing group. Similarly, add an
abbreviation for your name or company through AutoCorrect Options so
that whenever you type the abbreviation, the full name appears.

Note that most of the options are for Excel as a whole, not for any
particular workbooks or worksheets you might have open. However, there
are a few that are workbook-specific or worksheet-specific. For example,
in the Advanced group, there are two sets of options, "Display options for
this workbook" and "Display options for this worksheet" that can be varied
from one workbook or worksheet to another.
File types (under Save As
File Extensions

One important change starting in Excel 2007 is to file extensions. Unless


you wrote your own add-ins in earlier versions of Excel, the only file
extension you probably ever saw was .xls. You can still save files with this
extension, but they will lose any features new to Excel 2007 or later
versions. To save them and keep new features, you should save them as
.xlsx files. The new "x" at the end of the extension, which also appears in
Word and PowerPoint files, stands for XML (extensible markup language),
the format in which these files are now stored. You don't really need to
understand how .xlsx files are saved as XML, but it is important for you to
realize that this format is a complete break from the old .xls (binary)
format. In a nutshell, if you open an .xls file in a text editor, it will appear
as gibberish, but if you open an .xlsx file in an XML text editor in just the
right way, it will actually make some sense.

Note that if you save your file as an .xlsx file, users with Excel 2003 won’t
be able to open it unless they download and install a free file format
converter from Microsoft. (Search the Web for Microsoft Office
Compatibility Pack to find this free download.) In the other direction, if
you save a file created in Excel 2007 or a later version as an .xls file, it will
probably work fine, and it will be readable by users with older versions of
Excel, but it won't be able to take advantage of changes in post-2003
versions. In fact, some new elements such as sparklines won't appear at
all.

Keep these points in mind because there will probably continue to be


many Excel users who will not convert to post-2003 versions for years. You
and they can share files, but you need to be aware of the rules and
limitations.

There are a few other new file extensions you might see, including the
following:

.xlsm: If your Excel file has associated VBA macros, and you want to save
it in the post-2003 XML format, you must save it as an .xlsm file ("m" for
macro). You might also see files with an .xlam extension. These are Excel
add-ins. In pre-2007 versions, add-ins had an .xla extension.

.xltx: This is a template file ("t" for template). Templates are discussed in
the Templates topic of this tutorial.

.xlsb: This is a binary file ("b" for binary). The only file you will probably
see with this extension is the Personal.xlsb file, used for storing your
favorite macros. See the Recording Macros topic in this tutorial for more
about this special file, your "Personal Macro Workbook."

Try it! Open a new workbook in Excel 2007 or a later version and do a
Save As. You will see the list of file types to the right. Because you are in
Excel 2007 or later, the default type is the top one, .xlsx. But if you wanted
to give this to a colleague with Excel 2003, you could save it as an Excel
97-2003 .xls workbook. (You could even save it as an Excel 5.0/95 .xls
workbook, but let's hope those days are over!) Alternatively, if your file
contained macros, you could store it in the new format as an .xlsm file, or
you could store it in the old 97-2003 .xls format.
97-2003 .xls workbook. (You could even save it as an Excel 5.0/95 .xls
workbook, but let's hope those days are over!) Alternatively, if your file
contained macros, you could store it in the new format as an .xlsm file, or
you could store it in the old 97-2003 .xls format.
File types (under Save As)
Going Home to Cell A1

When you are working on a large worksheet, you often want to reorient yourself
by going back to cell A1, the "home" cell. This is easy. Just press Ctrl+Home from
anywhere in a worksheet, and you will go to cell A1.

Try it! Scroll way down and way across to the right. Then press Ctrl+Home.
61
Splitting the Screen 95
33
It is often useful to split the screen so that you can see more data.
49
To split the screen: 10
Select the cell where you want the split to occur and then click the Split button on the 14
View ribbon. This provides four panes that operate independently. Once you have 21
these panes, practice scrolling around in any of them, and see how the others react. 8
Try it! Split the screen so that you can see the top left cell and the bottom right cell in 94
the data set to the right. Then remove the splits by clicking the Split button again. 84
Actually, if you want to remove only one of the splits, horizontal or vertical, you can 62
drag the split line to the right or down to the edge of the window.
16
Note: Prior to Excel 2013, you could drag buttons next to the scrollbars to split either 93
vertically or horizontally. Perhaps these buttons were too difficult to locate, so they 6
were eliminated in Excel 2013.
28
66
56
3
33
34
80
53
77
64
39
75
58
56
5
80
6
52
83
8
55
51
39
50
42
48
54
15
28
28
99
24
19
21
30
93
32
35
82
23
59
17
4
67
17
71
48
29
58
64
14
67
90
83
21
14
38
64
10
53
79
90
60
67
22
80
86
41
8
58
9
21
64
59
18
17
22
72
56
10
72
72
94
44
4
44
80
41
21
35
44
38
45
47
64
79
25
47
2
73
97
62
22
48
63
59
23
73
87
25
87
1
25
3
21
46
41
74
8
64
60
24
66
5
51
80
69
44
36
90
29
87
80
67
78
59
50
91
36
93
31
32
36
10
51
54
18
20
84
2
80
6
55
6
6
48
49
89
82
29
11
43
17
100
65
26
85
27
74
90
81
87
85
63
8
14
70
35
24
66
75
47
75
62
90
9
58
87
5
71
40
77
62
75
68
68
60
38
13
65
11
100
93
99
47
62
36
50
71
33
68
80
82
70
95
24
1
91
100
58
45
21
53
5
35
53
51
35
22
4
8
75
5
13
31
98
6
97
67
16
49
6
81
55
79
7
97
68
26
91 84 8 3 62 11 33 83 70 84
8 14 68 33 23 13 12 3 100 42
93 80 5 60 30 13 34 23 57 56
47 37 41 56 38 46 50 100 40 59
65 46 42 52 90 37 31 56 29 78
69 15 73 11 75 77 36 66 32 97
80 46 93 35 95 35 95 27 25 39
74 24 77 9 92 46 28 100 22 31
33 56 88 51 73 22 39 93 77 39
17 60 87 32 46 100 61 83 71 93
79 43 80 11 9 24 52 22 58 80
29 76 6 90 32 40 62 94 34 34
54 2 11 82 33 18 31 42 58 13
39 52 66 33 2 23 49 87 46 75
91 57 78 29 82 24 88 45 3 30
28 57 51 87 44 99 18 32 34 71
100 36 48 46 60 71 33 30 26 38
34 87 45 45 76 85 86 28 100 70
13 50 83 53 20 83 13 7 27 92
55 3 9 67 99 25 33 93 18 92
45 89 83 23 31 12 14 27 75 89
96 54 41 100 1 28 21 29 68 76
57 38 52 44 94 46 72 50 83 56
86 26 30 35 69 52 28 48 27 67
28 43 41 27 86 76 44 12 47 79
97 99 71 66 63 42 63 15 91 40
14 66 95 35 18 41 32 29 35 46
58 57 81 48 63 27 54 97 81 34
99 11 59 7 8 84 56 76 54 23
67 47 99 77 50 42 90 92 86 59
22 30 3 40 19 67 32 57 49 8
100 67 91 27 59 11 72 12 79 9
32 19 90 44 22 100 11 18 68 91
51 93 30 28 55 97 60 46 59 77
21 30 49 5 26 1 16 86 85 86
88 93 61 96 88 59 68 44 95 13
97 37 14 25 17 44 69 92 16 86
80 41 96 76 49 43 27 73 88 11
73 4 25 21 30 74 44 68 36 69
60 26 34 87 79 62 96 39 45 13
12 31 66 87 68 48 34 46 29 50
63 54 42 15 32 73 11 91 96 14
41 18 72 18 36 54 96 3 50 58
15 100 28 4 9 94 43 56 98 80
3 52 27 39 60 4 18 63 56 22
32 55 62 100 30 82 17 79 11 41
28 46 73 83 78 96 39 32 42 45
31 14 78 87 14 49 85 75 84 43
76 53 91 46 94 2 64 34 41 41
98 84 86 97 9 98 94 44 61 47
54 80 51 59 62 6 8 29 4 30
32 25 34 37 83 51 54 45 52 57
86 46 28 54 56 26 57 3 67 91
94 71 95 56 37 97 84 7 68 8
62 88 21 2 57 19 66 65 32 89
19 95 63 4 99 93 50 100 2 28
62 36 55 37 49 11 62 7 70 31
58 54 91 39 76 25 22 55 23 23
41 21 18 24 6 65 10 83 45 42
8 45 90 1 34 11 60 21 93 63
41 36 7 69 54 5 9 46 46 60
97 30 76 59 85 39 96 30 40 26
15 37 56 25 71 3 78 83 65 98
66 57 26 39 63 17 46 76 99 14
48 78 6 72 26 1 84 26 48 29
56 76 7 97 89 44 99 19 73 67
97 41 63 79 20 90 95 87 92 71
17 24 75 31 11 98 72 91 5 65
32 27 46 59 22 82 12 65 48 24
27 3 62 48 39 43 8 81 19 36
87 57 5 39 100 56 61 5 62 84
15 57 23 94 63 96 6 54 27 1
24 39 52 80 100 28 88 21 15 62
10 66 31 7 99 48 21 85 20 63
70 94 39 66 37 7 78 57 92 31
19 84 3 4 48 34 91 41 11 41
59 36 83 90 42 45 17 64 83 9
9 71 3 84 2 95 44 67 18 14
53 52 45 50 20 39 23 68 48 12
17 94 59 82 93 50 47 67 46 19
16 44 67 60 14 38 99 57 37 53
46 51 42 50 52 38 16 49 60 66
66 13 63 76 23 58 1 70 47 15
52 88 11 35 21 57 6 14 82 3
10 80 57 97 49 89 1 5 83 24
23 18 11 83 7 50 96 3 33 46
79 96 60 21 49 80 80 80 52 4
93 64 38 26 71 1 66 39 49 58
54 3 25 10 80 46 49 26 52 92
49 70 22 71 98 81 44 23 94 46
24 96 90 79 26 13 63 60 59 38
62 35 54 98 13 94 56 28 85 44
81 96 90 42 44 88 33 37 61 67
95 47 39 40 74 48 72 44 83 30
77 68 43 75 89 23 27 53 55 59
46 33 91 76 68 54 82 74 73 26
62 70 62 1 71 46 49 90 97 12
16 63 96 93 42 98 36 32 31 92
78 4 57 89 63 14 63 11 40 87
53 42 63 53 73 15 21 38 47 62
8 23 12 57 71 55 48 77 6 80
77 13 57 84 1 92 13 19 73 93
28 20 14 34 77 12 47 30 32 43
79 17 53 48 31 52 29 16 42 32
19 27 44 81 54 47 8 24 67 7
82 78 93 9 49 1 20 76 63 63
91 77 37 45 46 5 71 47 15 18
24 39 50 25 65 52 71 14 24 94
36 57 8 7 85 97 6 16 11 84
62 44 21 75 43 58 44 84 64 99
11 56 79 80 68 68 25 21 63 85
1 96 34 33 30 92 70 17 3 22
65 45 17 6 16 19 61 9 23 37
21 96 87 87 33 95 99 19 92 88
29 26 8 25 35 27 30 69 28 63
31 48 1 100 11 71 77 87 38 88
42 23 87 55 73 89 22 73 27 67
12 99 78 21 25 58 88 4 39 15
62 60 7 95 7 9 20 37 63 33
83 41 52 33 77 59 28 78 49 16
53 55 94 79 73 53 45 93 69 6
85 62 26 65 82 48 55 5 82 50
76 44 15 5 76 8 73 54 18 3
36 61 5 95 95 55 44 81 51 39
49 6 24 96 32 90 43 43 36 37
65 3 98 88 93 52 26 76 97 51
7 5 62 60 41 36 43 94 66 60
15 36 21 81 37 48 67 87 79 56
88 92 53 26 82 74 30 71 37 57
8 27 24 80 66 74 33 76 70 91
32 70 57 7 68 37 55 84 29 57
5 50 73 14 35 70 87 65 56 85
52 77 79 18 82 17 29 56 56 56
28 1 99 41 63 89 69 97 26 50
75 59 23 50 98 8 91 84 25 59
32 42 22 45 40 78 92 9 76 58
100 97 47 89 46 89 73 33 29 43
21 61 56 43 59 39 19 41 82 2
11 13 49 60 16 15 94 67 91 32
38 15 55 84 4 68 40 85 2 68
59 95 21 59 78 9 59 36 68 21
43 36 99 84 57 72 11 93 84 75
96 63 2 69 5 56 70 66 65 75
35 33 45 100 95 30 23 92 15 64
11 97 85 100 17 81 87 5 71 57
99 83 90 96 54 33 56 59 32 34
41 1 99 56 87 85 74 85 29 6
86 89 90 17 97 64 6 43 23 3
98 73 2 43 55 81 46 6 58 18
7 61 27 45 25 32 47 66 95 22
65 6 73 62 5 96 69 65 21 72
58 44 11 100 82 50 28 26 93 81
92 28 37 38 4 30 99 17 88 37
31 27 55 85 54 65 94 90 56 4
42 27 37 83 42 5 43 24 68 57
76 74 40 8 61 46 73 31 92 79
13 30 44 71 60 83 68 76 20 8
72 34 68 46 1 35 84 32 34 98
41 64 66 64 25 66 21 38 45 31
51 44 70 39 66 38 21 74 64 99
22 68 19 62 49 31 98 76 84 89
36 76 29 14 36 22 14 68 87 89
81 83 45 67 76 65 53 76 100 39
32 35 35 77 100 51 81 67 46 93
80 49 44 55 44 25 53 58 86 24
73 48 54 20 12 73 27 82 47 50
88 39 92 91 88 70 97 86 53 95
14 68 28 42 87 68 86 16 68 5
85 2 88 9 46 3 68 30 79 3
82 90 87 29 56 68 54 49 100 34
16 70 33 38 89 89 38 22 56 2
65 76 38 66 65 90 52 67 74 77
96 81 70 57 16 56 37 50 6 73
39 13 40 71 72 68 55 21 65 45
49 96 18 36 30 71 10 51 32 27
21 73 40 37 28 24 4 14 56 65
77 29 50 77 10 53 30 55 77 79
87 58 88 19 44 54 82 62 18 84
56 63 89 78 60 49 39 34 92 15
50 7 90 32 25 80 80 9 77 47
4 11 95 8 72 16 30 36 6 38
34 52 95 58 72 88 48 92 13 86
50 36 79 4 91 62 30 79 44 2
4 53 74 9 37 100 77 22 19 16
67 18 3 36 41 24 51 89 8 90
10 62 20 81 35 2 71 26 27 50
30 97 86 13 26 91 11 80 60 98
71 10 68 99 9 92 4 75 99 24
18 40 81 20 19 21 59 12 4 72
23 86 50 65 69 52 75 28 71 32
68 65 22 38 67 79 97 13 88 93
20 39 36 60 83 62 69 11 42 51
42 69 77 10 87 33 4 55 91 52
34 71 48 48 54 45 82 35 14 54
35 7 53 28 9 82 61 82 66 43
61 39 77 63 54 89 92 56 91 73
83 38 56 55 5 96 90 75 65 80
32 49 76 59 48 40 29 33 60 20
2 31 1 86 96 41 11 89 62 22
4 60 71 6 49 33 19 31 56 25
47 83 28 10 39 15 71 84 84 65
29 30 76 72 11 91 2 71 60 9
37 65 32 8 44 42 90 84 68 76
55 13 82 26 58 53 81 39 6 99
27 2 33 73 3 87 10 58 82 100
90 32 82 40 62 49 32 60 4 72
31 22 48 69 66 28 54 3 58 56
7 75 57 36 24 65 72 21 69 79
54 34 43 18 89 25 1 94 64 86
17 81 73 51 24 99 49 99 95 22
53 39 63 39 49 52 66 37 69 88
44 18 1 14 6 88 7 8 87 51
2 66 24 33 64 9 73 50 100 33
78 33 93 61 75 81 47 24 10 8
74 100 95 33 87 58 14 10 41 85
79 1 30 38 38 2 52 10 76 34
77 58 4 76 71 79 10 7 40 73
39 52 60 13 65 16 90 12 57 57
15 65 34 2 49 3 68 46 42 32
100 64 94 41 79 3 11 9 23 40
37 100 34 96 54 46 34 58 61 7
30 8 81 33 75 76 68 2 39 38
63 57 70 12 93 83 29 96 51 85
54 72 49 3 68 38 97 81 6 37
32 91 5 34 66 31 25 69 89 35
89 86 36 50 78 81 78 8 4 51
22 53 19 14 39 86 50 13 62 91
43 74 72 45 41 13 42 87 34 42
33 7 76 39 88 55 64 16 37 35
70 27 78 78 36 85 79 50 15 27
42 24 11 41 78 58 7 51 27 59
26 84 65 71 15 32 95 79 31 75
79 78 99 41 89 12 77 90 48 41
12 65 57 60 52 37 25 71 26 11
98 2 43 82 3 26 52 86 28 100
50 29 23 18 59 79 48 63 97 17
25 43 25 98 79 6 30 89 48 13
51 1 1 36 34 51 17 93 73 53
83 10 62 46 46 82 47 97 46 92
25 29 1 97 7 45 16 62 83 26
24 71 78 75 40 97 97 69 39 89
4 69 90 27 70 16 15 56 96 48
80 64 22 36 66 3 14 81 69 35
54 13 100 97 23 71 46 63 52 11
88 74 93 53 84 2 55 10 2 22
28 66 58 48 87 30 12 83 27 91
35 40 86 85 56 79 20 7 86 34
5 86 97 42 43 21 71 86 70 58
64 50 32 28 86 46 98 2 36 54
67 43 64 41 72 95 83 92 44 61
64 79 7 7 94 92 40 25 88 51
55 34 5 19 89 58 38 82 66 35
43 50 69 37 11 16 79 92 17 18
79 76 21 85 12 67 18 32 68 90
82 70 80 13 44 70 57 27 70 26
83 5 79 15 91 92 29 50 79 67
84 67 96 65 88 82 98 12 30 63
13 37 12 100 57 68 80 27 71 32
51 75 17 89 44 22 34 62 95 25
60 8 51 74 41 84 1 38 82 80
29 35 1 37 65 88 99 45 100 96
29 86 53 36 26 23 83 19 63 68
43 93 34 93 35 17 6 99 55 7
94 30 49 86 7 18 39 54 4
23 85 57 84 89 53 25 57 97
82 3 62 89 17 6 28 99 26
34 22 37 39 24 64 31 5 86
88 67 62 23 32 72 65 32 98
51 41 90 79 49 16 49 75 78
33 93 81 44 4 88 50 19 1
97 78 79 17 62 1 69 26 74
51 75 63 6 63 31 7 55 24
74 34 52 4 26 55 60 27 51
41 93 77 33 8 38 89 95 20
91 57 9 49 93 62 45 7 62
20 20 58 23 16 69 51 15 70
58 95 64 9 8 100 60 65 68
36 90 61 40 12 19 89 39 34
54 65 39 72 94 59 47 24 86
78 44 4 59 90 43 100 9 70
72 45 7 49 10 21 27 54 43
43 19 59 8 91 55 42 23 11
16 9 95 61 27 11 5 36 4
99 9 46 3 51 38 24 33 63
44 97 68 7 19 6 5 58 66
12 29 60 65 93 60 21 8 47
62 52 39 46 20 82 66 58 1
46 32 58 36 71 83 52 40 39
1 68 95 2 61 97 54 39 61
96 80 77 31 34 12 49 70 96
12 85 9 66 69 72 40 83 90
33 77 7 2 2 19 80 23 27
59 94 24 17 90 11 46 62 32
63 64 10 34 41 80 87 45 58
27 31 20 25 54 5 13 91 100
99 41 92 91 19 30 18 86 8
45 7 12 6 57 47 28 83 98
100 90 83 1 63 61 64 84 67
18 81 23 31 28 35 80 70 59
68 83 22 89 64 80 60 12 26
79 6 16 40 73 91 36 4 86
98 35 16 18 54 88 24 57 41
91 85 3 47 50 2 16 61 94
88 14 43 47 47 90 15 46 73
29 64 78 57 91 27 89 65 24
89 69 40 42 5 10 90 97 7
86 71 40 15 90 70 18 61 100
66 36 51 18 29 14 33 53 55
86 87 71 67 93 38 54 44 71
66 2 7 87 67 4 45 69 90
63 48 88 61 71 20 71 58 32
26 17 44 46 100 63 29 24 7
37 24 28 75 84 24 96 11 4
63 63 77 3 11 68 60 60 52
4 41 22 37 31 48 24 53 36
83 73 74 6 54 46 32 19 80
51 24 19 55 32 8 2 67 19
11 58 49 47 38 28 49 39 31
34 92 64 34 58 32 14 27 14
11 67 64 54 37 90 40 81 97
66 74 49 57 66 3 23 17 76
84 57 73 25 58 52 26 91 48
88 93 15 18 40 35 16 98 26
90 18 3 10 84 79 47 67 41
36 82 50 80 68 96 82 17 97
46 78 59 25 9 28 74 1 62
37 30 96 5 76 49 65 52 50
43 21 16 65 24 16 82 99 56
47 34 84 85 42 95 78 91 97
50 68 16 50 17 53 37 33 94
100 75 83 59 92 40 73 19 70
83 93 88 84 64 85 41 63 49
76 57 69 70 52 39 10 16 39
84 11 3 80 49 5 24 37 67
58 23 46 28 58 84 17 80 4
70 91 48 36 56 15 88 39 93
37 20 86 24 81 78 89 69 6
47 61 93 13 91 62 70 41 3
40 59 2 100 33 74 81 81 44
66 92 37 83 58 31 4 66 40
12 31 77 11 53 7 56 47 7
5 79 51 73 41 45 37 15 44
28 23 33 4 62 29 27 44 15
48 92 63 14 15 52 50 92 43
4 10 61 75 62 89 19 47 48
11 25 50 14 88 49 16 14 94
30 59 11 72 82 26 50 63 41
65 32 94 90 63 6 76 15 56
95 22 99 54 46 36 63 38 7
6 2 96 16 42 51 15 38 59
11 42 23 50 40 57 84 62 14
36 2 14 22 82 9 61 72 77
84 7 72 88 46 64 51 68 71
35 22 25 50 83 60 85 94 24
97 88 39 57 66 70 97 30 77
11 88 12 51 21 40 12 10 37
93 97 12 78 55 78 89 6 20
36 73 89 67 83 56 62 87 85
66 95 46 21 56 46 19 80 14
61 50 100 58 92 31 3 37 63
30 61 73 2 83 83 55 41 20
10 30 39 51 55 34 74 72 58
23 62 19 5 96 95 80 4 56
63 34 38 75 73 65 62 50 41
13 72 10 45 43 66 64 68 9
59 89 24 56 64 44 26 47 31
29 99 56 63 14 30 28 94 59
84 28 77 28 76 27 96 84 6
77 16 95 82 15 8 4 41 50
46 36 8 63 8 15 28 32 30
59 63 65 31 93 16 71 88 3
28 95 38 72 50 5 84 15 2
80 70 84 97 90 3 93 96 47
79 37 69 82 95 100 71 26 58
59 5 36 3 39 52 1 45 7
48 20 20 40 75 65 42 17 70
4 57 79 9 84 2 41 9 13
84 25 27 3 4 44 79 55 61
82 92 100 100 32 59 7 1 72
74 73 32 35 100 22 60 37 62
5 10 51 64 23 93 67 3 84
60 25 59 91 15 76 44 28 70
17 13 92 8 77 38 83 41 91
55 98 4 99 58 5 92 23 45
68 83 6 32 7 84 77 76 56
40 51 87 91 87 50 92 62 81
13 30 54 49 1 31 100 16 40
56 47 79 51 14 2 55 93 38
42 54 3 84 69 53 19 95 95
24 100 23 72 92 42 63 99 96
50 52 6 49 61 93 86 70 67
38 79 52 81 29 93 50 46 53
60 83 26 92 63 37 72 38 66
5 82 48 26 40 20 7 84 34
51 54 75 88 27 35 13 20 28
43 30 82 39 9 11 36 50 33
30 9 44 38 9 19 25 64 74
21 50 94 4 32 36 13 71 60
32 44 50 57 98 55 18 18 88
46 41 83 59 75 66 65 88 32
73 84 3 11 36 69 53 10 33
65 21 89 53 90 23 79 75 37
46 3 49 96 43 66 16 68 85
98 28 28 43 75 15 15 46 97
56 15 80 83 32 36 100 78 96
10 97 100 60 1 52 42 8 90
41 25 55 7 30 61 71 5 68
87 40 30 39 55 79 98 85 23
56 17 12 94 57 99 20 35 92
73 40 42 65 73 22 7 7 99
74 60 9 26 83 36 58 66 35
96 91 86 93 2 100 15 54 54
31 61 93 26 3 67 9 3 38
10 27 58 29 28 35 27 68 2
15 33 49 62 75 50 5 45 20
90 1 77 59 61 73 66 32 39
3 84 8 56 20 9 91 72 19
97 67 13 41 20 38 39 11 46
87 18 8 70 43 40 74 98 73
48 25 58 33 53 72 18 12 41
27 52 51 8 16 61 6 68 43
34 17 4 83 1 60 22 74 33
18 98 18 51 87 36 70 19 46
100 96 9 25 81 17 67 34 71
5 42 37 65 87 48 98 10 82
47 28 59 9 22 39 98 65 19
8 83 32 57 16 16 71 27 37
87 48 65 79 38 7 90 6 23
73 76 6 98 65 19 51 78 92
13 61 27 56 89 25 88 73 49
12 97 43 44 78 72 71 82 28
77 14 12 10 13 29 6 30 35
93 31 39 85 87 70 67 32 69
22 71 10 74 95 96 34 99 53
95 88 25 10 67 89 69 42 2
11 82 8 78 66 30 97 83 68
30 73 36 83 50 28 39 57 91
8 26 2 45 59 81 53 1 75
78 7 74 71 47 1 30 27 76
48 25 70 87 64 15 15 72 32
10 61 51 76 97 63 47 53 29
100 19 90 16 86 11 76 81 39
84 5 91 13 8 39 81 4 61
31 51 87 63 27 45 49 50 65
93 91 28 46 23 88 85 35 40
18 39 47 58 8 15 90 15 32
51 66 27 68 38 35 85 43 24
100 27 59 4 52 3 43 57 17
100 5 12 62 10 44 48 71 75
27 76 20 63 11 98 3 100 16
10 49 30 29 55 16 28 9 72
22 93 40 35 2 82 85 97 87
60 39 88 93 51 32 82 69 51
51 51 17 89 70 63 68 73 42
34 36 50 48 7 7 34 32 16
15 62 12 7 66 38 41 87 41
11 40 58 23 97 30 5 84 59
90 67 21 39 41 13 30 75 20
69 83 17 19 16 84 43 31 27
18 42 64 31 92 65 83 1 33
82 56 87 70 7 74 16 95 60
57 67 77 13 42 76 76 89 48
22 19 1 2 64 87 74 46 91
78 72 3 68 36 88 8 32 71
16 94 72 12 82 42 65 93 9
14 79 7 33 35 21 24 85 16
49 77 14 10 50 64 21 88 100
91 83 14 45 6 43 87 6 7
55 97 83 7 32 75 92 65 48
21 100 94 12 94 24 6 14 83
23 10 34 14 47 66 30 97 91
86 25 92 19 34 22 52 51 8
32 5 74 4 19 3 26 66 68
3 86 44 78 43 88 5 38 94
54 35 92 35 1 72 78 79 69
9 90 16 28 65 6 91 29 41
54 21 94 85 70 86 71 1 55
63 5 14 72 9 39 98 56 94
28 82 89 37 68 86 9 97 62
26 6 95 19 27 41 83 90 16
35 80 19 43 13 70 22 74 9
76 41 47 40 73 65 63 98 15
63 60 39 27 18 16 6 19 28
51 55 90 20 49 94 56 53 17
25 64 36 1 18 78 31 90 51
77 22 5 57 15 39 90 19 14
35 11 65 31 14 52 19 42 12
56 39 15 59 88 100 9 38 72
20 88 51 91 14 81 34 27 21
8 63 47 72 79 86 48 37 83
99 84 81 23 29 16 2 96 28
31 4 32 63 94 50 10 95 74
71 66 93 74 40 99 13 81 49
88 8 78 17 63 6 20 69 68
46 39 87 34 73 95 48 44 54
19 5 95 71 17 1 90 40 22
31 70 14 88 34 26 41 73 23
2 10 75 78 3 73 5 25 37
61 39 85 83 56 27 95 58 16
79 80 1 15 35 94 85 44 59
95 53 51 21 88 93 34 27 24
22 63 28 60 26 91 1 48 62
37 36 79 93 56 75 94 87 58
5 79 8 35 38 75 6 94 63
1 24 33 27 52 25 19 13 79
5 9 64 2 45 80 64 47 74
60 47 59 76 77 10 81 3 22
35 39 48 4 93 9 84 74 63
53 26 36 10 46 67 80 84 42
2 63 86 81 17 8 33 79 31
29 73 6 5 10 92 65 39 20
95 100 81 98 51 36 17 77 22
62 3 12 77 12 62 23 90 83
22 59 50 50 36 14 35 52 34
48 59 87 55 93 88 7 82 96
56 13 51 45 14 71 53 31 89
19 28 49 60 12 52 46 48 54
14 67 63 24 34 94 30 31 1
74 10 13 15 92 27 19 19 43
87 90 22 41 37 46 25 88 44
38 95 69 58 74 11 81 99 50
66 66 59 30 19 86 51 6 44
95 64 35 84 26 90 96 8 6
58 5 46 37 11 18 32 63 71
88 10 83 19 26 36 84 78 48
42 29 55 37 95 65 59 47 95
Selecting a Range with Key Combinations

If you favor keystrokes to mouse clicks, you can try the methods on this worksheet
for selecting large ranges or for moving around in them. Four types of keystroke
combinations are illustrated here: (1) Ctrl+Arrow combinations, (2) End, Arrow
combinations, (3) Ctrl+End, and (4) Ctrl+a. The first two are basically for moving to
corners of a data range, usually one that doesn't fit on a screen. Just be aware that
if you use either of the first two, the active cell moves from corner to corner, but
nothing in between is selected. To select, you need to hold the Shift key.

Ctrl+Arrow Combinations

It is often useful to zoom to the bottom, top, right, or left corner of a data range.
You can do this easily with the Ctrl+Arrow combinations.

To go to the bottom, top, bottom, right, or left corner of a range:

Select some cell in the data range, usually the upper left cell. Then press the Ctrl
key and the appropriate Arrow key simultaneously. For example, press Ctrl+Right
Arrow to go to the right corner of a range.

Try it! Starting at the gray cell to the right, move around to the other corners of
the large data range. You should end back in the gray cell.

Try it again! This time hold the Shift key. Then the Ctrl+Down Arrow combination
followed by the Ctrl+Right Arrow combination selects the entire range.

Try it again! Starting in the blue cell in the small data set above, use the
Ctrl+Arrow combinations to see how they are affected by blank cells.

End, Arrow Combinations

The End, Arrow combinations are equivalent alternatives to the Ctrl+Arrow


combinations. However, with an End, Arrow Key combination, you let go of the End
key before pressing an Arrow key. Again, you can hold the Shift key while you use
the End, Arrow combinations to select a range.

Try it! Do the same exercises as above but now with End, Arrow combinations.
Try it! Do the same exercises as above but now with End, Arrow combinations.

Ctrl+End combination

Another possibility is to use the Ctrl+End combination. Starting from any cell, this
selects the bottom right nonempty cell in the worksheet. If you hold the Shift key,
this selects the range from the active cell to the bottom right nonempty cell in the
worksheet.

Try it! Select the large data range to the right with the Shift+Ctrl+End combination.
You should start with the upper left cell in the data range.

This key combination often comes in handy when files much larger than you think
they should be. For example, you might see that the size of your "small" file is
1MB or more. It could be that junk is somewhere way down in a worksheet. If you
press Ctrl+End and it takes you way down or across, well beyond your data, this is
a sure sign of junk that you can then delete.

Ctrl+a combination

A last quick way to select a data range, even one with some blanks as in the small
data set above, is to select any of the cells in the range and press Ctrl+a . (No Shift
key is necessary.) You can think of "a" as an abbreviation for "all".

Try it! Use Ctrl+a to select either the small data set or large data set to the right.
You will note that every cell "surrounding" the selected cell is selected, even the
labels above the data sets. This is why labels such as these are often separated by
blank rows from the real data ranges.

This is another combination that you can use to locate junk, as described in the
previous text box.
Small data set with missing cells
8 1 1
5 5 7
10 5 3 10
10 10 9
4 3 4
7 4 5 1
2 9 10

Large data set with no missing cells


241 799 854 70 269 189 362 657 640 507
880 463 535 239 380 476 845 146 839 693
353 897 67 869 370 816 712 272 220 191
747 385 52 323 442 595 130 645 745 169
377 241 121 143 412 704 648 289 59 598
872 627 974 784 146 104 765 587 67 461
737 945 148 170 93 455 829 772 671 521
398 731 614 530 421 407 289 484 874 739
483 629 601 517 719 753 261 252 341 354
53 441 517 290 322 313 588 498 541 248
817 848 436 192 299 440 549 446 901 823
147 294 885 689 506 887 570 746 648 296
805 917 276 125 206 913 76 51 639 815
915 702 959 492 781 363 785 153 787 886
892 706 288 271 805 932 868 242 915 297
58 158 91 198 899 370 361 952 518 921
238 107 285 537 346 395 991 415 693 764
220 247 681 739 255 102 950 813 345 546
881 704 444 1000 69 700 720 953 815 684
332 215 667 889 862 82 524 65 568 393
656 108 476 57 67 996 911 189 350 977
130 598 931 139 738 584 371 671 895 948
824 258 919 416 887 414 783 73 713 549
610 742 66 705 170 634 765 170 874 458
494 825 506 499 694 371 591 964 817 557
930 977 201 174 182 289 608 666 348 74
905 546 631 159 146 329 553 764 108 418
272 743 206 927 470 106 866 823 769 125
94 418 979 365 167 704 791 50 139 630
553 799 982 639 563 770 749 613 370 474
866 590 331 256 820 767 143 469 789 64
788 606 453 785 993 417 93 134 637 504
831 226 855 878 540 328 790 548 256 906
192 673 660 515 56 688 781 483 646 491
839 470 172 282 946 91 924 797 963 782
557 646 169 125 925 669 882 572 697 484
510 421 196 692 887 402 648 699 474 267
649 803 642 918 125 633 115 756 370 607
275 60 194 265 135 873 133 630 301 499
423 220 620 226 544 82 845 583 375 526
884 524 264 501 53 887 537 648 713 284
465 559 404 571 697 504 710 113 613 945
459 379 758 93 316 935 442 527 195 73
884 757 197 201 960 165 845 497 400 427
378 115 303 894 469 981 628 805 628 526
821 647 92 850 550 390 413 848 616 703
362 390 855 257 887 478 866 199 175 855
779 610 281 679 660 627 610 298 978 809
311 825 566 772 750 726 777 281 760 650
731 91 53 203 428 411 630 196 766 587
136 96 278 611 548 472 750 315 377 874
298 747 770 616 189 108 925 709 296 927
743 354 213 435 993 465 502 586 581 691
457 946 369 631 578 504 994 438 143 390
138 121 707 741 732 305 258 167 941 522
928 836 943 273 625 632 81 656 336 603
491 608 495 557 928 390 214 902 727 720
186 410 809 594 588 821 470 796 688 270
952 740 651 413 806 870 566 124 567 710
347 974 348 159 808 72 687 612 513 210
517 239 238 840 387 463 703 632 577 139
944 942 856 339 462 745 909 275 100 85
64 245 380 923 732 532 473 352 424 659
955 482 459 996 686 607 976 928 332 771
795 205 77 994 491 849 207 59 698 145
134 937 715 807 692 835 817 451 882 257
321 242 184 558 977 472 724 984 240 509
205 902 54 255 500 220 205 232 131 646
983 997 507 925 428 536 753 75 229 93
801 968 445 799 291 409 664 193 578 408
291 213 588 464 657 718 169 352 701 411
478 655 522 375 427 978 942 348 824 921
709 103 527 257 470 464 128 330 778 322
799 911 162 238 308 854 299 160 360 873
751 468 679 336 453 998 649 834 957 584
165 107 576 923 855 639 729 850 527 520
895 486 315 632 460 976 593 765 606 670
919 492 98 273 201 120 968 242 343 277
631 331 320 346 924 560 931 562 245 746
794 729 323 894 984 699 393 416 101 188
159 339 81 79 202 470 775 749 678 168
369 210 571 917 179 428 588 434 296 975
901 230 341 365 650 882 802 809 934 241
335 513 895 985 168 372 614 740 202 640
392 491 548 914 742 612 760 317 244 390
854 288 584 916 976 148 649 901 479 83
784 791 502 667 933 103 689 809 352 495
627 334 292 635 903 162 212 621 178 416
78 726 645 579 201 283 744 503 884 282
70 177 732 371 745 224 520 434 613 199
125 796 731 386 716 729 122 931 760 873
909 393 499 409 972 161 339 536 244 826
336 318 170 52 508 730 770 557 314 973
177 901 739 163 668 905 404 926 816 124
797 582 258 96 812 150 637 96 515 568
111 820 628 463 634 123 264 836 848 802
264 895 428 555 76 925 466 944 615 428
294 351 765 518 115 982 330 420 346 970
231 139 514 356 458 907 447 389 166 139
537 823 251 142 84 285 341 862 696 879
889 968 283 409 277 426 543 651 452 684
126 479 575 850 412 509 405 759 748 535
454 506 315 80 466 178 508 800 914 211
796 843 192 316 483 475 456 268 50 79
211 480 319 791 502 325 320 359 609 238
57 175 375 658 127 622 779 676 681 527
678 758 338 140 574 720 332 633 139 231
984 151 376 202 97 864 64 686 124 142
195 580 993 888 73 991 652 595 914 446
267 232 839 312 626 768 351 663 945 585
838 849 854 445 247 525 180 466 100 977
220 289 936 453 316 669 987 271 505 247
199 651 987 454 688 859 443 710 260 433
332 312 852 761 156 518 333 871 612 970
689 874 473 876 870 345 72 276 65 672
463 513 869 628 321 197 967 815 69 858
99 282 196 840 112 92 646 900 537 920
863 625 140 123 579 236 670 97 301 56
465 503 922 208 266 643 608 775 690 534
536 295 719 96 187 748 630 842 388 914
373 291 320 673 398 695 322 674 125 493
356 887 661 722 99 255 869 302 184 587
132 75 423 504 528 654 919 484 467 598
843 151 217 214 593 898 957 847 125 715
533 119 54 636 349 272 393 96 794 777
319 244 74 399 264 529 694 264 418 164
486 558 653 713 342 290 777 881 427 501
619 365 288 309 167 500 214 975 294 646
734 242 421 491 628 868 310 882 713 673
421 967 297 924 815 204 362 465 125 736
562 840 785 386 528 226 888 950 435 214
134 599 103 57 625 481 529 844 291 724
915 539 565 607 787 364 471 106 775 71
343 832 75 387 934 308 851 156 778 782
637 63 239 630 797 937 835 221 233 973
796 634 240 532 420 540 144 646 845 634
662 585 868 309 210 189 292 551 605 892
605 892 797 924 209 62 397 922 983 209
920 540 93 139 512 225 576 670 476 665
762 685 252 855 427 51 738 350 345 68
166 336 668 432 415 574 208 889 275 345
599 367 534 585 496 352 172 220 388 710
710 771 215 386 871 209 830 537 672 480
71 978 418 746 692 981 353 956 600 593
458 678 150 345 317 557 787 445 167 847
958 170 390 918 258 501 747 122 680 120
716 457 914 104 186 72 412 247 681 392
702 110 637 219 293 585 949 90 835 753
165 704 379 777 220 826 666 584 136 307
180 990 508 153 463 527 480 659 109 467
588 328 342 661 305 955 388 308 817 251
100 333 955 522 593 311 295 185 286 70
361 881 850 251 525 595 507 679 65 814
88 112 926 210 550 614 861 964 645 93
353 771 686 653 721 543 199 211 322 829
787 821 223 816 539 760 260 321 703 336
645 737 231 52 272 528 791 738 856 303
192 374 844 893 95 457 919 707 373 886
461 425 926 557 69 732 677 421 282 623
531 586 484 448 892 89 972 975 994 435
381 183 254 709 958 155 735 758 480 554
313 1000 544 97 866 467 478 186 658 71
159 871 572 113 562 264 839 531 800 835
54 991 783 294 493 525 201 882 190 613
251 211 480 214 972 651 123 412 445 786
159 370 103 808 134 945 701 600 896 749
630 969 678 892 582 781 741 123 254 484
133 436 88 884 132 826 306 447 647 659
962 982 725 551 623 845 846 662 889 645
186 52 309 89 447 514 306 397 647 118
878 92 642 276 444 812 467 590 963 687
695 823 655 992 152 712 687 399 284 141
199 849 980 868 135 447 484 670 81 630
396 473 486 964 978 383 758 400 633 619
599 880 312 384 426 733 575 541 585 623
368 999 800 425 892 682 679 434 959 692
980 755 942 828 782 838 329 451 254 854
629 206 364 373 313 126 329 324 535 703
340 999 697 247 981 421 854 949 65 544
907 669 734 650 663 558 365 453 771 675
189 757 859 268 144 446 134 879 784 871
891 451 285 328 898 496 329 619 899 156
64 641 788 230 54 270 343 164 152 995
368 416 111 469 558 900 716 239 838 692
988 576 167 91 312 63 416 107 283 452
254 155 785 233 815 743 368 865 83 971
74 348 943 816 620 410 320 964 806 300
207 570 69 905 195 378 995 247 185 537
982 743 292 411 201 222 941 575 432 126
435 792 644 894 491 962 139 891 66 309
733 614 229 691 173 903 898 291 535 776
650 188 151 77 56 205 305 94 610 281
930 181 875 590 650 187 513 704 97 803
709 620 494 879 532 740 609 787 463 241
485 103 373 465 786 752 769 730 684 98
509 128 137 777 791 395 682 687 304 112
140 324 968 172 998 78 787 870 696 782
238 660 522 182 403 550 77 446 651 52
465 291 679 467 889 239 439 115 684 561
831 137 908 340 255 620 332 894 173 798
623 298 294 91 562 677 596 409 753 571
867 291 554 401 233 102 445 233 750 516
826 235 706 328 854 195 153 170 667 600
416 521 166 779 618 296 1000 240 147 73
748 313 915 770 508 846 286 713 689 758
730 263 561 651 570 581 228 879 377 782
103 214 521 444 276 325 51 310 869 265
681 410 865 338 511 758 881 566 825 898
612 411 232 817 300 472 743 121 121 86
614 948 318 580 928 197 755 816 634 231
747 675 159 66 642 155 960 157 633 941
177 918 356 531 66 634 321 201 678 879
432 327 480 151 221 618 593 730 475 421
359 208 447 792 371 715 576 913 391 796
447 675 913 85 345 598 922 375 895 470
358 918 580 354 718 137 747 634 967 582
322 450 56 479 78 810 557 608 137 322
580 429 178 463 670 550 208 489 245 88
655 682 163 855 872 90 287 955 277 213
621 455 341 555 484 415 937 237 254 868
555 245 72 162 510 777 153 799 690 862
675 476 586 181 103 847 535 857 211 437
270 129 154 640 475 711 293 65 591 602
592 432 120 609 374 276 886 703 650 77
578 541 329 846 581 896 343 626 940 238
350 843 370 68 411 590 527 247 228 599
204 762 686 244 150 993 123 914 324 451
348 807 945 91 368 389 951 89 245 810
934 585 623 619 820 657 83 204 881 400
363 624 295 718 456 117 454 296 432 568
763 774 299 918 466 268 934 113 809 347
704 353 204 577 883 141 384 395 498 479
380 661 942 675 535 864 562 219 872 154
317 711 454 810 349 561 846 974 698 770
368 104 711 115 203 90 346 267 377 910
214 400 954 181 92 902 760 894 136 360
128 465 704 101 135 750 892 344 622 143
781 856 876 474 776 180 892 995 999 354
825 557 991 762 403 680 963 746 831 454
609 727 648 910 150 257 362 618 598 376
214 323 838 635 995 365 725 615 537 204
835 466 525 669 464 984 187 413 694 655
788 792 898 466 964 446 529 894 249 136
888 728 533 350 74 547 193 247 466 727
583 750 215 172 852 396 926 875 408 92
772 436 781 823 558 857 241 1000 962 773
304 268 399 158 533 113 757 861 60 126
652 776 63 762 621 825 422 278 857 496
834 631 612 272 76 821 771 379 592 581
824 255 396 360 665 901 388 77 72 626
195 172 527 206 330 431 860 380 741 345
564 171 353 468 352 571 442 935 881 642
924 218 495 984 329 616 339 651 453 422
414 571 573 155 171 256 717 335 515 478
642 129 394 976 193 619 940 669 720 66
598 93 514 319 322 65 518 250 710 312
607 276 685 998 666 97 774 673 418 823
845 229 438 144 549 64 66 647 565 758
257 778 191 386 454 419 664 704 462 743
265 700 597 418 139 788 114 165 407 247
51 449 235 282 714 720 60 564 850 292
490 811 76 876 857 467 908 814 840 494
834 658 85 70 450 960 960 335 141 485
295 164 670 242 142 244 204 586 807 636
870 759 449 368 534 788 841 293 393 752
251 897 227 208 224 633 861 120 195 897
741 821 227 629 474 908 495 600 498 923
160 268 685 776 132 320 172 227 796 391
898 162 324 971 962 872 643 578 315 950
143 786 386 85 257 939 817 222 815 600
826 800 320 786 384 223 77 635 700 388
841 813 700 697 377 611 667 333 231 214
810 999 836 81 157 829 934 417 390 800
852 307 267 586 356 231 519 442 845 321
948 319 760 55 635 673 653 837 806 807
248 549 924 800 580 433 799 282 208 302
624 878 111 833 899 576 268 624 128 163
285 970 633 816 202 308 548 601 445 167
484 602 932 654 342 773 214 374 481 631
903 232 562 270 254 335 627 998 870 178
517 942 536 530 324 867 908 853 148 865
892 358 444 71 885 747 110 831 147 342
835 486 886 126 878 242 838 700 533 877
828 987 923 113 141 348 252 367 375 945
544 880 566 51 872 991 908 420 867 178
705 612 967 893 522 821 595 318 601 592
823 300 760 285 215 456 973 645 621 980
603 944 628 520 256 234 458 832 425 802
382 552 998 950 201 577 64 699 539 677
470 799 142 733 928 923 829 834 233 767
705 519 495 532 210 355 818 946 373 445
255 105 607 126 54 591 766 895 174 744
714 418 354 351 423 129 640 518 877 986
411 528 78 782 877 277 361 114 490 538
69 649 158 446 164 502 327 808 183 855
579 412 970 132 646 115 88 468 417 781
313 847 940 217 377 864 527 532 987 101
521 445 592 586 422 204 574 706 657 343
479 88 176 555 636 256 140 587 218 321
429 956 436 849 482 769 464 682 293 508
787 605 671 172 517 785 450 914 480 610
788 960 202 748 51 948 377 342 525 150
153 312 107 910 137 961 885 453 693 381
891 556 808 268 262 107 110 513 779 202
497 656 519 737 566 859 53 684 257 988
619 138 149 84 398 630 487 425 116 177
450 217 474 652 302 202 425 160 572 885
930 395 809 632 656 186 77 262 874 893
431 311 324 60 676 629 894 667 472 120
724 790 752 234 633 90 147 712 157 405
674 802 880 884 683 523 996 232 238 833
213 180 915 986 958 650 280 533 575 994
412 517 610 730 800 301 542 413 696 895
137 529 465 574 890 479 998 465 894 315
125 574 831 338 519 840 312 578 760 245
819 950 187 908 275 598 332 431 791 617
484 616 601 476 764 389 572 595 577 850
250 670 994 234 894 642 371 369 657 123
119 882 744 600 661 320 327 890 108 376
211 978 797 420 209 618 489 53 187 926
697 621 674 910 920 189 73 592 797 937
663 807 484 926 566 594 134 895 332 251
756 502 755 992 234 543 326 382 774 451
249 700 314 636 374 290 213 613 426 658
818 931 516 151 943 604 968 375 342 999
440 959 746 938 941 231 117 945 675 607
587 118 177 442 754 120 523 958 813 687
859 374 827 337 642 861 373 374 734 219
766 247 310 855 894 893 391 813 842 282
290 86 142 701 672 84 646 940 479 232
725 851 259 384 663 602 335 871 988 758
500 276 743 982 665 990 653 958 800 153
166 959 663 149 251 449 739 646 487 447
823 320 726 238 685 875 554 648 331 635
326 343 783 986 889 510 543 826 409 318
604 203 383 587 999 992 757 86 429 371
570 300 350 525 505 841 818 135 796 832
54 477 989 991 168 635 558 187 226 359
54 66 952 850 291 523 294 107 932 145
792 336 701 494 212 656 916 105 563 954
854 461 758 761 463 325 282 843 751 394
742 535 661 393 871 561 681 87 333 70
566 444 416 712 65 296 673 102 652 302
94 199 193 627 333 524 531 830 986 971
900 200 56 648 850 682 393 922 655 161
965 727 842 888 908 103 287 118 183 319
700 855 909 452 109 533 777 481 194 871
386 350 207 821 775 53 753 442 109 912
220 356 106 454 606 413 305 193 85 658
691 544 493 696 69 519 824 798 363 851
87 232 378 365 592 351 81 155 104 641
597 143 821 419 105 639 137 539 161 355
377 415 469 580 258 388 659 491 997 305
257 396 539 278 822 693 695 134 762 596
76 716 423 691 851 940 791 529 320 902
793 630 832 500 403 298 197 532 480 249
856 147 637 211 779 577 992 354 517 797
182 712 778 153 401 248 234 295 739 90
650 925 346 841 248 952 564 780 952 365
622 239 284 457 678 806 524 271 904 802
503 345 627 780 817 428 851 281 757 807
889 113 425 977 929 147 164 867 407 457
927 462 312 277 496 201 271 59 786 83
565 400 388 413 230 271 676 73 460 279
188 488 598 170 638 491 455 794 340 724
954 201 999 277 60 893 958 360 564 448
752 590 989 414 128 577 961 217 787 651
143 295 226 947 893 383 641 482 177 123
54 718 377 492 385 59 144 606 126 651
148
620
347
942
80
391
344
534
740
677
714
182
791
249
864
659
177
134
693
777
198
927
101
690
928
358
633
804
425
362
257
889
646
928
720
869
905
741
867
190
940
206
656
780
799
146
361
771
82
403
919
353
669
333
695
448
101
419
886
306
421
937
476
320
854
795
76
490
341
349
951
404
158
567
187
671
908
735
291
156
115
473
977
650
733
706
231
323
932
743
276
570
604
459
384
741
219
525
753
907
435
371
407
412
599
411
885
985
475
616
717
993
545
189
436
118
818
480
106
170
387
694
152
Selecting a Range by Pointing to Top Left, Bottom Right Cells

In Excel, you usually select a range and then do something to it, such as enter a
formula in it, format it, delete its contents, and so on. Therefore, it is extremely
important to be able to select a range efficiently.

First, it is important to realize that a rectangular range is defined by its upper left
cell and its bottom right cell. For example, the range address A1:D10 indicates that
the upper left cell is A1 and the bottom right cell is D10. So an easy way to select a
range is to click its upper left cell, hold the Shift key, and click its bottom right cell.

Selecting a Range That Fits on the Screen

To select a range that fits on a screen:

Click the upper left cell of the range and drag to the bottom right cell.

Or:

Click the upper left cell, hold the Shift key, and click the bottom right cell.

Try it! Select the small data range to the right by each of these methods. They are
both easy because the range is so small.

Selecting a Range That Doesn't Fit on the Screen

Selecting a range with the top-left/bottom-right method is trickier if you can’t see
the whole range on the screen. Dragging, the method most users seem to use,
can be frustrating because things scroll by too quickly. You scroll too far, then not
far enough, then too far again, and so on. To avoid this endless scrolling , use the
following method instead.

Split the screen horizontally and vertically. To do this, select any cell in the data
range and click the Split button on the View ribbon. Then in the bottom right
pane, press Ctrl+Down Arrow and then Ctrl+Right Arrow to zoom to the bottom
right cell of the data range. Now that you can see the upper left and bottom right
cells of the range, click the upper left cell, hold the Shift key, and click the bottom
right cell. Then you can remove the split.

Try it! Select the entire data range with the method just described. With a little
practice, you should be able to do it in a few seconds.
Try it! Select the entire data range with the method just described. With a little
practice, you should be able to do it in a few seconds.
Small range that fits on the screen
9 2 10
1 3 8
8 1 10
7 5 4
5 1 1
5 10 7

Large range that doesn't fit on the screen


63 61 4 36 45 85 91 23 17 76
52 95 40 75 28 67 79 75 49 76
18 98 47 28 65 17 86 23 63 73
25 21 7 68 16 12 80 87 59 29
26 76 55 60 55 19 82 61 42 44
42 52 72 79 16 14 85 49 81 7
14 29 75 36 52 75 17 33 66 50
87 41 48 22 25 77 3 57 32 3
100 71 10 11 90 15 62 24 83 66
59 51 90 35 94 83 77 26 79 61
43 72 53 21 60 22 33 67 29 71
19 73 49 38 33 42 49 84 8 49
86 58 55 59 41 63 75 19 34 37
7 62 41 62 26 17 95 97 79 98
52 78 37 18 45 98 35 40 73 72
18 32 62 79 86 31 58 3 14 26
1 89 92 86 88 94 12 49 38 52
71 71 58 14 37 27 73 31 83 28
75 18 70 77 52 6 45 8 57 78
2 5 21 95 16 8 66 82 72 87
64 89 38 32 8 51 63 86 1 91
64 67 81 11 34 16 30 16 39 65
6 30 42 3 68 27 12 86 77 24
87 78 33 53 48 86 17 4 61 4
64 64 15 28 44 65 29 10 57 92
58 33 81 90 48 26 55 49 34 23
76 54 84 66 65 78 3 88 17 97
15 79 47 71 19 74 58 63 57 4
73 85 20 100 6 46 17 24 86 49
43 40 26 30 59 98 46 85 23 75
83 54 38 91 59 27 82 98 39 91
41 85 63 28 29 59 47 76 81 24
55 72 42 24 59 41 78 1 53 7
23 22 17 76 50 67 17 6 97 74
54 74 23 86 88 85 98 79 83 51
81 54 24 61 41 43 13 44 91 18
16 86 24 58 99 49 50 93 65 88
31 38 91 46 44 15 23 12 32 70
47 67 39 26 54 85 65 52 4 57
69 4 10 56 89 66 13 99 22 10
82 28 25 20 88 92 28 97 42 65
66 69 81 19 78 100 57 27 52 80
19 85 32 47 1 69 68 16 19 28
58 30 88 16 44 90 9 91 68 87
8 98 6 1 74 2 53 35 85 80
4 22 18 11 61 5 100 43 49 34
22 89 29 84 88 18 67 12 26 34
5 81 48 65 9 67 13 78 55 36
33 95 12 21 18 73 31 17 85 97
57 32 94 59 15 22 18 77 4 84
67 55 5 66 36 26 34 82 59 8
4 10 12 86 91 11 73 14 28 67
52 69 35 8 38 63 20 68 16 64
46 25 70 45 99 56 34 4 98 77
79 71 61 38 37 66 24 97 91 44
28 51 23 75 42 89 79 42 22 58
95 41 44 60 83 57 61 59 39 9
40 76 54 4 46 23 28 66 29 76
96 61 55 1 59 67 37 96 52 95
3 7 17 28 87 5 98 31 62 72
96 37 82 70 8 56 25 41 16 72
39 33 1 82 35 51 71 55 66 43
46 15 81 86 74 69 22 85 64 69
23 24 3 40 30 27 73 16 85 2
6 64 5 95 11 15 90 36 44 97
72 36 24 58 23 89 45 83 68 65
8 34 69 26 14 77 15 8 21 71
48 91 81 13 94 87 18 48 63 29
70 29 30 5 18 75 97 27 62 76
57 78 44 99 59 65 31 91 38 13
98 92 39 60 45 75 30 34 53 95
45 23 30 91 89 36 9 64 11 54
69 70 86 55 70 5 78 71 51 70
50 56 42 18 47 2 85 49 53 17
17 20 19 68 2 10 2 12 79 67
55 56 25 28 1 71 64 8 7 23
64 68 99 77 20 38 29 96 6 92
87 77 77 13 85 62 4 66 11 95
96 72 80 61 73 72 86 49 79 89
49 49 44 70 31 67 78 20 98 47
61 77 11 51 34 31 56 61 83 33
21 16 58 34 98 16 16 3 76 5
27 56 14 91 25 91 6 63 35 98
69 9 80 23 78 100 6 96 47 41
25 30 92 61 71 26 85 93 71 55
33 13 51 65 39 29 26 41 17 65
57 3 79 32 66 4 18 40 62 45
47 88 15 53 21 64 70 1 78 81
84 100 79 8 5 42 12 28 95 25
56 28 72 4 48 24 95 93 61 92
97 11 80 93 63 95 86 51 19 2
84 29 81 94 78 9 7 89 73 42
6 20 53 54 18 4 82 59 48 62
63 10 72 6 36 30 88 50 5 57
15 87 60 88 86 45 36 76 98 59
54 16 18 26 17 24 26 34 94 59
3 11 85 63 41 71 15 42 87 85
24 41 43 29 67 82 62 63 14 59
85 64 24 24 49 30 78 73 44 70
68 20 2 43 85 42 58 20 43 73
51 49 14 73 98 20 67 33 84 7
87 38 25 46 61 68 17 26 43 20
59 86 33 25 95 28 55 17 6 92
91 96 93 29 54 7 56 2 38 88
15 74 17 57 89 12 64 28 100 76
53 7 40 45 83 35 76 57 8 24
83 8 31 50 96 96 33 80 20 14
11 52 3 58 61 34 51 43 90 73
83 37 53 99 90 65 91 21 95 48
77 31 75 6 72 36 39 51 25 72
49 12 36 47 54 76 39 22 5 30
65 34 60 47 82 72 33 20 74 52
84 32 10 84 74 22 10 26 39 64
6 88 15 60 13 17 92 71 45 45
59 20 62 17 80 12 17 78 96 55
8 30 73 2 52 71 29 21 41 59
22 27 1 50 3 15 13 41 71 13
1 79 98 30 14 12 63 11 54 41
18 90 45 74 53 80 71 3 35 74
45 72 47 25 73 82 45 29 39 100
9 78 17 35 52 54 93 74 77 66
71 63 73 18 49 41 19 11 42 49
24 38 39 66 100 74 73 12 87 42
71 49 91 9 29 46 57 47 10 98
10 76 40 93 79 81 33 7 97 43
18 86 17 49 63 39 11 36 23 63
53 17 97 64 53 44 53 28 85 29
86 25 77 59 36 86 43 73 23 68
63 99 36 53 34 59 36 36 61 84
48 60 41 33 53 1 99 83 15 65
95 47 63 73 89 94 98 4 33 90
58 75 86 75 87 12 86 60 9 93
70 92 42 91 29 47 1 6 61 53
29 57 83 93 81 40 15 68 41 45
99 92 40 22 35 2 22 16 75 16
7 62 71 50 62 16 12 49 28 73
37 22 59 66 40 58 66 14 77 3
10 74 12 13 94 72 74 86 71 33
52 32 71 18 55 72 48 65 84 87
94 49 11 94 84 79 37 61 48 32
20 5 77 86 5 19 71 53 94 65
17 99 90 76 84 14 2 41 63 23
20 44 68 34 47 77 75 8 15 98
99 41 50 82 67 13 72 40 99 95
48 77 13 71 63 5 32 53 14 40
64 93 34 51 48 55 4 36 28 63
16 6 60 50 91 58 50 74 27 69
3 18 66 54 58 74 33 95 84 63
35 9 85 46 78 100 79 62 86 36
70 8 93 88 42 64 8 96 51 12
8 68 10 100 42 10 42 28 52 74
48 77 78 55 91 47 41 83 94 91
51 67 58 70 51 87 24 24 86 36
93 73 40 50 46 24 40 58 83 53
15 42 28 56 33 99 10 30 73 51
60 90 85 83 53 39 66 37 79 6
99 57 13 74 28 33 70 22 90 29
52 100 9 74 100 64 46 37 32 98
88
24
25
67
50
67
93
4
16
63
70
50
37
76
27
65
13
55
91
99
71
71
49
45
87
42
76
56
25
61
97
98
1
41
25
79
69
78
43
24
75
50
3
30
82
44
37
8
25
37
56
51
6
31
67
8
5
54
36
26
35
73
37
5
25
69
100
5
60
45
13
95
46
54
94
16
95
78
10
Selecting Multiple (Discontiguous) Ranges

Suppose you want to format more than one range in a certain way. The quickest
way is to select all ranges at once and then format them all at once.

To select multiple ranges:

Select the first range, press the Ctrl key, select the second range, press the Ctrl
key, select the third range, and so on.
For example, to select the top two ranges to the right, select cell K3, hold the
Shift key and select cell L5 (so now the first range is selected), hold the Ctrl key
and select cell N3, and release the Ctrl key. Finally, hold the Shift key and select
cell O7.

Try it! Select all three numeric ranges to the right.

Note that in Excel 2007, the highlighting is sometimes hard to see. The shading
isn’t as dark as in previous versions of Excel, so you might be fooled into thinking
you haven’t really selected multiple ranges. But the above method definitely
works, exactly as it always has. (This shading problem was fixed in Excel 2010, so
that the selection is now much more apparent.)
10 13 7 9
1 9 12 7
5 4 1 1
6 12
15 2

13 4 10
Paste Special Options

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.

The Paste Special user interface has evolved over recent versions of Excel, but
the options remained about the same. Is it more user-friendly now than in the
past? You can be the judge of that. However, one really nice feature
introduced in Excel 2010 is that if you copy a range, select a paste range, and
then hover your mouse over any of the Paste Special icons, you immediately
see what the pasted version will look like, without committing to the paste.

Before continuing, be aware that one other way to get to Paste Special
options is to copy and then right-click. This option was available in pre-2007
versions of Excel, and it continues to be available. In addition, starting in Excel
2007, you can go directly to the Paste Special dialog box with the Ctrl+Alt+v
shortcut.

The rest of this worksheet explains and illustrates some of the Paste Special
options, using both the Paste Special dialog box and the gallery of icons under
the Paste dropdown. Note that one Paste Special option, transposing, is
discussed in the Transposing a Range topic of the tutorial.

Paste Special Icons

A lot of users are not too happy with the Excel 2013 (or 2010) gallery of Paste
Special icons. Although you get tool tips when you hover the mouse over any
of them, they are fairly small icons, and they can certainly be confusing.
Therefore, many users jump right to the Paste Special dialog box where
everything is spelled out in words. You might want to do this as well, but you
might also want to learn what these new icons do. They are explained briefly,
row by row, to the right. For more details on any of them, see the cell
comments in column N.

Many of these icons have the same functionality as the corresponding items in
the Paste Special dialog box. However, the dialog box has some items with no
corresponding icons and vice versa. In any case, there is no need to memorize
of them, they are fairly small icons, and they can certainly be confusing.
Therefore, many users jump right to the Paste Special dialog box where
everything is spelled out in words. You might want to do this as well, but you
might also want to learn what these new icons do. They are explained briefly,
row by row, to the right. For more details on any of them, see the cell
comments in column N.

Many of these icons have the same functionality as the corresponding items in
the Paste Special dialog box. However, the dialog box has some items with no
corresponding icons and vice versa. In any case, there is no need to memorize
all of the options. The ones illustrated below are the ones you will probably
use most often, and you can always return to this worksheet or online help for
others you might occasionally use.

By the way, the options you see depend on what is currently copied. For
example, if nothing is copied, the entire Paste button is disabled. If a range of
cells (or a single cell) is copied, all of the icons are shown. If a chart or a shape
(a text box, a rectangle, a picture, etc.) is copied, only three of the icons are
shown.

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.

To copy formulas and paste as values:

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!

Ctrl+c Alt+e s Down arrow Down arrow Enter


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!

Ctrl+c Alt+e s Down arrow Down arrow Enter

Pasting Special: Formulas Only, Not Formats

Sometimes you want to paste formulas to a range, but you don't want to change
the formatting of the paste range. You can do this in Excel 2010 or 2013 with the fx
icon in the first row of Paste Special icons, or you can do it in the Paste Special
dialog box with the Formulas option.

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.

Pasting Special: Formats Only

You frequently want to copy only the formatting of a range.

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!

To multiply a range by a constant:

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.
Paste dropdown

Paste Special dialog box

First row, left to right:


Paste
Paste formulas only, not formats
Paste formulas and formats
Keep source formatting

Second row, left to right:


Paste everything except borders
Paste everything and keep same column widths
Paste as transpose

Third row, left to right:


Paste as values, no formulas
Paste as values with number formatting
Paste as values, keep source formatting

Fourth row, left to right


Paste formatting only
Paste links to copied cells
Paste as picture
Paste as linked picture

$132 $192 $324


$282 $128 $410
$285 $266 $551
$230 $129 $359
$111 $296 $407
$211 $191 $402
$190 $251 $441

$132 $192 $324


$282 $128 $410
$285 $266 $551
$230 $129 $359
$111 $296 $407
$211 $191 $402
$190 $251 $441
$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
Transposing a Range with Paste Special

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.

To use the TRANSPOSE function:

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.

2. Enter the formula in the syntax =TRANSPOSE(copy_range), where


copy_range is the address of the range to be copied. (A range name would
also work.)

3. Press Ctrl+Shift+Enter (all three keys at once), not just Enter. You always use
this key combination to enter an array formula.

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.
also work.)

3. Press Ctrl+Shift+Enter (all three keys at once), not just Enter. You always use
this key combination to enter an array formula.

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.
Transpose icon Paste Special dialog box

Jan Feb Mar Totals


North 2300 3200 4500 $10,000
West 4300 3500 4200 $12,000
East 5500 6500 6000 $18,000
Totals $12,100 $13,200 $14,700 $40,000

Jan Feb Mar Totals


North 2300 3200 4500 $10,000
West 4300 3500 4200 $12,000
East 5500 6500 6000 $18,000
Totals $12,100 $13,200 $14,700 $40,000
http://www.shortcutwor
Shortcut Keys http://www.shortcutwor
http://www.veodin.com/
It is probably fair to say that the world of Excel users is composed of two
groups: mousers and keyboarders. The developer of this tutorial falls into
the mouse group, and this explains why the tutorial might be somewhat
lacking in shortcut key tips. However, there are plenty of you in the
keyboarders group, and you would probably like some more help on
shortcut keys.

The question is where to start. Probably everyone knows the following


shortcut keys:

Ctrl+s: save a file


Ctrl+o: open a file
Ctrl+n: open a new file
Ctrl+p: print

But how many other shortcuts do you know? And how many can you
possibly remember? If you do a Web search for "shortcut keys in Excel",
you will get plenty of hits. For example, the three sites shown in the
hyperlinks to the right list more shortcuts than anyone could ever
remember. Of course, most of these shortcuts are the same for 2007 and
later versions, and many are relevant for pre-2007 versions of Excel. But to
say the least, these lists can be overwhelming. Therefore, only a very
subjective list has been included here, and you will find a few of these,
plus a few others, in other topics in this tutorial.
Conventions: The plus sign, as in Ctrl+a, means to press both keys at the
same time. Also, an uppercase F followed by a number, such as F12, refers
to one of the "function" keys near the top of the keyboard.

By the way, if you remember the old menu shortcut keys from pre-2007
versions of Excel, such as Alt+e and then d for deleting selected rows or
columns, you can probably continue to use them. Old habits die hard, so
Microsoft kept most of these for backward compatibility. However, they
are not listed here.

Selecting and Moving

Ctrl+Home: go to cell A1

Ctrl+End: go to the bottom right nonempty cell

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
Ctrl+Home: go to cell A1

Ctrl+End: go to the bottom right nonempty cell

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+Spacebar: select the entire row

Ctrl+Spacebar: select the entire column

Ctrl+a: select the range of data surrounding the active cell, or press twice
to select the entire worksheet

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+Tab or Ctrl+Shift+Tab: move to the next (or previous) open workbook

Clipboard and Undo

Ctrl+c: copy

Ctrl+x: cut

Ctrl+v: paste

Ctrl+Alt+v: open the Paste Special dialog box (if clipboard is nonempty)

Ctrl+z: undo last action

Ctrl+y: redo last action


Ctrl+z: undo last action

Ctrl+y: redo last action

Formatting

Ctrl+b: boldface (or remove boldface)

Ctrl+i: italicize (or remove italics)

Ctrl+u: underline (or remove underline)

Ctrl+Shift+& (ampersand): apply an outline border

Ctrl+Shift+_ (underscore): remove an outline border

Ctrl+Shift+$: apply a currency format with two decimals

Ctrl+Shift+%: apply a percentage format with zero decimals

Ctrl+Shift+#: apply a date format with day, month, and year

Ctrl+Shift+! (exclamation): apply a number format with two decimals,


comma separator, and minus sign for negative numbers

Formulas and Range Names

F4: enter dollar signs for an absolute address (or keep pressing to cycle
through relative/absolute possibilities)

Alt+= (equals sign): insert an AutoSum formula

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+F3: open the Name Manager dialog box


Ctrl+shift+F3: create range names from row/column labels

F3: paste a range name into a formula

Ctrl+Shift+Enter: enter a formula as an array formula (e.g., when using


MMULT for matrix multiplication)
Ctrl+Shift+Enter: enter a formula as an array formula (e.g., when using
MMULT for matrix multiplication)

Miscellaneous

F12: display the Save As dialog box

F1: display the Excel Help window

F2: display the formula in a selected cell (instead of looking the Formula
bar)

F5: display the GoTo dialog box

F7: open the Spelling dialog box

Alt+F11: display the Visual Basic Editor (to write macros)

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+' (apostrophe): open the Style dialog box

Ctrl+; (semicolon): insert current date (but not as a formula)

Ctrl+shift+: (colon): insert current time (but not as a formula)


http://www.shortcutworld.com/en/win/Excel_2007.html
http://www.shortcutworld.com/en/win/Excel_2010.html
http://www.veodin.com/excel-2013-shortcuts/
General Comments About Worksheets

Worksheets are where you place your data and formulas in Excel. Many
people call them "sheets" but this isn't exactly accurate. Strictly speaking, a
worksheet is a sheet that has rows and columns--a rectangular grid of cells.
There is another kind of sheet, called a chart sheet. This type of sheet has no
rows or columns, only a chart. The discussion here is mainly about
worksheets, not chart sheets. The actions discussed below are things you will
do every day, so you need to know how to do them efficiently.

Renaming a Worksheet

The name of a worksheet appears in its tab at the bottom of the screen.

To rename a worksheet:

Double-click its tab and type a new name.

Try it! Rename this worksheet as Worksheet Tasks. Then change its name
back to Topic.

New Sheet button


Adding a New Worksheet

You often need to add new worksheets. This is very easy.

To add a new worksheet:

Click the button to the right of your rightmost worksheet tab, the one
shown to the right. (It was a different icon in Excel 2007 and 2010.) This
creates a new worksheet to the right of the rightmost sheet with a generic
name such as Sheet3, which you can then rename.

In some situations, you might not want the new sheet to be way out to the
right. There is another option. You can right-click a worksheet tab, select
Insert, and select a blank worksheet as the item to add. The new
worksheet will be placed to the left of the tab you right-clicked.

Try it! Create a new worksheet to the left of this one and rename it
Practice1.
Selecting One or More Worksheets

You can select one or more worksheets. The active worksheet is the one
you are viewing. Its tab is boldfaced. But others can be selected as well. If
you do anything to the active worksheet, such as format a cell or enter a
value, the same thing is done to all of the selected worksheets. This can
save a lot of time with common labels, formulas, and formatting.

To select multiple adjacent worksheets:

Click the tab of the leftmost of these, hold down the Shift key, and click
the tab of the rightmost of these.

To select multiple nonadjacent worksheets:

Click the tab of any of them, hold down the Ctrl key, and click the other
tabs you want to select.
When multiple worksheets are selected, one will be active, but the tabs
of the others will also be highlighted, indicating that they are selected.
(In Excel 2013, the active sheet's tab is green; the others are black.) They
will remain selected until you click the tab of some other worksheet.
There is one exception to this. If all of the worksheets are selected, you
can click any other worksheet tab to activate it and deselect all of the
others.

Try it! You should already have a Practice1 worksheet. Create several
more new worksheets to its right and rename them Practice2, Practice3,
and so on. Then select them all and enter the label "This is practice" in
cell A1 of the active worksheet, Practice1. By viewing the other Practice
worksheets, you should see that they all have this label in cell A1. Finally,
activate the worksheet you are reading now (Topic). This deselects the
Practice worksheets.

Deleting One or More Worksheets

You can delete one or more worksheets. However, if you try to delete all of
the worksheets, Excel will warn you that at least one has to remain.

To delete one or more worksheets:

Select the ones you want to delete, as explained in the previous text box.
Then right-click any of the selected tabs. This brings up a context-sensitive
menu, which has a few options you might want to try. For now, select
Delete.

Note that if the worksheets have any contents, you will be asked if you really
want to delete them. Deleting worksheets can be dangerous because it
cannot be undone. So be careful!
menu, which has a few options you might want to try. For now, select
Delete.

Note that if the worksheets have any contents, you will be asked if you really
want to delete them. Deleting worksheets can be dangerous because it
cannot be undone. So be careful!

Moving or Copying a Worksheet

You can also move or copy a worksheet. You can do this in one of two
ways: by dragging tabs or through the Move or Copy menu item. The first
way is easier; the second gives you more options.

To move or copy a worksheet by dragging its tab:

Drag the worksheet's tab right or left to the position you want. If you
hold down the Ctrl key while you are dragging, you will make a copy of
the worksheet.

Try it! Move this worksheet to some other position, and then move it
back again. Next, make a copy of this worksheet, just to the right of its
current position. The copy will have the name Topic (2), which you can
then rename if you want. For now, delete the copy.

To move or copy a worksheet with the Move or Copy menu item:

Right-click the worksheet's tab and select Move or Copy, as shown to the
right. This brings up the Move or Copy dialog that lets you select the Move or Copy menu item
workbook you want to move or copy to, including a new workbook, the
position within that workbook, and whether you want to create a copy. If
you select a different workbook and don't check the latter option, the
worksheet will be removed from the current file; it will move to the other
workbook. So be careful.

Try it! If necessary, create a new worksheet called Practice and enter
some data in it. Then move it to a new workbook. It will disappear from
this workbook and appear in a new one. You can then close the new
workbook without saving to delete it.

Hiding or Unhiding a Worksheet

Finally, you can hide or unhide a worksheet. For example, you might
want to hide, but not delete, a worksheet that contains technical data
used in formulas in other worksheets. Of course, you might receive such
a file, with formulas you can't figure out because they refer to data on a
hidden worksheet. If you sense that something mysterious is going on,
check whether there are any hidden worksheets!

To hide a worksheet:

Right-click the worksheet's tab and select Hide.


Finally, you can hide or unhide a worksheet. For example, you might
want to hide, but not delete, a worksheet that contains technical data
used in formulas in other worksheets. Of course, you might receive such
a file, with formulas you can't figure out because they refer to data on a
hidden worksheet. If you sense that something mysterious is going on,
check whether there are any hidden worksheets!

To hide a worksheet:

Right-click the worksheet's tab and select Hide.

To unhide a worksheet:

Right-click any worksheet's tab. If the Unhide option is disabled, you


know there are no hidden worksheets. (Well, this isn't quite true. See the
note below.) Otherwise, select Unhide. You will see a list of the hidden
worksheets, and you can choose the one you want to unhide.
Unfortunately, if there are several hidden worksheets, you have to
unhide them one at a time; you can't unhide them all at once.

Try it! Hide this worksheet. Then unhide it.

Note: It is possible that there is at least one hidden worksheet even if the
Unhide option is disabled. By using a macro, it is possible to set the
status of a worksheet to "very hidden." Such worksheets can be
unhidden only through another macro. Software companies sometimes
create very hidden worksheets because they know these worksheets
would only confuse users, or because they don't really want users to see
their contents.

Going to the First or Last Worksheet, starting in Excel 2013

In pre-2013 versions of Excel, there are two buttons at the lower left corner
of the Excel window for going to the left through the worksheets. The second
takes you to the previous worksheet, and the first takes you the whole way
back to the first (leftmost) worksheet. Similarly, there are two buttons for
going to the right. Starting in Excel 2013, there are only two buttons, one for
going to the previous worksheet and one for going to the next worksheet.

Fortunately, if you press the Ctrl key and one of these newer buttons, it takes
you to the first or last worksheet. This can save plenty of scrolling if you have
dozens of worksheets, so it is definitely a tip worth remembering!
New Sheet button
Move or Copy menu item Move or Copy dialog box
A-Z and Z-A buttons on Da
Simple Sorting with A-Z or Z-A

Sorting, which usually means putting in alphabetical order or increasing


or decreasing numerical order, is a common and simple operation.
However, there are some nonobvious things you should know.

The usual situation is that you have a data set such as the one to the
right. If you want to perform a simple sort on any of its columns, select Person
any single data cell in this column and click the A-Z or the Z-A button. You 1
can find these buttons under the Sort & Filter dropdown on the Home 2
ribbon, and they are also on the Data ribbon. But because they are used
so often, you probably ought to add them to your Quick Access Toolbar 3
so that they are always available. 4
5
Try it! Sort on any of the columns to the right, either in A-Z or Z-A order.
Note that when you sort on any column such as Salary, the other columns 6
change accordingly. That is, each row remains intact. Of course, this is the 7
behavior you would expect and want. 8
You can undo a sort, but just in case, it is often nice to have an "ID" 9
column with consecutive integers, 1, 2, 3, etc. This is the role of the 10
Person column in this data set. No matter how many sorts you do, you
can return to the original sort order by sorting (A-Z) on Person. 11
12
13
14
15
16
17
18
19
Sorting the Correct Range
20
The above instructions said to select a single cell before you click A-Z or Z-A. If 21
you select a range, such as the entire State column, and then click A-Z or Z-A, 22
you will be asked if you want to expand the selection (meaning to the full data
set) or continue with the current selection. You almost always want to expand
the selection. If you continue with the current selection, only the Salary values
will be sorted, and the sorted salaries will not correspond to the right people.

Custom Sort button on Da


Custom Sorts

Excel gives you many more sort possibilities with its Custom Sort item
under the Sort & Filter items (on both the Home and Data ribbons). When
you click either of these, you seel the Custom Sort dialog box to the right
where, among other things, you can add levels. The data set above
illustrates why you might want to do this. Suppose you want to sort so
that all of the females are at the top. Then within each gender, you would
like to sort in A-Z order on State. Then if there are multiple people of a
given gender in the same state, you would like to sort them in decreasing
order of Salary. This is possible only with a custom sort with three levels:
first Gender, then State, then Salary. The correct settings for this sort are
shown to the right.
under the Sort & Filter items (on both the Home and Data ribbons). When
you click either of these, you seel the Custom Sort dialog box to the right
where, among other things, you can add levels. The data set above
illustrates why you might want to do this. Suppose you want to sort so
that all of the females are at the top. Then within each gender, you would
like to sort in A-Z order on State. Then if there are multiple people of a
given gender in the same state, you would like to sort them in decreasing
order of Salary. This is possible only with a custom sort with three levels:
first Gender, then State, then Salary. The correct settings for this sort are
shown to the right.
Try it! Sort the above data set as explained in the previous paragraph.
Check that it works as intended.

Try it again! This time have the three levels be Salary, then State, then
Gender. Do you see the difference? There are no ties on Salary, so once
Salary is sorted, no more sorting takes place. In general, the lower levels
apply only when there are ties in the levels above them.

Grade
Sorting Text A+
A
Sorting columns of text can be tricky, especially when non-alphabetic
symbols are present. For example, sort in A-Z order on the Grade column A-
to the right. Is this what you expected? Probably not. (See the next text B+
box for a fix.) B
What about the Name column to the right, where some names are upper B-
case and some are lower case? By default, the sort order is case-insentive, C+
that is, case doesn't matter. Try sorting on Name with the A-Z button. They C
are indeed sorted in alphabetical order, except that the Name label got
sorted too. (Press Ctrl+z to undo this sort.) To prevent the label getting C-
sorted, bring up the Custom Sort dialog box and check the "My data has D+
headers" option.
D
While you are in Custom Sort dialog box, note the Options button at the D-
top. One option is to check or uncheck the "Case sensitive" box. It is F
probably unchecked by default. However, check it and then sort on the
Name column to the right. It is still sorted in alphabetical order, ignoring
case. This appears to be a bug in Excel, or at least it's unexpected.

Order
Creating a Custom List for Sorting 1
2
Sometimes you want to sort in a "natural" order, such as months in a year 3
(Jan, Feb, etc.) or days of the week (Sun, Mon, etc.). You can do this with
a custom list. To get to this option, bring up the Custom Sort dialog box, 4
click the Order dropdown, and select Custom List. (You can also get to the 5
Custom Lists dialog box from the Advanced group in Excel Options.) As
shown to the right, you will see several custom lists built into Excel: the 6
months of the year and the days of the week, either three-letter
abbreviations or written out. You can also click NEW LIST and enter your
own custom list. This new custom list is remembered on your PC for later
uses.
Sometimes you want to sort in a "natural" order, such as months in a year
(Jan, Feb, etc.) or days of the week (Sun, Mon, etc.). You can do this with
a custom list. To get to this option, bring up the Custom Sort dialog box,
click the Order dropdown, and select Custom List. (You can also get to the
Custom Lists dialog box from the Advanced group in Excel Options.) As
shown to the right, you will see several custom lists built into Excel: the
months of the year and the days of the week, either three-letter 7
abbreviations or written out. You can also click NEW LIST and enter your 8
own custom list. This new custom list is remembered on your PC for later
uses. 9
10
You will probably create custom lists for sorting only for lists you use 11
frequently. For example, if you are an instructor and typically have a list
of possible grades as in the Grade range above, you might want to create 12
a custom list with the grades in the "natural" order. But if this is a list you 13
need only once, it is easier to enter the grades manually in the order you 14
want them.
15
Try it! Sort on Day, using the built-in custom list. Then create a new 16
custom list with items Morning, Afternoon, Evening, in this order, and
sort on Time using this custom list. 17
18
19
20
21
22
23
24
25
A-Z and Z-A buttons on Data ribbon

Age Gender State Children Salary


35 Male Ohio 1 $65,400
61 Female Illinois 2 $62,000
35 Male Illinois 0 $63,200
37 Male Indiana 2 $52,000
32 Female Ohio 3 $81,400
33 Female Illinois 3 $46,300
65 Female Illinois 2 $49,600
45 Male Ohio 1 $45,900
40 Male Illinois 3 $47,700
32 Female Ohio 1 $59,900
57 Male Illinois 1 $48,100
38 Female Indiana 0 $58,100
37 Female Indiana 2 $56,000
42 Female Ohio 2 $53,400
38 Female Ohio 2 $39,000
48 Male Ohio 1 $61,500
40 Male Indiana 0 $37,700
57 Female Indiana 2 $36,700
44 Male Illinois 2 $45,200
40 Male Ohio 0 $59,000
21 Female Indiana 2 $54,300
49 Male Ohio 1 $62,100

Custom Sort button on Data ribbon Custom Sort dialog box


Name
BOB
charlie
CHRIS
doug
FRED
jenny
MARY
sam
TOM

Time Day Custom Lists dialog box


Morning Saturday
Evening Wednesday
Evening Saturday
Afternoon Friday
Evening Tuesday
Morning Tuesday
Afternoon Monday
Afternoon Saturday
Afternoon Monday
Morning Tuesday
Evening Sunday
Morning Monday
Afternoon Wednesday
Morning Friday
Afternoon Saturday
Morning Tuesday
Afternoon Thursday
Afternoon Friday
Afternoon Friday
Evening Thursday
Morning Sunday
Morning Monday
Morning Sunday
Morning Sunday
Morning Saturday
Print dialog box
Print Options
Printing Excel worksheets is easy. Well, sort of. If you want to print a
worksheet, activate it and press Ctrl+p. Alternatively, you can click the
File button and then Print. Either method brings up the dialog box to the
right, showing the printer and a number of print settings. You can simply
click Print and hope for the best. However, as you have probably
experienced, the printout might not be what you want. There might be
too many pieces of paper printed, and they might be broken into pages
in an unappealing way.
Starting in Excel 2010, this Print dialog box shows all print options in a
single convenient location. You ought to spend some time getting used to
it. However, you can continue to use the older Page Setup dialog box if
you prefer. You can get to this from the link in red to the right. The Page
Setup dialog box has four tabs, two of which are shown below.

You can experiment with the print options. You do have a lot of control
over what is printed and how it looks on the paper. For example, you can
select the bottom dropdown in the dialog box to the right and select Fit
Sheet on One Page to get everything on a single piece of paper.
Note: You might sometimes find that certain objects like text boxes,
buttons, and arrows do not get printed. To remedy this, right-click any
such object, select Size and Properties, and click the Properties tab. This
contains a "Print object" option that you can check or uncheck.

Page tab on Page Setup dialog box Sheet tab on Page Setup dialog box
Reasons for Relative/Absolute Addressing

Absolute and references are indicated in formulas by dollar signs


(absolute) or the lack of dollar signs (relative), and they indicate what
happens when you copy or move a formula. You typically want some
parts of the formula to stay fixed (absolute) and others to change relative
to the cell position.

This is an extremely important concept in Excel. There is no better way to


be efficient (and avoid errors) than to set up a spreadsheet for copying.
This often requires some careful planning, but the time spent in planning
is more than made up for by efficient copying. So always be on the
lookout for ways to make copying possible, and then take advantage of
relative/absolute addressing in your formulas to get the correct results.

Here are two important things to remember:


1. The dollar signs are relevant only for the purpose of copying or
moving; they have no inherent effect on the formula itself. For example,
the formulas =5*B3 and =5*$B$3 in some cell produce exactly the same
result. Their difference is relevant only if you want to copy the formula to
some range.

2. There is never any need to type the dollar signs. You can do it with the
F4 key. This is explained in more detail below.

Creating Relative/Absolute Addresses

To make a cell reference absolute or mixed absolute/relative using the F4


key:

Enter a cell reference such as =B3 in a formula. Then press the F4 key.

In fact, if you press the F4 key repeatedly, you cycle through the
possibilities: B3 (neither row nor column fixed), then $B$3 (both column B
and row 3 fixed), then B$3 (only row 3 fixed), then $B3 (only column B
fixed), and back again to B3.

Try it! Enter the appropriate formula in cell L35 and copy across to O35.
(Scroll to the right to see the answer.)

Try it again! Enter one formula with appropriate absolute/relative


addressing in cell M41 that can be copied to M41:P45. (Scroll to the right
to see the answer.)
Try it again! Enter one formula with appropriate absolute/relative
addressing in cell M41 that can be copied to M41:P45. (Scroll to the right
to see the answer.)
Fixed cost $50
Variable cost $2

Month Jan Feb Mar Apr


Units produced 224 194 228 258
Total cost

Table of revenues for various unit prices and units sold

Units sold
50 100 150 200
Unit price $3.25
$3.50
$3.75
$4.00
$4.25
Fixed cost
Variable cost

Month
Units produced
Total cost

Unit price
$50
$2

Jan Feb Mar Apr


224 194 228 258
$498 $438 $506 $566

Units sold
50 100 150 200
$3.25 $162.50 $325.00 $487.50 $650.00
$3.50 $175.00 $350.00 $525.00 $700.00
$3.75 $187.50 $375.00 $562.50 $750.00
$4.00 $200.00 $400.00 $600.00 $800.00
$4.25 $212.50 $425.00 $637.50 $850.00
Defined Names group in F
Basics of Named Ranges

Range names are used for one basic purpose: to make your formulas
more readable. After all, which formula do you prefer: =B20-B21 or
=Revenue-Cost? Efficient use of range names takes some experience, but
this worksheet provides a few useful tips.

A range name can be applied to a single cell or to any range of cells. There
are a few rules for the names you can use. The most important are that
(1) the names cannot include a few "illegal" characters, the most common
being spaces, and (2) they can't look like cell addresses. For example,
DAN37 is illegal because DAN37 is a cell address.

You can definitely go overboard in the use of named ranges, and you can
err in the other direction by refusing to use them. You should use some
discretion (and possibly company policy) when deciding how extensively
to use range names.

Range names have been available for many years, but they are more
prominent in Excel 2007 and later versions. Their functionality is in the
Defined Names group, right in the middle of the Formula ribbon, as
shown to the right.

Name box to left of Formu


Naming a Range in the Name Box

The easiest and best-known way to name a range is to use the Name box,
just to the left of the Formula bar. This is shown to the right, where the
Name box originally contains a cell address.

To create a range name with the Name box:

Select a range you want to name, which can be a single cell, click in the
Name box, type a range name, and press Enter. Don't forget to press Enter
after typing the range name or the name you type won't "stick." 71
15
Try it! Name the gray range to the right Data. 14
The Name box is also useful for finding named ranges. To do so, click the 40
dropdown arrow in the Name box to see a list of all range names, and click 28
one of them. This will select the corresponding range. 41
28

Using the Name Manager

You get much more control of named ranges by clicking the Name Manager
on the Formulas ribbon. This displays the dialog box to the right. It shows a
Name Manager dialog box
Using the Name Manager

You get much more control of named ranges by clicking the Name Manager
on the Formulas ribbon. This displays the dialog box to the right. It shows a
list of all range names in your workbook, the values in these ranges, and the
corresponding range addresses. You can select any range name and then Edit
or Delete it. (Delete doesn't delete the contents of the range; it only deletes
the range name.) You can also click the New button to create a new named
range. In this case, you need to supply a name and an address.

Try it! Rename the above gray range of numbers MyData. Then delete the
MyData range name. Then use the Name Manager to create the Data range
name again.

Using the Create from Selection Shortcut

Suppose you have the labels such as Revenue, Cost, and Profit in some
range, and you would like the adjacent cells (which will contain the values
of revenue, cost, and profit) to have these range names. There is a very Create Names from Selecti
quick way to do this.

To create range names from adjacent labels:

Select the range consisting of the labels and the cells to be named. Then
click the Create from Selection button in the Defined Names group on the
Formulas ribbon. In the resulting dialog box, make sure the appropriate
option (in this case, Left Column) is checked, and click OK. Excel tries,
usually successfully, to guess where the labels are that you want to use as
range names. You can always override its guess.

Try it! Name each of the colored ranges to the right (but not the totals)
with the labels above them. You will notice that Excel guesses Top row and
Left column. You can uncheck Left column unless you want the rows to be
named by the month names.

Apply Names option


Applying New Range Names to Existing Formulas

If you create range names and then create formulas that reference these
ranges, Excel uses the range names automatically. Sometimes, however,
you do it in the opposite order. That is, you enter a formula using cell
addresses, such as =B20-B21, and later you name B20 as Revenue and
B21 as Cost. The formula does not change to =Revenue-Cost
automatically. However, you can make it change, and hence become more
readable, as follows.

To apply range names to an existing formula:

Select Apply Names from the Define Name dropdown in the Defined
Names group, as shown to the right. Then select all range names that you
want to apply to any cell formulas. For example, if you select all range
you do it in the opposite order. That is, you enter a formula using cell
addresses, such as =B20-B21, and later you name B20 as Revenue and
B21 as Cost. The formula does not change to =Revenue-Cost
automatically. However, you can make it change, and hence become more
readable, as follows.

To apply range names to an existing formula:

Select Apply Names from the Define Name dropdown in the Defined
Names group, as shown to the right. Then select all range names that you
want to apply to any cell formulas. For example, if you select all range
names in the list, all formulas that reference any of these named ranges
will change to show the corresponding range names.

Try it! You should now have the range names UnitsSold and Revenue for
the red and orange ranges to the above right. Apply these to all formulas
that reference them, that is, to the SUM formulas in darker red and
orange cells.

Paste Names option


Pasting a List of Range Names for Documentation

If you have many range names, it is often useful to show a list of them and
the range addresses they apply to. This is easy.

To paste a list of all range names on a worksheet:

Select a cell with plenty of blank space below it, select the Use in Formula
dropdown in the Defined Names group, and click the Paste Names option, as
shown to the right.

Try it! Paste a list of all range names, starting in the gray cell to the right.
Defined Names group in Formulas ribbon

Name box to left of Formula bar

31 9 69 5
74 46 84 27
49 25 38 83
43 20 75 83
72 30 92 75
56 90 89 73
81 43 81 61
Name Manager dialog box

Create Names from Selection dialog box


Month UnitsSold UnitPrice Revenue
Jan 100 $1.25 $125.00
Feb 150 $1.25 $187.50
Mar 200 $1.40 $280.00
Apr 230 $1.40 $322.00
May 200 $1.50 $300.00
Jun 300 $1.50 $450.00
Totals 1180 $1,664.50

Apply Names option


Paste Names option Range names used in this workbook:
SUM function (Math & Trig Category)

The SUM function is probably the most used Excel function of all. It sums
all values in one or more ranges.

To use the SUM function: Table of costs for units pro


for use in another month (
Enter the formula =SUM(range), where range is any range. This sums the
numeric values in the range. If there are any nonnumeric or blank cells in
this range, they are ignored.

Actually, it is possible to include more than one range in a SUM formula, Jan
separated by commas. (This can also be done with the COUNT, COUNTA, Feb
AVERAGE, PROLDUCT, MAX, and MIN functions, among others.) For Mar
example, =SUM(B5,C10:D12,Revenues) is allowable, where Revenues is
a range name. The result is the sum of the numeric values in all of these Apr
ranges combined. Again, if any cells in any of these ranges are
nonnumeric or blank, they are ignored. Total cost
Here is a shortcut, which works for any function that takes multiple
ranges, separated by commas. Hold the Ctrl key and then drag the
ranges, one after the other. The commas will be entered for you
automatically.

Try it! Use the SUM function in the above gray cell to calculate the total
of all costs. (Scroll to the right for the answer.)

Student ID
AVERAGE function (Statistical Category) 1533
8031
The AVERAGE function averages all of the numeric cells in a range.
9859
To use the AVERAGE function: 9106
3535
Enter the formula =AVERAGE(range) where range is any range. This
produces the average of the numeric values in the range. 8192
6102
Note that the AVERAGE function ignores labels and blank cells. So, for 6774
example, if the range C3:C50 includes scores for students on an exam, but
cells C6 and C32 are blank because these students haven’t yet taken the 7558
exam, then =AVERAGE(C3:C50) averages only the scores for the students 314
who took the exam. (It does not automatically average in 0s for the two
who didn’t take the exam.) 9082
2397
Try it! Use the AVERAGE function in the two gray cells to the right to 2517
calculate the averages indicated. (For the formula in the lower gray cell,
replicate the exam scores in column M and make some changes. Scroll to 2432
the right for the answers.) 6016
Try it! Use the AVERAGE function in the two gray cells to the right to
calculate the averages indicated. (For the formula in the lower gray cell,
replicate the exam scores in column M and make some changes. Scroll to
the right for the answers.)
5269
4847
6537
9922
4525
1491
7897
PRODUCT function (Math & Trig Category)
4088
You certainly know the SUM function for summing, but you might not be 166
aware that there is a PRODUCT function for multiplying. It works exactly like 7925
the SUM function, that is, all of its arguments are multiplied together. Any
blank or text cells are ignored in the product. Specifically, they are not treated 6405
as 0s. 802
2931
Try it! Find the product of the first six exam scores to the right, including the
Absent value. Then delete the Absent value, that is, make its cell blank. Does 7625
this change the product? 2628
5417
7804
3994
394
8847
7855
8668
3738
5534
6965
8863
8762
6466
6100
1878
5970
9691
8666
4865
6198
8554
6753
9574
3891
8186
1306
6835
3136
4938
4807
4421
able of costs for units produced in one month (along side)
or use in another month (along top)

Feb Mar Apr May


$5,800 $3,600 $5,400 $5,700
$4,000 $3,500 $6,100
$3,000 $6,100
$4,300

Exam score Average (only for students who took the exam)
68
74
80 Average (giving 0s to students who were absent)
63
72
Absent
85
70
64
72
81
75
80
73
63
80
88
71
73
71
71
68 Product
82
76
75
81
76
83
67
67
92
72
69
85
78
81
Absent
77
70
71
69
73
60
76
74
67
62
77
91
81
87
76
77
81
Absent
73
83
59
74
74
78
Total cost $47,500

Student IDxam 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
udents who took the exam)

o students who were absent)


COUNT, COUNTA, COUNTBLANK Functions (Statistical Category)

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. Student
1
To use the COUNT function:
2
Enter the formula =COUNT(range), where range is any range. This 3
returns the number of numeric values in the range.
4
To use the COUNTA function: 5
6
Enter the formula =COUNTA(range), where range is any range. This
returns the number of nonblank cells in the range. 7
8
The COUNTBLANK function counts all blank cells in a range. 9
To use the COUNTBLANK function: 10
11
Enter the formula =COUNTBLANK(range), where range is any range. This 12
returns the number of blank cells in the range.
13
Try it! Use the COUNT, COUNTA, and COUNTBLANK functions to fill in the 14
gray cells to the right. (Scroll to the right for the answers.)
15
Note: Excel uses somewhat different terms on the status bar. If you 16
select a range and right-click the status bar, you will see the two options 17
"Count" and "Numerical Count." The first corresponds to the COUNTA
function, and the second corresponds to the COUNT function. 18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Exam score Number enrolled
62
73
74 Number who took exam

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
Number enrolled
72 or

Number who took exam


69 or

Number who were absent


3
72

who took exam


69

who were absent


Background on ...IF Functions

There are several Excel functions that allow you to count values, or sum or
average values, subject to conditions. Until Excel 2007, this was possible only
for a single condition, such as all people younger than 35 years old, and there
were only two functions available, COUNTIF and SUMIF. In response to
customer demand, Microsoft added four new functions in Excel 2007: Student
AVERAGEIF (for a single condition), and COUNTIFS, SUMIFS, and AVERAGEIFS 1
(for multiple conditions). These are all handy functions, and you should learn
how to use them. 2
3
4
5
6
7
COUNTIF Function (Statistical Category) 8
9
The COUNTIF function counts all values in a specified range that satisfy a 10
certain condition.
11
To use the COUNTIF function: 12
13
Enter the formula =COUNTIF(criterion_range,criterion) in any cell, where
criterion is any expression that evaluates to TRUE or FALSE. This counts 14
all values in criterion_range that satisfy the condition. 15
The criterion can be tricky to specify. If you want a specific value, such as 16
Male, you can specify it as "Male" (double quotes required), or you can 17
use a cell reference such as Q8. Also, if you want a specific inequality, 18
such as younger than 20, you can specify it literally as "<20" (again,
double quotes required). But if you want it to be younger than the value 19
in cell Q9, you need to piece it together as a literal part, "<", and a 20
variable part, whatever is in cell Q9. The correct syntax is "<"&Q9. The 21
ampersand (&) symbol concatenates (pieces together) the two parts. For
example, if you want to count the number of students who are older 22
than then the value in cell Q9, the correct formula is 23
=COUNTIF(M9:M80,">"&Q9). 24
Try it! Use COUNTIF in the top gray cell to the right to find the number of 25
students who scored at least as high as the value in cell Q10. (Scroll to 26
the right for the answer.)
27
28
29
30
31
32
33
34
35
SUMIF Function (Math & Trig Category) 36
37
The SUMIF function sums values in one range where a condition in a
corresponding range is satisfied. Usually, the setup is like the example to
the right, where you want to sum or average scores in one column (N), but
only for rows that satisfy a condition in another column (L or M).

To use the SUMIF function:


SUMIF Function (Math & Trig Category)

The SUMIF function sums values in one range where a condition in a


corresponding range is satisfied. Usually, the setup is like the example to 38
the right, where you want to sum or average scores in one column (N), but 39
only for rows that satisfy a condition in another column (L or M).
40
To use the SUMIF function: 41
42
Enter the formula =SUMIF(criterion_range,criterion,sum_range). This
sums all values in sum_range where the corresponding value in 43
criterion_range satisfies the criterion. Note that the range for the condition 44
is listed first, and the range to be summed is listed last. 45
Try it! Calculate the sums indicated in rows 14-16 to the right. (Scroll to the 46
right for the answers.) 47
48
49
50
51
52
53
54
AVERAGEIF Function (Statistical Category)
55
The AVERAGEIF function works just like the SUMIF function, except that it 56
averages the values in the last argument range, the average_range. 57
Try it! Calculate the averages indicated in rows 18-20 to the right. (Scroll to the 58
right for the answers.) 59
60
61
62
63
64
65
66
67
68
69
70
71
72
Gender Age Exam score Gender condition Male
Male 18 62 Age cutoff 20
Female 21 73 Exam score cutoff 87
Female 18 74
Female 18 # of "high" scores
Male 18 77
Female 20 57 Sum of scores for males
Female 18 67 Sum of scores for "young" people
Male 19 90 Sum of scores for "old" people
Male 19 77
Male 22 83 Average of scores for males
Female 20 71 Average of scores for "young" people
Female 20 75 Average of scores for "old" people
Female 20 72
Female 24 82
Female 18 68
Male 18 86
Female 24 77
Male 21 68
Male 20 86
Female 21
Male 20 80
Female 18 81
Male 20 84
Female 19 71
Female 18 76
Male 21 81
Female 18 99
Male 20 72
Female 18 78
Female 21 67
Female 21 89
Female 19 70
Female 19 77
Female 18
Male 22 83
Female 19 74
Male 19 87
Male 18 75
Male 20 86
Male 21 77
Male 20 73
Male 20 74
Female 20 79
Male 18 80
Male 20 77
Female 21 72
Male 19 77
Male 19 71
Female 23 70
Female 19 68
Female 24 79
Male 19 75
Male 18 80
Female 19 73
Female 21 61
Female 21 62
Male 19 68
Male 19 92
Female 20 85
Male 22 77
Female 19 79
Male 20 86
Female 19 83
Male 19 83
Male 18 76
Female 24 89
Female 18 72
Female 21 69
Male 23 66
Male 24 71
Male 20 80
Female 18 61
# of "high"

Sum of sco
Sum of sco
Sum of sco

Average of
Average of
Average of
6

2660
2527
2733

78.235
76.576
75.917
Background on ...IFS Functions

The "plural" functions discussed here, COUNTIFS, SUMIFS, and AVERAGEIFS, were added in
Excel 2007. They allow you to impose multiple conditions, such as male and younger than
some value. Their arguments, described in more detail below, include any number of pairs of
criterion ranges and criteria, such as L9:L80,"Male".

COUNTIFS Functions (Statistical Category)

The COUNTIFS function counts the number of rows that satisfy all of the conditions.
To use the COUNTIFS function:

Enter the function


=COUNTIFS(criterion_range1,criterion1,criterion_range2,criterion2,...), where each
criterion_range,criterion pair imposes a condition on a particular range, usually a column.
The "..." means that any number of criteria can be imposed.

Try it! In the top gray cell to the right, find the number of students with the gender in cell
Q8 and age younger than the age cutoff in cell Q9 who scored less than or equal to the
score cutoff in cell Q10. (Scroll to the right for the answer.)

SUMIFS Function (Math & Trig Category)

The SUMIFS function is similar in concept to SUMIF, but its syntax is different. (Microsoft
chose this syntax instead of the original SUMIF syntax for logical reasons, but they didn't
want to change the SUMIF syntax because it would have broken too many existing
spreadsheets.) Now the range to sum comes first, and the criteria ranges and criteria
come last.

To use the SUMIFS function:

Enter the formula

=SUMIFS(sum_range,criterion_range1,criterion1,criterion_range2,criterion2,...)

Again, the setup is typically like the example to the right. There is a column such as
exam score to sum. The criteria impose conditions on other columns, or even the same
column. Only those rows that meet all of the conditions are part of the sum.

Try it! In the middle gray cell to the right, calculate the total of all scores made by the
gender in cell Q8 and ages younger than the age cutoff in cell Q9. (Scroll to the right for
the answer.)
Try it! In the middle gray cell to the right, calculate the total of all scores made by the
gender in cell Q8 and ages younger than the age cutoff in cell Q9. (Scroll to the right for
the answer.)

AVERAGEIFS Function (Statistical Category)

The AVERAGEIFS function works just like the SUMIFS function, except that it averages the
values in the the average_range argument.

Try it! Calculate the average in the bottom gray cell to the right, using the same criteria as in
the SUMIFS exercise above. (Scroll to the right for the answer.)
ded in
than
f pairs of

Student Gender Age Exam score Gender condition Female


1 Male 18 62 Age cutoff 20
2 Female 21 73 Exam score cutoff 87
3 Female 18 1
4 Female 18 65 COUNTIFS question
5 Male 18 77
. 6 Female 20 57 SUMIFS question
7 Female 18 67 AVERAGEIFS question
8 Male 19 90
9 Male 19 77
h 10 Male 22 83
olumn. 11 Female 20 71
12 Female 20 75
in cell 13 Female 20 72
the
14 Female 24 82
15 Female 18 68
16 Male 18 86
17 Female 24 77
18 Male 21 68
19 Male 20 86
20 Female 21 89
21 Male 20 80
22 Female 18 81
rosoft
didn't 23 Male 20 84
24 Female 19 71
ria 25 Female 18 76
26 Male 21 81
27 Female 18 99
28 Male 20 72
29 Female 18 78
30 Female 21 67
31 Female 21 89
s
same 32 Female 19 70
33 Female 19 77
the 34 Female 18 79
ht for 35 Male 22 83
36 Female 19 74
37 Male 19 87
the
ht for

38 Male 18 75
39 Male 20 86
40 Male 21 77
41 Male 20 73
42 Male 20 74
43 Female 20 79
44 Male 18 80
s the 45 Male 20 77
46 Female 21 72
ria as in 47 Male 19 77
48 Male 19 71
49 Female 23 70
50 Female 19 68
51 Female 24 79
52 Male 19 75
53 Male 18 80
54 Female 19 73
55 Female 21 61
56 Female 21 62
57 Male 19 68
58 Male 19 92
59 Female 20 85
60 Male 22 77
61 Female 19 79
62 Male 20 86
63 Female 19 83
64 Male 19 83
65 Male 18 76
66 Female 24 89
67 Female 18 72
68 Female 21 69
69 Male 23 66
70 Male 24 71
71 Male 20 80
72 Female 18 61
COUNTIFS

SUMIFS qu
AVERAGEIF
18

1342
70.632
SUMPRODUCT Function (Math & Trig Category)

There are many times when you need to sum products of values in two
(or possibly more than two) same-size ranges. Fortunately, there is a
SUMPRODUCT function that sums products quickly.

To use the SUMPRODUCT function:

Enter the formula =SUMPRODUCT(range1,range2), where range1 and


range2 are exactly the same size. For example, they might be two
column ranges with 10 cells each, or they might be two ranges with 4
rows and 10 columns each. The formula sums the products of the
corresponding values from the two ranges.

There can actually be more than two ranges in the SUMPRODUCT


formula, separated by commas, as long as all of them have exactly the
same size. This is not as common as having only two ranges, but it is
sometimes useful.
Try it! Sum the products of the two ranges in the example to the right to
find the total shipping cost in the gray cell. (Scroll to the right for the
answer.)

By the way, if you are tempted to write the formula without the
SUMPRODUCT function as the sum of nine products, as many beginning
users tend to do, imagine how long your formula would be if there were
10 plants and 50 cities! The SUMPRODUCT function is extremely
efficient, so get used to using it.
Unit shipping costs City1 City2 City3
Plant1 1.25 1.35 1.55
Plant2 1.15 1.45 1.25
Plant3 1.35 1.45 1.15

Units shipped City1 City2 City3


Plant1 155 180 0
Plant2 250 130 185
Plant3 0 210 140

Total cost
Total cost 1609.5
Basic IF Function (Logical Category)

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
enough units are ordered t
To enter a basic IF function:
units of that product are o
Enter the formula =IF(condition,expression1,expression2), where condition
is any condition that is either true or false, expression1 is the value of the Product
formula if the condition is true, and expression2 is the value of the formula
if the condition is false. 1
2
A simple example is =IF(A1<5,10,“NA”). Note that if either of the 3
expressions is text, as opposed to a numeric value, it should be enclosed in
double quotes. 4

Try it! Enter appropriate IF formulas in columns M and N. (Scroll to the


right for answers.)

Each student gets an A (if s


Nested IF Functions is 60 or above but less tha

Sometimes IF functions are nested. For example, there might be three


possibilities, depending on whether the value in cell A1 is negative, zero, Student
or positive. A nested IF formula can then be used as follows. 1
2
To use nested IF functions:
3
Enter the formula 4
=IF(condition1,expression1,IF(condition2,expression2,expression3)). If 5
condition1 is true, the relevant value is expression1. Otherwise, condition2
is checked. If it is true, the relevant value is expression2. Otherwise, the 6
relevant value is expression3.

An example is =IF(A1<0,10,IF(A1=0,20,30)). Suppose this formula is


entered in cell B2. Then if A1 contains a negative number, B2 contains 10.
Otherwise, if A1 contains 0, B2 contains 20. Otherwise, meaning that A1
must contain a positive value, B2 contains 30.

Try it! Use a nested IF function to get the grades in column M. (Scroll to
the right for answers.)

IF Functions with Logical AND or OR Conditions

Sometimes more complex AND or OR conditions are required in IF


Investor sells stock only if i
IF Functions with Logical AND or OR Conditions (including the current day)

Sometimes more complex AND or OR conditions are required in IF Day


functions. They are not difficult once you know the syntax.
1
To use an AND condition in an IF function: 2
3
Enter the formula
=IF(AND(condition1,condition2),expression1,expression2). This results in 4
expression1 if both condition1 and condition2 are true. Otherwise, it 5
results in expression2.
6
Note the syntax. The keyword AND is followed by the conditions,
separated by a comma and enclosed within parentheses. Also, note that
any number of conditions, not just two, can be included in the AND, all
separated by commas.

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.) Any student who scores at
which is 1% of their total s
To use an OR condition in an IF function:

Enter the formula Student


=IF(OR(condition1,condition2),expression1,expression2). This results in 1
expression1 if either condition1 or condition2 is true (or if both are true).
Otherwise, it results in expression2. 2
3
Again, any number of conditions, not just two, can be included in the OR. 4
Try it! Use an IF function with an OR condition to fill in the bonuses in 5
column P. (Scroll to the right for answers.) 6
You can even have AND and OR conditions in the same formula. A typical
example is =IF(OR(AND(B3>=10,C3>=15),D3<50),1000,2000). For
example, if cells B3, C3, and D3 have values 12, 10, and 40, this returns
1000 because the second condition (D3<50) is true, even though the
AND condition is false.

The key to writing (and reading) such complex formulas is to pay careful
attention 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 to depend on it!
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

End inventory Order placed (yes or no)? # of units ordered


100
40
20
70

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)

Price change Sell (yes or no)?


Up
Down
Up
Up
Up
Down

Any student who scores at least 95 on any of the exams gets a bonus
which is 1% of their total score.

Exam 1 Exam 2 Exam 3 Exam 4 Bonus


87 83 83 80
77 72 74 97
80 95 79 75
82 87 96 88
78 94 81 79
75 83 80 72
Order placed? # ordered
no 0
yes 160
yes 180
no 0

Grade
S
A
U
S
S
A
Sell?

No
No
Yes
No

Bonus
0
3.2
3.29
3.53
0
0
Concatenating, CONCATENATE Function (Text Category)

To concatenate, you start with two or more pieces of text and “piece them
together.” For example, you might concatenate “Bob” and “Jones” into “Bob
Jones”. There are two equivalent ways to concatenate: with the ampersand Bob
(&) symbol and with the CONCATENATE function. Both are described here. Stephen
Andy
Suppose cells A1 and B1 contain text such as a first name and a last name.
To concatenate them with the ampersand symbol, you enter the formula John
=A1&B1 in some other cell such as cell C1. Literal text, such as a comma Kathy
and a space, can also be included, such as =A1&“, ”&B1. In this case, if cell Karen
A1 contains “Jones” and cell B1 contains “Bob”, then cell C1 will contain
“Jones, Bob”. This concatenates the last name, the literal comma and space, Tom
and the first name. In general, you separate the pieces with ampersands, Peter
and you surround literal text with double quotes.
Ted
To concatenate the text in cells A1 and B1 with the CONCATENATE function, Jason
you enter the formula =CONCATENATE(A1,”, “,B1). In words, you enter the
“pieces” you want to concatenate, separated by commas. These pieces can
be cell references or literal text. In the latter case, they should be
surrounded with double quotes.

Try it! Concatenate the first names, middle initials, and last names in
columns K, L, and M with the ampersand symbol so that full names of the
form Jones, Bob E. appear in column N. Do this with again with the
CONCATENATE function in column O. (Scroll to the right for answers.)
Ampersand CONCATENATE
E Jones
C Davis
T Thompson
F Wilson
C Fredericks
D Williams
T Smith
F Jennings
R Benson
E Samson
Ampersand CONCATENATE
Bob E. Jones Bob E. Jones
Stephen C. Davis Stephen C. Davis
Andy T. Thompson Andy T. Thompson
John F. Wilson John F. Wilson
Kathy C. Fredericks Kathy C. Fredericks
Karen D. Williams Karen D. Williams
Tom T. Smith Tom T. Smith
Peter F. Jennings Peter F. Jennings
Ted R. Benson Ted R. Benson
Jason E. Samson Jason E. Samson
Parsing with Text to Columns

Parsing text, that is, separating it into its pieces, is sometimes easy, and it
is sometimes difficult. The text functions illustrated in the other parsing
topic in this tutorial are for the difficult cases, but this topic discusses an
easy tool that is worth trying first. Suppose you import data from a
legacy system or a Web site, and everything gets imported to a single
column, such as in column K to the right. The pattern is pretty clear: each
cell contains five numbers, all separated by commas. To parse these into
five columns with one number per cell, you can use the Text to Columns
button on the Data ribbon shown to the right. This launches a fairly
simple wizard (basically, the same wizard used for importing a text file),
where you can indicate that the "delimiter" is a comma.

Try it! Select the data in column K and try the Text to Columns wizard.
Note that it places the results in columns K-O, replacing the original data
in column K. If you want to keep the original data for some reason, you
should first make a copy in column L and then parse the copy.
Note: You might see little green triangles in the cells in column K. These
indicate errors, or at least what Excel thinks are errors. If you select any
of these cells, or all of them, you will see a dropdown to the left, which
provides options for dealing with the "errors," including ignoring them.
(They should be ignored in this example.) More generally, if you don't
want Excel to enter these error warnings in the first place--in any of your
workbooks--you can go to the Formulas section of Excel Options and
uncheck the "Enable error background checking" option.
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
General Approach to Parsing with Text Functions

Suppose that someone has given you a spreadsheet with a list of names
such as the one to the right. Each cell in column K has a last name, then a
comma and a space, and then a first name. Your job is to parse (that is,
separate) these names as indicated for the name in cells L10 and M10.
That is, column L should have all of the first names and column M should
have all of the last names. If this sounds easy, imagine that there are
10,000 names in column K. What would you do? If you just start typing,
you will be busy for a long time, and you will undoubtedly make mistakes
along the way!

Fortunately, there is a much better way. The key is to look for patterns. In
this example, note that every name has a comma and a space. The first
name comes after the comma and space, and the last name comes before
it. For the name "Jones, Bob", there are 10 characters, including the
comma and space, and the comma and space are characters 6 and 7. So
the first name is the rightmost 3 characters and the last name is the
leftmost 5 characters. In any parsing operation, this is the first and the
most crucial step: discover the pattern.

Once you discover the pattern, you can then exploit it with a number of
useful text functions. The ones discussed here are FIND, LEN, RIGHT, LEFT,
and MID. If you want to learn about other text functions, click the Text
dropdown list on the Formulas ribbon.

LEN (Length) Function (Text Category)

The LEN function returns the number of characters in a piece of text.


To use the LEN function:

Enter the formula =LEN(text)

For example, =LEN("Bobby Jones") returns 11. This includes the space.

LEFT, RIGHT, MID Functions (Text Category)

These functions return the left, right, or middle characters from a piece of
text, where you indicate the number of characters to return.

To use the RIGHT function:

Enter the formula =RIGHT(text, n), where n is an integer. This returns the
right n characters in text. (If n is greater than the number of characters in
text, it returns the entire text.)
LEFT, RIGHT, MID Functions (Text Category)

These functions return the left, right, or middle characters from a piece of
text, where you indicate the number of characters to return.

To use the RIGHT function:

Enter the formula =RIGHT(text, n), where n is an integer. This returns the
right n characters in text. (If n is greater than the number of characters in
text, it returns the entire text.)

To use the LEFT function:

Enter the formula =LEFT(text, n), where n is an integer. This returns the
left n characters in text. (If n is greater than the number of characters in
text, it returns the entire text.)

To use the MID function:

Enter the formula =MID(text,s,n), where s is an integer and n is an


integer. (s stands for start.) This returns n characters of text, starting with
character s. (If n is larger than the number of characters from position s
on, this returns all characters from position s on.)

Here are some examples of MID:

The function =MID(“Freddie”,5,2) returns “di”.


The function =MID(“Freddie”,5,n) returns “die” for any n>=3.
The function =MID(“Jones, Bob”,FIND(“,”,“Jones, Bob”)+2,1) returns “B”.

The last example is trickier. As the next text box indicates, the FIND
function in this formula returns 6, the position of the comma, so this
formula is equivalent to =MID("Jones, Bob",8,1). Note that the starting
position is 8, not 7, because of the space.

FIND Function (Text Category)

The FIND function returns the position of the first occurrence of a string
of characters (which could be a single character) in a piece of text.

To use the FIND function:


Enter the formula =FIND(search_text,text,s), where search_text is a piece
of text to be found, text is the original text, and s is an optional integer
argument. This function returns the position of the first occurrence of
search_text, if any. If there are no occurrences, it returns an error. If the
argument s is missing, the search starts at character 1; otherwise, the
search starts at character s.

Here are a few examples:

The formula =FIND(“,”,“Jones, Bob”) returns 6, because the comma is the


6th character in Jones, Bob.

The formula =FIND(“nes”,“Jones, Bob”) returns 3, because the search text


“nes” begins in the 3rd character of Jones, Bob.

The formula =FIND(“o”,“Jones, Bob”) returns 2, because the first


occurrence of the letter “o” occurs in the 2nd character of Jones, Bob.
Here are a few examples:

The formula =FIND(“,”,“Jones, Bob”) returns 6, because the comma is the


6th character in Jones, Bob.

The formula =FIND(“nes”,“Jones, Bob”) returns 3, because the search text


“nes” begins in the 3rd character of Jones, Bob.

The formula =FIND(“o”,“Jones, Bob”) returns 2, because the first


occurrence of the letter “o” occurs in the 2nd character of Jones, Bob.
However, the formula =FIND(“o”, “Jones, Bob”,3) returns 9, because the
first occurrence of “o” starting from character 3 is character 9.

The formula =FIND(“t”,“Jones, Bob”) returns an error, because “t” isn’t


found in Jones, Bob.

Parsing Names with These Text Functions

The name-parsing problem at the top of this worksheet can be solved to


the right with the following series of steps:

1. In cell L107, find the length of the text in cell K107 with the LEN
function. This results in 10 in cell L107 because cell K107 has 10
characters, including the comma and space.

2. In cell M107, find the position of the comma with the FIND function.
This results in 6 in cell M107 because the comma in Jones, Bob is the 6th
character.

3. In cell N107, add 1 to find the position of the space after the comma.
This results in 7 in cell N107 because the space is the character right after
the comma.

4. In cell O107, find the first name with the RIGHT function, using the
rightmost (10-7) characters. Make sure you use cell references to enable
copying down.

5. In cell P107, find the last name with the LEFT function, using the
leftmost (6-1) characters. Again, use cell references to enable copying.

The beauty of this method is that you have to do it only once, in the first
row. Then you can copy all of the formulas down for the rest of the
names, even if there are thousands of them!

Try it! Enter the formulas as indicated in the above steps and copy them
down. (Scroll to the right for the correct answers.)

Now try a tougher one. The names to the right either have a middle
initial, a first initial, or no initial. See if you can parse these names into
four pieces: Last name, Used name, Initial, and Middle initial, where:

Used name is the name (first or middle) the person goes by.
Initial is the single initial character, if any, or is blank if there is no initial.
Middle initial is "Yes" if the initial is a middle initial, "No" if it is a first
initial, and blank if there is no initial.

As in the previous exercise, you can have other "helper" columns as


needed.

Hints: (1) FIND returns an error if it can't find the requested text. (2)
Used name is the name (first or middle) the person goes by.
Initial is the single initial character, if any, or is blank if there is no initial.
Middle initial is "Yes" if the initial is a middle initial, "No" if it is a first
initial, and blank if there is no initial.

As in the previous exercise, you can have other "helper" columns as


needed.

Hints: (1) FIND returns an error if it can't find the requested text. (2)
There is an ISERROR function that can check whether a cell contains an
error. Scroll to the right for a solution.

OK, this one is not easy, and it requires some careful planning and logic.
But it sure beats typing a long list of hundreds or thousands of names!

Flash Fill (introduced in Excel 2013)

Excel 2013 introduced a new Flash Fill tool that eliminates the need for some
(but not all) of these complex parsing formulas. You can read about Flash Fill in
the Text Functions section of the tutorial.
Jones, Bob Bob Jones
Davis, Stephen
Thompson, Andy
Wilson, John
Fredericks, Kathy
Williams, Karen
Smith, Tom
Jennings, Peter
Benson, Ted
Samson, Jason
Full name 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

Full name Length Comma Space1 Period Space2 Last name


Jones, Bob E.
Davis, F. Stephen
Thompson, Andy
Wilson, John B.
Fredericks, Kathy C.
Williams, Karen R.
Smith, J. Tom
Jennings, Peter
Benson, Ted C.
Samson, Jason A.
Used name Initial Middle initial
Full name Length Comma Space First name
Jones, Bob 10 6 7 Bob
Davis, Stephen 14 6 7 Stephen
Thompson, Andy 14 9 10 Andy
Wilson, John 12 7 8 John
Fredericks, Kathy 17 11 12 Kathy
Williams, Karen 15 9 10 Karen
Smith, Tom 10 6 7 Tom
Jennings, Peter 15 9 10 Peter
Benson, Ted 11 7 8 Ted
Samson, Jason 13 7 8 Jason

Full name Length Comma Space1 Period


Jones, Bob E. 13 6 7 13
Davis, F. Stephen 17 6 7 9
Thompson, Andy 14 9 10 #VALUE!
Wilson, John B. 15 7 8 15
Fredericks, Kathy C. 20 11 12 20
Williams, Karen R. 18 9 10 18
Smith, J. Tom 13 6 7 9
Jennings, Peter 15 9 10 #VALUE!
Benson, Ted C. 14 7 8 14
Samson, Jason A. 16 7 8 16
Last name
Jones
Davis
Thompson
Wilson
Fredericks
Williams
Smith
Jennings
Benson
Samson

Space2 Last name Used name Initial Middle initial


11 Jones Bob E Yes
10 Davis Stephen F No
#VALUE! Thompson Andy
13 Wilson John B Yes
18 Fredericks Kathy C Yes
16 Williams Karen R Yes
10 Smith Tom J No
#VALUE! Jennings Peter
12 Benson Ted C Yes
14 Samson Jason A 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.
A typical example where it applies is in the list of names to the right. Each
name follows a pattern: last name, comma and space, first name, space,
middle initial and period. Row 4 illustrates the desired results in gray.
There are several ways to proceed, and you can try any of these methods.
Just be aware that each method works only one column at a time, and you
must proceed from left to right, starting in the column adjacent to the
data column.

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!

Note how Flash Fill can recognize many patterns, such as the initials in
column Q and even the lower case name in column R. However, if names
don't fit the pattern, Flash Fill will likely fail. For example, if the bottom
two names were replaced with Lincoln, Abe and Fitzgerald, F. Scott, Flash
Fill wouldn't get everything correct. (You might want to verify this.) As this
indicates, Flash Fill can't completely take the place of text functions for all
parsing tasks.
Flash Fill also works on certain patterns of numbers and dates, as you can
check on the examples to the right. However, except for the year column
on the dates, only methods 1 and 3 seem to work; method 2 doesn't
work. It isn't clear why method 2 works in some situations but not in
others, and you’ll probably have to experiment to see which method
works best for you. In any case, the Flash Fill tool can often save you from
entering a lot of complex text formulas.
entering a lot of complex text formulas.
Results for a typical name
Roberts, Julie T. Julie T. Roberts Julie Roberts Julie T. Roberts JTR

Names to parse
Jones, Bob E. Bob
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.

Results for a typical number Results for a typical date


123.78 123 78 2/21/2013 2013 2

Numbers to parse Dates to parse


126.90 1/3/2012
321.45 3/26/2000
860.22 5/7/1999
98.14 4/4/2008
113.67 6/17/1976
85.62 3/29/2000
256.48 12/25/2014
julie roberts

21
Date and Time functions
Dates and Times in Excel

We tend to take dates and times for granted, but they appear in many, if
not most, real-world business spreadsheets. They can actually be quite
tricky to work with, and a complete treatment of dates and times could
fill a long chapter of a book. This tutorial can't cover all of the intricacies
of Excel-based dates and times, but it does illustrate some of the most
useful methods for working with them, including several of the functions
listed to the right.

The first thing to realize is that a date-time value that appears in a cell as
something like 3/14/2004 4:30 PM is really stored as a number. Excel
refers to this number as the serial value. The serial value corresponding
to this particular date-time happens to be 38060.688. The value to the
left of the decimal is the number of days since a “base” date (January 1,
1900), and the decimal part indicates the fraction of time through the
day, starting right after midnight. In this example 4:30 PM is 68.8% of the
way from midnight to the next midnight. If the decimal part is omitted, it
is assumed to be midnight. In this case, you usually format the value so
that only the date, not the time, appears.

If you happen to know the numbering system for dates, that is, you
somehow know that 38060 corresponds to 3/14/2004, you could enter
the number 38060 in a cell and then format it to look like a date.
However, you usually enter a date like 3/14/2004 in a cell. Actually, there
are several formats Excel recognizes as dates, including 3/14/2004,
March 14, 2004, 3-14-04, and a few others, but they are all stored as
38060.

The same is true for date-times, such as 3/14/2004 4:30 PM, or just
times, such as 4:30 PM. If you enter either of these in a format that Excel
recognizes as a date-time or just a time, Excel will recognize that these
are date-times or times, but it will store them as numbers, 68030.688 or
0.688.

By the way, if you enter a date-time in a format that Excel doesn’t


recognize, you are entirely out of luck. It will simply be stored as a label,
with no inherent “date-time” meaning. And Excel can be fussy. For
example, it doesn’t understand 3/14/2004 4:30PM, simply because there
is no space between 4:30 and PM! On the other hand, Excel is smart
about dates. It will recognize that 9/31/1999 and 2/29/2003 are not
dates, regardless of how they are formatted.

Try it! The cells to the right include some date-times, dates (no times
specified), and times (no dates specified), formatted in several ways.
Format these as numbers with three decimals to see the serial values.
Then reformat them as date-times in any formats you prefer.
Date and Time functions Dates to format
3/14/04 1:30 PM
12/31/1901
3:50
12:00 PM
29-Feb-96
9/24/46 14:45
TODAY, NOW Functions (Date & Time Category)

Excel has two useful functions, TODAY and NOW, for automatically
entering the current date or the current date and time .

To use the TODAY function:

Enter the formula =TODAY() in any blank cell. (The blank parentheses are
necessary.) It returns the current date. If you open this spreadsheet
tomorrow, it will list tomorrow’s date, that is, it will update each day.
To use the NOW function:

Enter the formula =NOW() in any blank cell. (Again, the blank parentheses
are necessary.) It returns the current date and time. It is also dynamic, but
it won't change until worksheet recalculates.

Try it! Enter the TODAY and NOW functions in the gray cells. Then format
the result of NOW as time only—no date. (Scroll to the right for answers.)

After you have worked a few other exercises in this tutorial, come back to
this topic and see whether the time has changed. (You might have to force
a recalculation to see the change. You can do this by pressing the F9 key.)
Today's date
Current time
Today's date 9/19/2019
Current time 9:37 AM

The value
The value in
in cell
cell AF8
AF8 was
was
formatted to
formatted to show
show time
time only,
only,
not date
not dateand
and time.
time.
Date
YEAR, MONTH, DAY, WEEKDAY Functions (Date & Time Category) 9/11/2001
1/28/1986
If a cell contains a date, it is easy to strip off the year, month, and day 11/22/1963
with the YEAR, MONTH, and DAY functions. There is also a WEEKDAY
function that returns the weekday index, 1 (Sunday) to 7 (Saturday). Each 8/6/1945
of these functions has a single argument, a date or a reference to a cell 12/7/1941
containing a date.
4/14/1912
Try it! For each date to the right in column K, return the year, month, day,
and weekday in columns L-O. (See to the right for answers.)

You might want the month name, such as September, and the day name,
such as Tuesday, rather than numbers. You can do this with custom
formatting. To get to custom formatting, right-click on any cell, select
Format Cells, and select Custom to bring up the dialog box to the right.
For month names, you can enter the code mmm (for three-letter
abbreviations) or mmmm (for full month names). Similarly, you can enter
the codes ddd or dddd for days.

Try it! Copy the values in columns M and O to columns P and Q,


respectively. Then custom format the months in column P as mmmm, and
custom format the days in column Q as dddd. This serves as an excellent
reminder that dates can be formatted in many ways.
Year Month Day Weekday Month name Day name
Date Year Month Day WeekdayMonth nameDay name
### 2001 9 11 3 ### Tuesday
### 1986 1 28 3 January Tuesday
### 1963 11 22 6 ### Friday
8/6/1945 1945 8 6 2 August Monday
### 1941 12 7 1 ### Sunday
### 1912 4 14 1 April Sunday
DATE Function (Date & Time Category)

The DATE function takes three numerical arguments, a year, a month, and a
day, and it returns the corresponding date. The important part is that Excel
recognizes the result as a date, which you can then format in any date
format you like.

To use the DATE function:

Enter the formula =DATE(year,month,day), where year is a 4-digit year,


month is a number from 1 to 12, and day is a day from 1 to the number of
days in the month.

This function can be very useful for manipulating dates. For example, it can
be used to find your next birthday, given your birthdate, as illustrated in cell
L8. The formula in cell L8 is a long one, but it is simple logic. This person's
next birthday will certainly be on July 22. The only question is whether it
will be in the current year or the next year. The IF function checks for this.
Note that YEAR(TODAY()) returns the year corresponding to today's date.

Tip: Depending on the width of your Excel window, you might not be able
to see all of the long cell L8 formula in the formula bar. To see long formulas
like this one, you can make the formula bar "taller." Just drag the border
below the formula bar down.

Try it! Enter your birthdate in cell K17 and then calculate your current age
(as an integer) in cell L17. (Scroll to the right for the answer.)

DATEVALUE Function (Date & Time Category)

The DATEVALUE function can be a real life-saver. It takes a date stored as text
and returns the corresponding serial value, which you can then format as a
date. Why is this important? Suppose you have a lot of data stored in some
type of legacy system in your business, and you are somehow able to dump it
into Excel. The chances are that all dates will be imported as text. That is, a
cell value will look something like 5/20/2001, but Excel won’t recognize it as a
date. Without the DATEVALUE function, you would have to retype all of the
dates! However, DATEVALUE saves you this mind-numbing work.

To use the DATEVALUE function:

Enter the formula =DATEVALUE(datetext), where datetext refers to a date


stored as text. Then format the result as a date.

Try it! Create dates in column L corresponding to the text values in column K
that happen to look like dates. Then format the results with any date format
you prefer. (Scroll to the right for answers.)
Enter the formula =DATEVALUE(datetext), where datetext refers to a date
stored as text. Then format the result as a date.

Try it! Create dates in column L corresponding to the text values in column K
that happen to look like dates. Then format the results with any date format
you prefer. (Scroll to the right for answers.)
Birthdate Next birthday
7/22/1976 7/22/2019

Birthdate Age

Dates imported from a legacy system


Nov 25, 1997
Nov 26, 1997
Nov 29, 1997
Dec 1, 1997
Dec 3, 1997
Birthdate Age
### 43

Nov 25, 19 35759


Dec 1, 199 35765
Dec 3, 199 35767

The values
The values in
ingray
graycould
could
now be
now be formatted
formatted as
as
dates.
dates.
MIN, MAX Functions (Statistical Category)

The MIN function returns the smallest numeric value in a range. Similarly,
the MAX function returns the largest numeric value in a range.
Sales rep
To use MIN and MAX functions:
Jan sales
Enter the formula =MIN(range) or =MAX(range) where range is any range. Feb sales
These produce the obvious results: the maximum (or minimum) value in
the range.

Try it! Use the MIN and MAX functions to fill in the gray range to the right.
(Scroll to the right for answers.) Jan
Note that MIN and MAX work only on numeric data. If you have a list of Feb
names, you might expect MIN and MAX to return the first and last names
in alphabetical order, but unfortunately they don't. (There are two other
functions called MINA and MAXA, but they don't appear to be very useful.)
Allison Baker Jones Miller Smith Taylor
$3,700 $2,400 $2,300 $3,000 $3,800 $3,700
$2,600 $2,200 $2,400 $2,800 $3,600 $2,300

Min sales Max sales


Min sales Max sales
Jan $2,300 $3,800
Feb $2,200 $3,600
MEDIAN Function (Statistical Category)

The median is the middle value in a set of n numbers, in the sense that half are
above it and half are below it. More precisely, when the values are sorted in
increasing order, it is the middle value if n is odd, and it is the average of the
two middle values if n is even. Fortunately, Excel takes care of the details with
the MEDIAN function. 33
3
To use the MEDIAN function: 0
Enter the formula =MEDIAN(range), where range is any numeric range. 1
4
Note that if range contains labels or blank cells, these are ignored when 14
calculating the median. This is also true for the other statistical functions.
5
Try it! Find the median of the data in column K. Does it equal the average? 41
Why or why not? (Scroll to the right for answers.) 3
5
9
1
0
22
10
QUARTILE Function (Statistical Category) 5
13
The values in a data set are often ranked in some way. For example, if you 7
take the SAT exam to get into college, you learn your ranking by a percentile.
If you are at the 85th percentile, you know that 85% of all people scored 6
lower than you, and only 15% scored higher. Excel has two useful functions 3
for finding this type of information: PERCENTILE and QUARTILE.
9
The QUARTILE function is the easiest to understand. Imagine that you have 5
1000 scores. You sort them from low to high and then divide them into four 14
sets of 250 scores each, where the first set contains the smallest scores, the
second set contains the next smallest scores, and so on. The first, second, 7
and third quartiles are the breakpoints between these sets. For example, 27
25% of the scores are below the first quartile, and 75% are above it. By 10
definition, the second quartile is the median.
7
To use the QUARTILE function: 3
11
Enter the formula =QUARTILE(range,k), where k is 1, 2, or 3. For example, if
you enter 3 for k, you get the third quartile. 15
35
Try it! Find all three quartiles, Q1, Q2, and Q3, for the data in column K.
9
0
5
6
11
13
4
17
3
PERCENTILE Function (Statistical Category) 19
The PERCENTILE function takes any percentage, expressed as a decimal 4
number from 0 to 1, and it returns the value such that the given percentage of 5
all values is below this value. For example, if the percentage is 10% (0.10) and 1
the PERCENTILE function returns 45, you know that 10% of all values in the
data set are below 45 and 90% are above it. 21
4
To use the PERCENTILE function: 16
Enter the formula =PERCENTILE(range,pct), where pct is any percentage 6
expressed as a decimal between 0 and 1, such as 0.10 for 10%. 18
18
Try it! Find the requested percentiles for the data in column K. For example,
P10 indicates the 10th percentile. Do you see the relationship between the 2
quartiles and certain percentiles? 3
17
7
9
6
4
2
Technical Note About QUARTILE and PERCENTILE Functions 7
The QUARTILE and PERCENTILE functions are typically used on data sets with a 3
large number of values. If they are used on a very small data set, you might be 0
surprised at the results. In fact, you might even disagree with them. For 14
example, if the data set has the five values 10, 20, 30, 40, and 50, Excel’s
PERCENTILE function indicates that the 10 th percentile is 14. This is certainly not 2
a very intuitive answer, and you might disagree with it, but why anyone would 4
want the 10th percentile of a five-value data set in the first place? 24
In any case, Microsoft introduced the functions QUARTILE.INC, QUARTILE.EXC, 12
PERCENTILE.INC, and PERCENTILE.EXC in Excel 2010. The INC versions are 1
identical to the original QUARTILE and PERCENTILE function (which still work
fine). The EXC versions were evidently added to work better on small data sets. 4
You can go to online help for further details. 36
3
0
2
4
12
7
2
1
16
5
31
15
29
12
5
4
5
22
14
7
7
19
38
15
45
1
4
14
3
16
4
Average
Median

Quartiles
Q1
Q2
Q3

Percentiles
P01
P05
P10
P25
P50
P75
P90
P95
P99
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
STDEV and VAR Functions (Statistical Category)

Excel has a number of other statistical functions, including those for


measuring the amount of variability in a set of numbers. The most widely
used measures of variability are variance and standard deviation, and 1034.44
Excel implements these with the VAR and STDEV functions. (These 877.35
functions calculate the sample variance and sample standard deviation. 794.42
There are similar functions, VARP and STDEVP, for calculating the
population variance and population standard deviation. For large data 828.45
sets—over 100 values, say—the sample and population measures are 765.9
practically the same.)
1088.95
The variance is essentially the average of the squared deviations from 786.05
the mean, and the standard deviation is the square root of the variance. 1523.02
Each measures variability, but standard deviation is easier to understand
because it is expressed in the same units as the data—dollars, for 920.48
example. In addition, many data sets have the property that about 68% 777.23
of the data are within one standard deviation of the mean, about 95% of 1247.63
the data are within two standard deviations of the mean, and virtually all
of the data are within three standard deviations of the mean. These 1117.87
"empirical" rules typically hold when the distribution of values follows a 1157.3
symmetric, bell-shaped curve, that is, the normal distribution. 641.35
To use the VAR function: 520.49
586.68
Enter the formula =VAR(data_range). This is equivalent to
=(STDEV(data_range))^2, the square of the standard deviation. 952.22
878.36
To use the STDEV function: 1582.12
Enter the formula =STDEV(data_range). This is equivalent to 807.99
=SQRT(VAR(data_range)), the square root of the variance. 913.13
1051.65
Try it! Find the mean (average), variance, and standard deviation of the
data in column K. Then use COUNTIF to find the percentage of values 628.44
that are within one standard deviation of the mean. Is it about 68%? 651.86
(Scroll to the right to see the answers.) 843.55
Note: In Excel 2010, VAR and VARP were replaced by VAR.S and VAR.P. 1233.37
Similarly, STDEV and STDEVP were replaced by STDEV.S and STDEV.P. 1036.55
However, the old versions still work fine.
543.17
866.31
883.25
1285.68
650.44
1412.4
1105.44
671.55
1077.21
1471.87
1362.55
1044.37
601.52
1256.48
1069.69
407.54
1609.11
1141.03
972.54
851.91
1324.67
1061.09
809.91
655.81
1224.02
1105.52
1102.63
342.62
642.01
762.48
945.73
1431.55
695.66
871.12
827.21
1468.62
863.17
582.4
919.07
1314.83
1418.85
909.82
1086.11
620.14
668.74
598.66
1175.09
1139
1369.23
618.31
693.67
1341.85
1479.33
477.41
962.29
686.64
1495.96
1101.87
1018.6
1027.43
921.99
868.49
856.14
724.87
1345.72
1127.91
1467.66
918.88
997.56
965.11
1059.32
1157.35
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
Mean
Variance
Standard deviation

% within 1 stdev
Mean 999.77
Variance 83102.38
St Dev 288.27

Mean - Std 711.50 # less


Mean + St 1288.05 # greater
Pct with 1 stdev of mean
36
40
62%
PMT (Payment) Function (Financial Category)

The PMT function is usually used to find the monthly payment for a car
loan or a home mortgage loan. The inputs are typically an annual interest
rate, a term (number of months financed), and the amount borrowed
(the principal). The PMT function finds the amount you have to pay each
month of the term. Part of this payment is principal and part is interest.
At the end of the term, you will have paid just enough to pay off the
entire loan.

To use the PMT function:


Enter the formula =PMT(interest_rate,term,principal). If you want PMT
to return a positive value, you should enter the principal as a negative
number because it is a cash outflow, not a cash inflow. The interest rate
argument should be the monthly rate, assuming you are paying monthly,
which is the annual rate divided by 12.

Try it! Suppose you take out a $30,000 loan for a new car when the
annual interest rate is 3.75% and the term of the loan is 36 months.
Calculate your monthly payment in the gray cell. Then use a data table to
see how your monthly payment varies for terms of 24, 36, 48, or 60
months. (Scroll to the right for the answers. The Data Table topic in this
tutorial explains data tables.)
Principal $30,000 Data table for payment versus term
Annual interest 3.75% Term Payment
Term 36
Payment 24
36
48
60
Data table for payment versus term
Term Payment
$882.39
24
36
48
60
ent versus term
NPV (Net Present Value) Function (Financial Category)

Much of the theory of finance is about the time value of money. Basically,
a dollar earned in the future is less valuable than a dollar earned today
because the dollar earned today can earn interest. To account for this,
future cash inflows or outflows are discounted to get their present values
now. Given a future stream of cash inflows and/or outflows, the sum of all
their present values is called the net present value, or NPV. If this stream is
incurred at regular time intervals—at the end of each year from year 1 on
—you can use Excel’s handy NPV function to calculate the NPV of the
stream.

To use the NPV function:

Enter the formula =NPV(rate,cash_stream). Here, rate is the discount


rate, which is essentially the rate the company believes it can earn on its
money, and cash_stream is a stream of cash inflows or outflows that occur
at the ends of successive years, starting at the end of year 1.

Note that if there is an initial cash inflow or outflow at the beginning of


year 1, it should be entered outside the NPV function. The reason is that it
doesn’t need to be discounted.

Try it! Assume a company pays $100,000 at the beginning of year 1 to get
into an investment. It then receives the cash inflows at the ends of years 1
through 5 shown to the right. What is the NPV of this investment (inflows
minus outflows) with a 12% discount rate? Does the NPV increase or
decrease as the discount rate increases? (Scroll to the right for the
answer.)

XNPV Function (Financial Category)

If a company incurs cash inflows or outflows at irregular times, such as


January 15, then May 30, then July 1, and so on, the NPV function cannot
be used. You could go back to your finance book to see how to discount
future cash flows directly, but it is easier to use the little-known XNPV
function. (Before Excel 2007, this function was actually part of the Analysis
ToolPak add-in that ships with Excel. Since Excel 2007, it has been part of
the regular financial functions group.)

To use the XNPV function:

Enter the formula =XNPV(discount_rate,cash_flows,dates), where


discount_rate is the same as with NPV, cash_flows is a stream of cash
inflows or outflows, and dates is a stream of the dates when they are
incurred.

Typically, the first cash value will be an outflow and the rest will be
inflows. In this case, the initial outflow (investment) should be included in
the XNPV function, and the NPV will be discounted back to the date of this
initial payment. This payment should be entered as a negative number.
Enter the formula =XNPV(discount_rate,cash_flows,dates), where
discount_rate is the same as with NPV, cash_flows is a stream of cash
inflows or outflows, and dates is a stream of the dates when they are
incurred.

Typically, the first cash value will be an outflow and the rest will be
inflows. In this case, the initial outflow (investment) should be included in
the XNPV function, and the NPV will be discounted back to the date of this
initial payment. This payment should be entered as a negative number.

Try it! Find the net present value of the stream of cash inflows shown to
the right, where the first is really a payment at the beginning of 2013.
(Scroll to the right for the answer.)
Discount rate 12%
Initial payment $100,000

Cash inflows at ends of years


Year 1 2 3 4 5
Inflow $20,000 $35,000 $50,000 $45,000 $35,000

NPV

Discount rate 12%

Stream of cash flows


Date 1-Jan-13 25-May-13 15-Sep-13 15-Jan-14 30-Jun-14
Cash $85,000 $22,500 $31,000 $65,500 $55,000

NPV
NPV $29,806

NPV $69,805
IRR (Internal Rate of Return) and XIRR Functions

Companies often have investment opportunities where they pay initially Cash flows (initial value is a
and then receive returns in the future. It is easy to show that the NPV of
such an investment decreases as the discount rate increases. In fact, for $100,000
large enough discount rates, the NPV will typically become negative,
meaning that the future returns are not enough to offset the initial IRR
payment. The discount rate at which NPV changes from positive to
negative is called the internal rate of return, or IRR. Specifically, the IRR is
the discount rate at which NPV equals 0.

Companies are interested in IRR for the following reason. Typically, they
have a "hurdle rate" that they use to discount potential investments. If
the NPV of an investment is positive, discounted at the hurdle rate, it is
worth pursuing. If it is negative, it is not attractive. Stated equivalently,
the investment is worth pursuing only if its IRR is greater than the
company’s hurdle rate.

Excel has an IRR function that calculates an investment’s IRR. As with the
NPV function, the investment should be structured so that there is an
initial cash payment at the beginning of year 1 and then regular cash
returns at the ends of years 1, 2, and so on.

To use the IRR function:

Enter the formula =IRR(cash_stream,rate_guess), where cash_stream is


a stream of cash flows, where the first (the initial payment) should be
negative, and rate_guess is an initial guess for the IRR.
This seems strange. Why should you have to guess at the answer? It is
because Excel calculates the IRR iteratively, starting with your guess. Your
actual guess shouldn’t make any difference in the final answer except in
unusual cases.

Try it! Find the IRR for the investment to the right, using an initial guess of
15%. What does this IRR say about the attractiveness of the investment?
(Scroll to the right for the answer.)

Note: The NPV topic in this tutorial describes an XNPV function for cash
flows that don't occur at regularly spaced intervals. There is a
corresponding XIRR function. You can look it up in online help.
sh flows (initial value is a payment)
$35,000 $45,000 $40,000 $25,000 $10,000
IRR 19.81%

The company
The companywillwill find
findthis
this investment
investment
attractive only
attractive only ifif its
its hurdle
hurdlerate
rate isis
below 19.81%
below 19.81% (which
(whichititprobably
probably is). is).
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

Averages, standard deviations


Average Stdev
Product1 #REF!
Product2
Product3
Product4

Correlations
Product1 Product2 Product3 Product4
Product1
Product2
Product3
Product4
Averages, standard deviations
Average Stdev
Product1 #REF! #REF!
Product2 #REF! #REF!
Product3 #REF! #REF!
Product4 #REF! #REF!

Correlations
Product1 Product2 Product3 Product4
Product1 #REF! #REF! #REF! #REF!
Product2 #REF! #REF! #REF! #REF!
Product3 #REF! #REF! #REF! #REF!
Product4 #REF! #REF! #REF! #REF!
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: Open the
the name
name manager
manager and
and look
look at
at
the definition
the definition of
of the
the Sales1
Sales1range
rangename.
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 and look
look at
at
1range
rangename.
name.
Date
Quick Analysis 6-Mar
6-Mar
The Quick Analysis tool, introduced in Excel 2013, is a feature that 6-Mar
received considerable publicity. Starting with a data set such as the one
to the right, the new Quick Analysis tools provide you with instant 6-Mar
conditional formatting, pivot tables, charts, and other results with almost 6-Mar
no work. You can decide how useful this new feature really is. It 6-Mar
undoubtedly gives you very quick results, but it might not give you the
results you want. 7-Mar
7-Mar
To see how this works, select the entire data range to the right, including
the labels in row 3. You will see a Quick Analysis icon at the bottom right 7-Mar
of the data range. (Remember that if you are using a pre-2013 version of 8-Mar
Excel, this won't work.) When you click this icon (or press Ctrl+Q), you 8-Mar
see the Quick Analysis options below and to the right. Then you can
explore the possibilities. They are all straightforward. 8-Mar
9-Mar
As an example, if you choose Tables and then choose the first of several 9-Mar
automatic pivot tables, you get the pivot table on the next sheet, which
breaks down the sum of Total Cost by Region. This might or might not be 10-Mar
the pivot table you really want, but at least it gives you a pivot table that 10-Mar
you can then modify as you like. Similar statements can be made about 10-Mar
the automatic charts available from the Charts item. You can decide
whether this is any easier than building the pivot table or the chart you 10-Mar
really want from scratch. 11-Mar
Starting in Excel 2013, two of these Quick Analysis options are duplicated 11-Mar
by two "let us guess what you want" items in the Insert ribbon, shown to
the right. These are the Recommended PivotTables and Recommended Quick Analysis options
Charts items. They provide exactly the same options for pivot tables and
charts as from the Quick Analysis tools.

New items in Insert ribbon


Day Time Region Card Type Gender Buy Categos Ordered Total Cost High Item
Tue Morning West ElecMart Female High 4 $136.97 $79.97
Tue Morning West Other Female Medium 1 $25.55 $25.55
Tue Afternoon West ElecMart Female Medium 5 $113.95 $90.47
Tue Afternoon NorthEast Other Female Low 1 $6.82 $6.82
Tue Afternoon West ElecMart Male Medium 4 $147.32 $83.21
Tue Afternoon NorthEast Other Female Medium 5 $142.15 $50.90
Wed Evening West Other Male Low 1 $18.65 $18.65
Wed Evening South Other Male High 4 $178.34 $161.93
Wed Evening West Other Male Low 2 $25.83 $15.91
Thu Morning MidWest Other Female Low 1 $18.13 $18.13
Thu Morning NorthEast ElecMart Female Medium 2 $54.52 $54.38
Thu Afternoon South Other Male Medium 2 $61.93 $56.32
Fri Morning NorthEast ElecMart Male High 3 $147.68 $96.64
Fri Afternoon NorthEast Other Male Low 1 $27.24 $27.24
Sat Morning West Other Female Low 3 $46.18 $44.27
Sat Afternoon West Other Male Low 5 $107.44 $91.64
Sat Afternoon South ElecMart Female Medium 6 $96.53 $93.68
Sat Afternoon West ElecMart Female Medium 4 $77.44 $77.28
Sun Morning South Other Male Low 1 $15.19 $15.19
Sun Afternoon South Other Male Medium 1 $45.52 $45.52

Quick Analysis options

New items in Insert ribbon


Person
Some Background on Tables 1
2
Note: Several of the screenshots on this worksheet are to the right of the
data, so scroll across to see them. 3
4
It is very common to work with "data sets" in Excel, where a data set is
typically a rectangular range with "observations" in the rows, "variables" in 5
the columns, and variable names in the top row. (Observations are also 6
called cases or records, and variables are also called fields or attributes.) A 7
typical data set appears to the right. Each row is an observation on some
person, and each column lists an attribute about the person. 8
9
Excel users have worked with data sets for years, and for a long time, they 10
were known somewhat informally as lists. But in Excel 2007, they gained
much more prominence and became known as tables. This was a much 11
needed change. You can perform many useful tasks with tables that you 12
either couldn't perform before or could perform only with extra work. Now 13
these tasks are easy.
14
15
16
17
18
19
20
Designating a Data Set as a Table 21
22
It is not enough to have a rectangular range of data to apply the table 23
tools. You must designate the range as a table. There are three ways to
do this, and all are easy. For each, make sure any cell in the table is 24
selected. Then (see screenshots to the right): 25
26
1. Click the Table button near the left of the Insert ribbon, or
27
2. Click the Format as Table dropdown arrow on the Home ribbon and 28
choose any of the color styles.
29
3. Press Ctrl+t. 30
31
Excel guesses that the range "surrounding" the active cell is the table
range in the Create Table dialog box (see screenshot to the right), but 32
you can override this if necessary. 33
34
Try it! Designate the data set to the right as a table. You will see that the
formatting changes, and you will see two other important changes (see 35
blue screenshot to the right). First, there is a dropdown arrow next to 36
each variable name. These are used for sorting and filtering, as discussed 37
below. Second, if the cursor is inside the table, there is a new Table Tools
Design tab and corresponding ribbon. It contains the tools for 38
manipulating the table. 39
If you no longer want the range to be designated as a table, you can click 40
Convert to Range on the Table Tools Design ribbon. The dropdown 41
arrows will disappear. Only the cell formatting will remain, and you can 42
restore it to "plain" if you like. Try this on the table you just created.
manipulating the table.

If you no longer want the range to be designated as a table, you can click
Convert to Range on the Table Tools Design ribbon. The dropdown
arrows will disappear. Only the cell formatting will remain, and you can
restore it to "plain" if you like. Try this on the table you just created.
43
44
45
46
47
48
49
50
51
Filtering in Tables 52
53
One of the main uses of tables is filtering, that is, hiding (but not 54
deleting) rows that don't match various conditions. Filtering is done
through the dropdown arrows next to the column headings. This tutorial 55
won't explain all of the options because there are so many, but with a
little bit of experimenting, you should be able to master them in no time.
Just remember that they build upon one another. For example, if you
filter on Gender so that only males are showing, and you then filter on
Children so that only people with at least two children are showing, you
will see only males with at least two children.
Filtering on a numeric vari
The screenshots to the right shows filter dialog box for a numeric
variable, Salary. It shows all distinct values of Salary, which you could
check or uncheck, but more importantly, the Number Filters group
contains many useful possibilities, such as Greater Than. Similarly, if you
filter on a text variable such as State or a Date variable such as Birthdate,
there are many Text Filters and Date Filters you can choose from.

Try it! If you haven't already done so, designate the data set to the right
as a table, and then experiment with the filters.

To clear a filter, click the column's dropdown arrow and select Clear
Filter. To clear all filters, click the Clear button in the Sort & Filter group
on the Home ribbon. You can also do it from the Data ribbon. (See to the
right.)

Sorting in Tables

You probably noticed that when you click a column dropdown arrow, there are
sorting options. This provides one more way to sort in Excel. It is not clear that
sorting in tables provides any advantages over sorting in regular (non-table)
data sets, but it is certainly possible and easy.

Summarizing with the Total Row

One important advantage of a table is that you can summarize filtered data
easily. To do so, check the Total Row box on the Table Tools Design ribbon.
This generates a "total" row below the table. By default, it shows the sum of
Summarizing with the Total Row Total Row button on Table
One important advantage of a table is that you can summarize filtered data
easily. To do so, check the Total Row box on the Table Tools Design ribbon.
This generates a "total" row below the table. By default, it shows the sum of
the values in the rightmost column, as shown to the right. But it gives you
many more options. If you select any cell in the total row, you will see a
dropdown list of summarizing options for that column (count, sum, average,
and others). And if you then filter the data, the summary measures will be
only for the filtered data. (This couldn't be done, at least not easily, before
Excel 2007.) Example of Total Row

Try it! Create a total row for the table of people, and show summary
measures that seem appropriate. Then filter in some way and watch how
the summary measures change.

Expanding Tables Month


A feature of tables that business people will love is that they expand Jan-13
automatically as new data are added. For example, suppose you designate Feb-13
the data set to the right as a table. Later you add new products to the right Mar-13
and/or new months at the bottom. These will automatically be part of the
table. Better yet, if you build a chart from the table, the chart will update Apr-13
automatically to include new data. The same is true of pivot tables if they May-13
are built from tables. Jun-13
Try it! Designate the data set to the right as a table. Next, select the entire Jul-13
table and insert a line chart. By default, you should see a line for each Aug-13
product, with month on the horizontal axis. Now add a couple more months Sep-13
of data at the bottom of the table and add a new product with some data at
the right of the table. The chart should update automatically! 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
Birthdate Gender State Children Salary Table button on Insert ribbon
8/5/1959 Male Illinois 1 $65,400
10/15/1977 Female Wisconsin 2 $62,000
1/3/1981 Male Ohio 0 $63,200
5/5/1949 Male Indiana 2 $52,000
4/4/1987 Female Michigan 3 $81,400
6/30/1949 Female Indiana 3 $46,300 Format as Table options
5/22/1949 Female Illinois 2 $49,600
10/30/1952 Male Michigan 1 $45,900
1/17/1957 Male Michigan 3 $47,700
9/18/1985 Female Indiana 1 $59,900
7/19/1953 Male Ohio 1 $48,100
12/10/1946 Female Wisconsin 0 $58,100
3/29/1986 Female Michigan 2 $56,000
12/12/1952 Female Indiana 2 $53,400
6/12/1977 Female Indiana 2 $39,000
11/19/1989 Male Wisconsin 1 $61,500
9/6/1957 Male Ohio 0 $37,700
9/30/1970 Female Michigan 2 $36,700
10/24/1973 Male Wisconsin 2 $45,200
6/8/1978 Male Illinois 0 $59,000
8/27/1990 Female Ohio 2 $54,300
2/9/1947 Male Indiana 1 $62,100
4/1/1989 Male Michigan 0 $78,000
3/12/1970 Male Wisconsin 0 $43,200
3/28/1970 Male Ohio 1 $44,500
5/6/1963 Male Michigan 1 $43,300 Create Table dialog box
5/7/1959 Male Indiana 3 $45,400
3/6/1987 Male Michigan 2 $53,900
2/9/1958 Male Illinois 1 $44,100
8/4/1955 Female Ohio 2 $31,000
11/9/1984 Male Indiana 2 $67,400
2/10/1961 Female Ohio 1 $59,300
4/1/1961 Female Ohio 1 $48,600
10/20/1961 Male Illinois 0 $58,400
4/25/1970 Male Michigan 2 $65,500
2/17/1977 Male Michigan 0 $46,900
4/13/1985 Male Michigan 2 $41,000
5/16/1966 Male Ohio 0 $89,300 Dropdown arrows next to variable na
10/28/1969 Female Indiana 3 $71,800
11/30/1958 Male Illinois 1 $95,000
9/27/1962 Male Illinois 1 $49,700
1/25/1968 Male Ohio 2 $71,700
10/15/1988 Female Wisconsin 0 $52,900
2/11/1978 Female Michigan 0 $58,300
6/19/1974 Male Indiana 2 $82,000
9/22/1989 Male Wisconsin 0 $41,300 Table Tools Design ribbon
7/25/1983 Female Wisconsin 1 $72,000
4/9/1956 Female Indiana 2 $73,500
2/9/1989 Male Ohio 2 $55,200
12/10/1960 Female Michigan 1 $57,000
8/6/1956 Male Michigan 2 $84,300
9/20/1981 Male Indiana 2 $68,900
1/31/1963 Male Wisconsin 2 $59,000
12/7/1973 Female Ohio 0 $83,200
12/3/1988 Male Wisconsin 0 $52,400

Filtering on a numeric variable Clear all filters on Home ribbon Clear all filters button on Data ribbon
Total Row button on Table Tools Design ribbon

Example of Total Row

Product 1 sales Product 2 sales


$1,015 $1,779
$1,693 $1,768
$1,555 $4,476
$3,681 $3,565
$1,737 $3,475
$3,669 $2,186
$2,978 $4,363
$1,304 $2,412
$2,456 $4,433
$2,613 $1,572
$4,114 $2,861
$3,316 $3,251
$1,811 $4,382
$3,553 $3,833
$1,108 $4,373
$1,810 $2,839
$2,167 $4,476
$2,355 $3,744
$1,698 $1,216
$3,814 $4,351
$4,619 $3,058
$3,868 $4,497
tton on Insert ribbon

s Table options

ble dialog box

n arrows next to variable names


ls Design ribbon

on on Data ribbon
Introduction to Data Tables

Data tables, also called what-if tables, allow you to see very quickly how
one or more outputs change as one or two key inputs change. This is
often called sensitivity analysis, or simply what-if analysis, and it is a key
part of most business models.

Business models are all about what-if questions. What would happen to
profit if our unit cost increased by x%? What would happen to our sales if
our competitor's price decreased by y%? And so on. Data tables are
perfect for answering these types of questions in a systematic way, and
they are quite easy to create. Therefore, it is surprising that so few Excel
users are aware of data tables. This is a very valuable tool, so you should
definitely learn it!

There are two types of data tables: one-way data tables and two-way data
tables. A one-way data table has one input and any number of outputs. A
two-way data table has two inputs but only one output. Both of these are
discussed here.

You find the Data Table option (for one-way or two-way data tables)
under the What-If Analysis dropdown on the Data ribbon, as shown to the
right.

Creating a One-Way Data Table with One Output

A one-way data table lets you see how one or more selected outputs
change as a single input varies over some range.

To illustrate, suppose you buy a new car for $20,000, make a $5,000
down payment, and finance the remaining amount over the next 36
months at a 6.5% annual interest rate. There are at least two outputs
that might be of interest: the monthly payment and the total interest
paid on the loan. These are affected by the four inputs in blue to the
right.

Let’s first look at a simple one-way data table, which illustrates how a
single output, monthly payment, varies as the annual interest rate varies.
This is shown in the example to the right.

To create the data table (which has already been done):

Enter a link to the output in cell L39. Specifically, because the monthly
payment was calculated with the PMT function in cell L34, enter the
formula =L34 in cell L39. Then, starting in cell K40, enter any sequence of
interest rates. Next, select the entire table—the range K39:L44. Then
select Data Table from the What-If Analysis dropdown on the Data
ribbon. Finally, enter L31, the interest rate cell, as the column input cell in
the resulting Data Table dialog box shown to the right. There is no row
input cell, so leave it blank.

If one of the input values along the side of the data table equals the
original value of this input, this provides an internal check of your data
payment was calculated with the PMT function in cell L34, enter the
formula =L34 in cell L39. Then, starting in cell K40, enter any sequence of
interest rates. Next, select the entire table—the range K39:L44. Then
select Data Table from the What-If Analysis dropdown on the Data
ribbon. Finally, enter L31, the interest rate cell, as the column input cell in
the resulting Data Table dialog box shown to the right. There is no row
input cell, so leave it blank.

If one of the input values along the side of the data table equals the
original value of this input, this provides an internal check of your data
table. In this example, the original annual interest rate, 6.50%, is one of
the values in the data table, and the corresponding monthly payments, in
cells L34 and L42, are both equal to $459.74, as they should be.

It is important to understand exactly what happens when you create a


data table, so read this paragraph several times until it sinks in. Excel
takes each interest rate in column K, substitutes it into the column input
cell you designated (cell L31), recalculates the monthly payment in cell
L34 with this new interest rate (and hence the link in cell L39, the one
colored gray for emphasis), and records the result in the corresponding
row of the data table. You use a column input cell because the possible
values of the input (the interest rates) are listed down a column.

You can tell that you have a data table by looking at any of the "answer"
cells, such as cell L40. It contains a formula =TABLE(,L31), surrounded by
curly brackets. The part inside the parentheses shows the row and
column input cells, the first of which is blank in this example. The curly
brackets indicate that this is an array formula. Essentially, this means that
it is entered in all of the answer cells of the data table at once, as a
group. You never need to enter this formula; you should create the table
as explained above. However, the formula documents what the answer
range contains.

Try it! Create a one-way data table to the right, where the monthly
payment is calculated for each price of car from $18,000 to $25,000 in
increments of $1000 (with the down payment fixed at $5000). (Scroll to
the right for the answer.)

Creating a One-Way Data Table with Multiple Outputs

It is also possible to capture multiple outputs in a one-way data table. The


extra outputs appear as extra columns of the data table. Other than this,
the data table is structured exactly as before.

An example appears to the right, where the single input is still the interest
rate, but there are two outputs: monthly payment and total interest paid.
This table is formed exactly as before, using the same column input cell,
except that the data table range now includes column M, and there are
links to both outputs in the gray cells.

Try it! Create a one-way data table to the right that shows the monthly
payments and the total interest paid for each value of the number of
payments from 12 to 48, in increments of 12. (Scroll to the right for the
the data table is structured exactly as before.

An example appears to the right, where the single input is still the interest
rate, but there are two outputs: monthly payment and total interest paid.
This table is formed exactly as before, using the same column input cell,
except that the data table range now includes column M, and there are
links to both outputs in the gray cells.

Try it! Create a one-way data table to the right that shows the monthly
payments and the total interest paid for each value of the number of
payments from 12 to 48, in increments of 12. (Scroll to the right for the
answer.)

Creating a Two-Way Data Table

Two-way tables allow you to vary two inputs, one along a row and one
along a column, and capture a single output in the body of the table. The
example to the right illustrates this, where the annual interest rate and
the amount of the down payment both vary, and the single output is the
monthly payment.

To create this table (which has already been done):

Enter the formula =L34 for the single output in the upper left corner, cell
K102, of the data table. (Again, this cell has been colored gray for
emphasis.) Enter any sequence of down payments to the right of this and
any sequence of interest rates below this. Next, select Data Table from
the What-If Analysis dropdown, and enter L29 as the row input cell and
L31 as the column input cell as shown to the right.

As with one-way tables, you can tell you have a data table by looking at
any of the "answer" cells, such as cell L103. Each contains the formula
=TABLE(L29,L31), surrounded by curly brackets. This formula indicates
that cell L29 is the row input cell and cell L31 is the column input cell. In
words, the values for down payment go across the top row of the table,
and the values for interest rate go down the left column of the table.

Remember that a two-way data table allows only one output. If you want
to analyze multiple outputs, you have to create multiple two-way data
tables, one for each output.

Try it! Create a two-way data table to the right that calculates the total
interest paid for each value of the number of payments from 12 to 60 in
increments of 12, and each down payment from $4000 to $6000 in
increments of $1000. Put the down payments along the top and the
numbers of payments along the side. (Scroll to the right for the answer.)

Recalculation and Data Tables

Some data tables are very long (many rows), and each value might require
the recalculation of a complex business model. Therefore, the recalculation
Recalculation and Data Tables
Some data tables are very long (many rows), and each value might require
the recalculation of a complex business model. Therefore, the recalculation
of the entire data table can take a while, several seconds or even minutes.
For this reason, Excel allows you to select the Automatic Except for Data
Tables calculation option from the Formulas ribbon, as shown to the right.
In this case, the data tables won't recalculate until you force them to by
pressing the F9 key.

Try it again! Check that the calculation setting is Automatic (the default
setting), and create any data table to the right. Next, change the calculation
setting from Automatic to Automatic Except for Data Tables and create the
data table again. You should see the same value throughout the table,
which is disconcerting. But you can press the F9 key to get the correct
answers. Then change the calculation setting back to Automatic.
Data Table item on Data ribbon

Payment model
Price of car $20,000
Down payment $5,000
Amount financed $15,000
Annual interest rate 6.50%
Number of payments 36

Monthly payment $459.74


Total interest paid $1,550.46

Data table
Interest rate Monthly payment
$459.74
6.00%
6.25%
6.50%
6.75%
7.00%
Data Table dialog box

Data table for exercise


Price of car Monthly payment

Data table
Interest Monthly payment Total interest
$459.74 $1,550.46
6.00%
6.25%
6.50%
6.75%
7.00%
Data table for exercise
Number of payments Monthly payment Total interest

Data table of monthly payment


$459.74 $4,000 $5,000 $6,000
6.00%
6.25%
6.50%
6.75%
7.00%

Data Table dialog box

Data table for exercise


Calculation options on Formulas ribbon
Data table for exercise
Price of car Monthly payment
$459.74
$18,000
$19,000
$20,000
$21,000
$22,000
$23,000
$24,000
$25,000
Data table for exercise
Number of payments Monthly payment Total interest
$459.74 $1,550.46
12
24
36
48

Data table of total interest paid


$1,550.46 $4,000 $5,000 $6,000
12
24
36
48
60
Goal Seek: Solving One Equation in One Unknown

Do you remember your high school algebra class where you had to solve
a single equation for a single unknown value? You can do this in Excel
with the Goal Seek tool. The unknown is called a changing cell.
Essentially, you want to change the value in this cell to force a formula in
some other cell to equal a specified value.

A simple example of this appears below and to the right. Demand for a
company's product is determined by a linear demand curve: the higher
the price, the lower the demand. The company produces exactly enough
to meet demand, with the given fixed and variable costs of production.
The company wants to find the breakeven price, that is, the price that
makes profit equal to 0. This breakeven price can be found with Goal
Seek. Here are the steps. (Before you do this, you might see if you can
find the breakeven price by trial and error, by entering different values in
cell L32. If nothing else, this will help you understand the model better,
and it will give you a better appreciation of Goal Seek.)

1. Choose Goal Seek from the What-If Analysis dropdown on the Data
ribbon (see to the right)

2. Fill in the Goal Seek dialog box as shown to the right. Specifically, the
price in cell L32 should be changed so that the profit in cell L39 is driven
to 0.

If you try this, you will see the Goal Seek Status dialog box to the right,
and you will see that the the price should be set to $22.57. This price
makes demand equal to 3900, so the company sells 3900 units and
makes $2.57 on each of them, which is just enough to offset the $10,000
fixed cost. The calculations with this unit price are shown in column N.

Try it! Use Goal Seek to find the price that makes profit equal to $30,000.

Note: For numerical reasons, Goal Seek doesn't force profit to exactly the
value you specify; it sometimes only gets close. If this isn't close enough,
you can change an Excel setting to make it closer. Go to Excel Options
and choose the Formulas group. (See below and to the right.) Then
change the "Maximum Change" to a smaller value (more zeros to the
right of the decimal).
Goal Seek item on Data ribbon

Goal Seek dialog box

Goal Seek Status dialog box

Profit model
Fixed cost $10,000 $10,000
Variable cost $20.00 $20.00
Unit price $25.00 $22.57

Demand curve (linear)


Intercept 4000 4000
Slope -5 -5
Demand 3875 3887.137

Profit $9,375 $0

Maximum Change Setting in Excel Options


Optimizing with Solver

Solver is an add-in that ships with Excel but is developed by Frontline Systems,
not Microsoft. It is used for constrained optimization models. There is much
more about Solver models than can possibly be covered here, but basically,
you must first develop a spreadsheet model that starts with numerical inputs
and values of decision variables (called changing cells), and then uses
formulas that capture the business logic and eventually lead to an objective,
such as profit or total cost, that you want to maximize or minimize. Then you
fill out a Solver dialog box to indicate the objective, the changing cells,
constraints that must be satisfied, and appropriate options. When you click
the Solve button, the add-in uses powerful algorithms to find the optimal
solution.
A simple optimization model appears to the far right. The objective is to find
the minimum-cost way to send units of some product from manufacturing
plants to customer regions so that plant capacities are not exceeded and
regional demands are met. The blue ranges contain given inputs (the unit cost
of transportation from plant sites to regions, the demands in the regions, and
the capacities of the plants), the red cells are the changing cells, and the gray
cell is the objective to minimize. You can check the formulas in the yellow and
gray cells that capture the business logic. The formulas are very simple for this
model, but the logic can be much more complex in other models.

You then invoke Solver from the Data ribbon and fill out its main dialog box as
shown to the right for Excel 2010 or later versions. (Scroll down for equivalent
screenshots in pre-2010 versions of Solver. There you have to go to an
Options dialog box to complete the settings.) When you click the Solve
button, you will see the Solver Results dialog box shown to the right, and the
solution in the red changing cells to the right will be found, regardless of the
original values in the red cells. This solution minimizes total cost, while
satisfying capacity and demand constraints.

Note: If Solver is not on your Data ribbon, you will need to add it in. Click the
File menu and Options in Excel 2010 or later (or the Office button and then
Excel options in Excel 2007), then Add-ins, and then the Go button. Check the
Solver item to add it in. If Solver isn't in the list below, you will need to run the
Office installer to install it.

Add-Ins list with Solver checked


Improved Solver
Solver was upgraded in Excel 2010. If you have used earlier versions of Solver, you
will see two basic changes.

First, the user interface has been streamlined, as shown to the right. In particular, for
most optimization models, you no longer need to go to the Options dialog box. You
can now check the nonnegativity option and choose an appropriate Solver algorithm
from this initial screen.

Second, there is an extra algorithm, Evolutionary Solver, available for complex


"nonsmooth" optimization models. This was available only in Premium Solver before
Excel 2010, not in the standard Solver that accompanied Excel. Now you get
Evolutionary Solver with Excel.

Actually, there are other differences "under the hood" in the improved Solver. In
short, it works better. Frontline Systems has many Solver products, one of which was
known as Premium Solver (and had to be purchased separately). Now the improved
Solver introduced in Excel 2010 is essentially the old Premium Solver.
short, it works better. Frontline Systems has many Solver products, one of which was
known as Premium Solver (and had to be purchased separately). Now the improved
Solver introduced in Excel 2010 is essentially the old Premium Solver.
Solver button on Data ribbon Solver model

Unit shipping costs


From

Solver dialog box settings

Units shipped
From

Total cost

Solver Results dialog box


Solver dialog box in pre-2010 versions Solver Options dialog box in p
Solver model
To
Unit shipping costs Region 1 Region 2 Region 3 Region 4
Plant 1 $131 $218 $266 $120
Plant 2 $250 $116 $263 $278
Plant 3 $178 $132 $122 $180

To
Units shipped Region 1 Region 2 Region 3 Region 4 Total shipped Capacity
Plant 1 150 0 0 300 450 <= 450
Plant 2 100 200 0 0 300 <= 600
Plant 3 200 0 300 0 500 <= 500
Total received 450 200 300 300
>= >= >= >=
Demand 450 200 300 300

$176,050
Solver Options dialog box in pre-2010 versions
Get External Data on Data
Introduction to Importing External Data into Excel

Excel's strength lies in its ability to analyze data. However, the data you
want to analyze will not always reside in an Excel worksheet. The data
might be on a Web site, in a text file, in a database, or in some other
source. The question, then, is how you can import the required data into
Excel. Fortunately, Excel has some very powerful tools for importing data,
both "old" and "new." The older tools, discussed in this section of the
tutorial, have been part of Excel for years, and they still work fine. You can
find them in the Get External Data group on the Data ribbon, shown to
the right. (Depending on the size of the Excel window, the Get External
Data group might appear as a single Get External Data dropdown.)

The newer tools comprise Power Query, part of the Power BI suite that is
discussed in another section of this tutorial. These tools are in the Get &
Transform group to the right of the Get External Data group.

Many Excel users are comfortable using the older tools and will probably
continue to use them (assuming that Microsoft continues to support
them). However, if you are new to importing external data, we highly
recommend the newer Power Query tools.
Get External Data on Data ribbon
Importing Data from a Text File

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.
Faculty Support StaSupply Budget
Credit HourResearch Pubs
Business
150 70 5
15 225
Education
60 20 3
5.4 70
Arts & Sciences
800 140 20
56 1300
HPER
30 15 1
2.1 40

No. 2
From Text button on Data ribbon

Step 1 of Text Import Wizard

Step 2 of Text Import Wizard


Step 3 of Text Import Wizard
From Access button on Da
Importing Data from a Database

The other topics in this section of the tutorial explain how to import data
from the Web or from a text file. Although these operations are common,
they probably aren't as common as the importing method described
here: importing data from a database. This is a huge topic, and this
tutorial only scratches the surface.

There are many database packages available for storing data, including
Microsoft Access (part of the Office suite) and many server-based
systems such as Microsoft's SQL Server, Oracle's RDBMS, IBM's DB2, and
others. Fortunately, all of these store data in essentially the same way: as
related tables, where each table stores information about a particular
entity such as a product, a customer, or a vendor. Also, they all use
essentially the same query language, Structured Query Language, or SQL,
to retrieve specific subsets of the data. Because of this commonality
across database packages, technologies have been developed over the
past two decades that allow users, often programmers, to import
database data into applications, including Excel.

The simplest way to import database data into Excel, and the only one
described in detail here, is to use the From Access button in the Get Named queries (top icons
External Data group on the Data ribbon, shown above and to the right.
After you then browse for an Access database file, you have two options.
The first is to import one or more tables. (The option to select multiple
tables was introduced in Excel 2013.)

The second possibility is more flexible. You can import data from a
named query in an Access file. For example, the list to the right includes
several named queries from the famous Northwind database provided by
Microsoft. This means that you should first create queries of interest in
Access, and save them, before importing the data into Excel. Of course,
this assumes that you know how to create queries through Access's user
interface. This is not difficult, but it takes some practice.

Other import options appear under the From Other Sources dropdown
list shown to the right. The most common of these is From Microsoft
Query. Only the outline of the procedure is given here. Basically, it is a
three-step process.

1. You identify the data source and the type of database you have:
Access, SQL Server, Oracle, or whatever. In case of a server-based system,
you must identify the server and probably provide a valid username and Microsoft Query in the Fro
password.

2. You create a query for the data you want. You can do this through a
user interface that is very similar to the one in Access, or you can enter
an SQL statement directly.

3. You tell Microsoft Query to return the data to Excel, in a location of


your choice, either as a table or a pivot table.

This procedure creates a link to the underlying database source, so that if


there are changes to the database, you can do a refresh in Excel to get
the latest data.
Note: Starting in Excel 2016, another option is to use Power Query, which
is discussed in another topic in this tutorial. (You select From Database
and then From Microsoft Access Database from the New Query
dropdown.
This procedure creates a link to the underlying database source, so that if
there are changes to the database, you can do a refresh in Excel to get
the latest data.

Note: Starting in Excel 2016, another option is to use Power Query, which
is discussed in another topic in this tutorial. (You select From Database
and then From Microsoft Access Database from the New Query
dropdown.
From Access button on Data ribbon

Named queries (top icons) and tables (bottom icons) in Northwind database

Microsoft Query in the From Other Sources list on the Data ribbon
Web Queries

To say the least, there is an abundance of interesting data on the Web. Because
Web authors can design their sites in a variety of ways, there is no guarantee
that the Web data can be imported easily into Excel, but it is worth trying with a
Web query, a simple and powerful tool.

To understand how Web queries work, you need to understand a little about
Web pages. They are all written in HTML, a markup language that has "tags" to
identify different parts of a page. One such tag is the Table tag. It often indicates
a rectangular array of data, but it is also used for all sorts of things that aren't
really tables. In any case, a Web query can import anything that is surrounded
by table tags. You can then decide which "tables" are of interest to you.

Try it! First open your browser, locate a website that has data you want to
import, and copy its URL. For this example, you could use the URL for monthly
IBM stock prices from November 2013 back to 2000:

http://finance.yahoo.com/q/hp?
s=IBM&a=0&b=1&c=2000&d=10&e=1&f=2013&g=m

Then, starting in a blank workbook, click From Web in the Get External Data
dropdown on the Data ribbon, as shown above and to the right. This opens the
New Web Query dialog box to the right. Paste your URL into the Address box
and click Go. The Web page will open, hopefully with one or more yellow
arrows corresponding to the table tags on the page. Find the one(s) you want
and click them, which changes them to green check marks. Then click Import.

The Import Data dialog box to the right lets you choose where to start the
import. Just make sure there is plenty of blank space below and to the right of
the selected cell. Note that not all of the data are imported. This particular
website sends back only a certain number of data items per query.

Excel remembers the source of this data and keeps a link to it. The connection in
the current workbook was removed, but to see it in your own workbook, you
can click the Connections button on the Data ribbon. You will see the Workbook
Connections dialog box to the right. (The connection has the generic name
Connection, but it can be renamed as shown. ) From here, you can do several
things. First, in case the Web data change through time, you can click Refresh to
get the newest data. Second, you can click Properties, then the Definition tab,
and then the Edit Query button to return to the New Web Query dialog box.
Finally, if you don't want a live link to the website, you can click Remove, as was
done here.

Note: Unfortunately, the Web query method described above doesn't work on a
lot of promising websites. The good news, however, is that, starting with Excel
2016, you can import Web data with Power Query, described in another topic in
this tutorial. (You select From Other Sources and then From Web from the New
Query dropdown.) Our experience is that the Power Query method works on
many websites where the "old" method described above does not work.
From Web button on Data ribbon

New Web Query "mini-browser"

Import Data dialog box

Workbook Connections dialog box


General Documentation

There is nothing worse than getting a spreadsheet from someone with no


documentation. All you see are loads of meaningless numbers and possibly a
few not-well-thought-out labels. This is a very poor practice, and you
shouldn't be guilty of it. There are a number of things you can do to document
your work. Of course, you should use descriptive labels and a clear, logical
structure, but you can do more than this. For example, you can include cell
comments and text boxes, as explained below.

Insert comment
Cell Comments

A cell comment is useful when you want to explain something that is


probably not obvious in a particular cell. You will know a cell contains a
comment when you see a little red mark in the upper right corner of the
cell. You can see the cell comment by hovering the cursor over the cell. By
default, a cell comment starts with the owner's name, but you can delete
this name if you like.

To insert a cell comment in a cell, right-click the cell. If there is no existing


cell comment, you will see an Insert Comment item. If there is an existing
cell comment, you will see Edit Comment and Delete Comment items.
(See the screenshots to the right.)

Try it! Add the following cell comment to the gray cell to the right: Sales
are in $1000s. Then change the comment to: Monthly sales in $1000s.
Then delete the cell comment.

For more on cell comments, visit the Comments group on the Review
ribbon. You might not ever use all of these buttons, but they could be
handy if someone gives you a spreadsheet with a lot of cell comments,
and you want to browse through them quickly.

Text Box button in (right s


Text Boxes

When you add explanations to your worksheets, do you tend to start


typing in a cell, and when it gets long enough, you continue typing on the
next line, etc.? Many people do this, but it is not a good habit, mostly
because of the difficulty of editing. It is much better to use text boxes, as
you see throughout this tutorial. Text boxes are much better for
explanations than cells because they have word wrap. They are
essentially mini-word processors that can be edited (and moved or
resized) easily. You should use them in virtually every spreadsheet you
create!

To insert a text box, click the Text Box button on the Insert ribbon, as
shown to the right, and drag a text box in some area of the worksheet.
next line, etc.? Many people do this, but it is not a good habit, mostly
because of the difficulty of editing. It is much better to use text boxes, as
you see throughout this tutorial. Text boxes are much better for
explanations than cells because they have word wrap. They are
essentially mini-word processors that can be edited (and moved or
resized) easily. You should use them in virtually every spreadsheet you
create!

To insert a text box, click the Text Box button on the Insert ribbon, as
shown to the right, and drag a text box in some area of the worksheet.
Then start typing. It's as easy as that.

You might also want to change the appearance of the text box. To do so,
click it twice so that the border becomes a solid line. (It's a dashed line
after the first click). Then you will see a Drawing Tools Format tab and
associated ribbon where you can make all sorts of changes. For example,
in this tutorial all text boxes are rounded in two corners and have a blue
border. If you like the appearance, you can right-click the text box and
choose the Set as Default Text Box item. Then every other text box you
create in that workbook will automatically have the same appearance.

Try it! Create a text box to the right and enter some text. Then see if you
format it like the text boxes in this tutorial.

Note again that if you click a text box once, its border becomes a dashed
line. If you then click it again, it becomes a solid line. The options
available are slightly different in these two cases. For example, if you
want to delete a text box, you should make the border a solid line and
then press the Delete key. In contrast, if you press the Delete key when
the border is dashed, you will delete some text.

Format Shape dialog box

Positioning of Text Boxes (and other shapes)

When you add text boxes (or other shapes such as circles, rectangles, and
arrows) to a worksheet, they essentially "float" above the worksheet cells. If
you then insert rows or columns under these shapes, or if you change row
heights or column widths under them, the shapes might move or expand. You
might want this behavior, or you might not. In either case, you can control the
behavior. To do so, right-click a shape, such as a text box, and select Size and
Properties. The dialog box to the right appears. (This is for Excel 2013, where
the user interface changed noticably.) You can then select the "Object
positioning" option you want under Properties. For example, if you want the
shape to stay fixed in the same size and position, select the "Don't move or
size with cells" option, as shown here.

Shapes dropdown list on I


Using Shapes for Emphasis

Using shapes, such as red ovals for emphasis, is another documentation


possibility. Actually, the red ovals you see in the tutorial's screenshots, such as
the one above, were created in the screen capture software itself, but they
could also be created with Excel's shapes. As you can see to the right, Excel
provides many shapes to choose from.
Using Shapes for Emphasis

Using shapes, such as red ovals for emphasis, is another documentation


possibility. Actually, the red ovals you see in the tutorial's screenshots, such as
the one above, were created in the screen capture software itself, but they
could also be created with Excel's shapes. As you can see to the right, Excel
provides many shapes to choose from.

By default, a shape such as an oval is opaque, with a blue fill and a darker blue
border. But if you select it, you get the Drawing Tools Format tab and
associated ribbon, where you can format the shape in an endless number of
ways.
Insert comment Edit or Delete comment Sales
15.3
14.7
9.6
12.1
14.2

Text Box button in (right side of) Insert Ribbon


Format Shape dialog box

Shapes dropdown list on Insert menu


Conditional Formatting bu
Background on Conditional Formatting

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 Conditional Formatting op
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 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 New Formatting Rule dialo
lets you see and edit the rules, if any, for the current selection or any of
the worksheets in the current workbook.

It is impossible to explain all of the possibilities, but a few typical options


are illustrated below.

Exam score
Applying Some Simple Conditional Formatting 62

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 than the value in the green cell and a low
Applying Some Simple Conditional Formatting
88
A typical use of conditional formatting is to color all "high" values one 77
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, 62
where a high score is greater than the value in the green cell and a low 94
score is less than the value in the red cell. To do so: 68
1. Select all exam scores in column K. 73
61
2. Click the Conditional Formatting dropdown, then Highlight Cell Rules,
and then Greater Than. 99
94
3. In the Greater Than dialog box, enter a cell reference to the green cell 88
and select a green format of your choice.
82
4. Repeat steps 2 and 3 in the obvious way for the low values. 87
65
Try it! Perform the above steps. Then change the values in the green and
red cells in column N to see how the formatting changes automatically. 82
70
To delete the formatting, click Conditional Formatting and then Clear 94
Rules.
80
To change the formatting rules, click Conditional Formatting and then 96
Manage Rules. You can experiment with the possible options.

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
Try it! Use any interesting formats you like to format the dates, text, or
numbers to the right. Remember that you can always modify the formats
or clear them.

18
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.

2. Choose New Rule from Conditional Formatting, and select "Use a


formula to determine which cells to format".

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.
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.
Conditional Formatting button on Home ribbon

Conditional Formatting options Higlight Cell Rules options Top/Bottom Rules options

New Formatting Rule dialog box Manage Rules dialog box

Exam score Cutoffs for extremes


High 94
Low 66

Birthdate Gender State Children Salary


8/5/1959 Male Indiana 1 $65,400
10/15/1977 Female Michigan 2 $62,000
1/3/1981 Male Illinois 0 $63,200
5/5/1949 Male Wisconsin 2 $52,000
4/4/1987 Female Michigan 3 $81,400
6/30/1949 Female Wisconsin 3 $46,300
5/22/1949 Female Ohio 2 $49,600
10/30/1952 Male Ohio 1 $45,900
1/17/1957 Male Illinois 3 $47,700
9/18/1985 Female Indiana 1 $59,900
7/19/1953 Male Illinois 1 $48,100
12/10/1946 Female Michigan 0 $58,100
3/29/1986 Female Wisconsin 2 $56,000
12/12/1952 Female Illinois 2 $53,400
6/12/1977 Female Illinois 2 $39,000
11/19/1989 Male Ohio 1 $61,500
9/6/1957 Male Ohio 0 $37,700
9/30/1970 Female Michigan 2 $36,700
10/24/1973 Male Illinois 2 $45,200
6/8/1978 Male Ohio 0 $59,000
8/27/1990 Female Ohio 2 $54,300
2/9/1947 Male Illinois 1 $62,100
4/1/1989 Male Wisconsin 0 $78,000
3/12/1970 Male Ohio 0 $43,200
3/28/1970 Male Indiana 1 $44,500
5/6/1963 Male Michigan 1 $43,300
5/7/1959 Male Ohio 3 $45,400
3/6/1987 Male Indiana 2 $53,900
2/9/1958 Male Michigan 1 $44,100
8/4/1955 Female Indiana 2 $31,000

Region1 Region2 Region3 Region4 Region5 Region6


$4,771 $3,649 $4,126 $3,849 $1,036 $3,131
$1,132 $3,002 $1,872 $4,869 $2,846 $4,246
$1,386 $3,074 $3,161 $3,975 $2,608 $4,119
$3,053 $2,308 $3,617 $4,906 $1,822 $3,626
$4,992 $2,012 $4,155 $3,534 $1,792 $3,879
$1,249 $3,708 $3,812 $1,003 $1,965 $3,460
$1,892 $4,052 $3,747 $2,804 $2,795 $3,528
$2,418 $3,086 $2,081 $3,151 $2,037 $3,234
$3,864 $1,273 $1,808 $4,420 $4,089 $4,448
$4,931 $1,057 $2,466 $3,335 $2,148 $3,589
$4,516 $3,734 $4,732 $4,715 $2,714 $2,041
$3,938 $3,693 $1,577 $3,453 $3,513 $3,785
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.

Applying a Simple Numeric Validation

To allow only values between two given values:

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.

Validating from a List

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
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.

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

Data Validation dialog box

any integer between 1 and 10


any decimal number between 1 and 10
any positive integer
any negative decimal number
any integer between the two values below (use cell references for these values)
30 40

Amount financed $25,000


Interest rate 6.25%
Term
Monthy payment #NUM!

Date of loan
for these values)
Protect options on Review
Protecting a Worksheet or Workbook

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 Protect Sheet dialog box
experiment with others.

The key idea is locking cells. Right-click any cell on this worksheet, select
Format 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

Protect Sheet dialog box


Numeric Functions

Month Clients Sales Large = 24 k=1 for 1 largest number


Jan IBM 10.00 Small = 10
Feb Syntel 20.00 Sum = 182.00
Mar Siemens 20.00 Count = 10 count numeric cell
Apr Bajaj 21.00 Counta 10 count alphabats also
May Bajaj 10.00 Average 18.20
Jun IBM 22.00 Max 24.00
Jul Syntel 18.00 Min 10.00
Aug Siemens 23.00 Averageif 20.25
Sep IBM 14.00 Sumif 148 70
Oct IBM 24.00 Countblank 1
ic Functions

Sumifs
or 70 10 113

Вам также может понравиться