0% found this document useful (0 votes)
905 views299 pages

Tips Workbook

Uploaded by

Nirmal Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
905 views299 pages

Tips Workbook

Uploaded by

Nirmal Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 299

Vertex42® Spreadsheet Tips Workbook

Single User License. This workbook is licensed to: Version: 1.1 by Jon Wittwer and Brent Weight
[Enter your name here] About this Workbook © 2013-2018 Vertex42 LLC
License Agreement

Master Excel One Tip at a Time

Progress Overall Progress: 0%

Category Qty Progress


Getting Started 4 0%
Navigation and Selection 11 0%
General Excel Tips 10 0%
Data Entry 15 0%
Cell Formatting 13 0%
Formulas 22 0%
Printing 8 0%
Special Features 16 0%
Objects: Shapes and Pictures 16 0%
Data Analysis 11 0%
Charts and Graphs 16 0%
Total: 142

1 Getting started ▲
1) Enter your name in cell A3 of this worksheet
This will help you remember that this workbook is copyrighted and should not be shared.

2) Save a backup copy of this workbook


It is ALWAYS a good idea to save a backup copy of your Excel files.

3) Check the "Completed" box below.


Checking the "Completed" or "Mastered" boxes will help you track your progress.

Tip #1 Completed

2 Basic spreadsheet terminology ▲


Get familiar with the Excel interface (the image below is from Excel 2010):

Quick Access Toolbar File Name Title Bar


Quick Access Toolbar File Name Title Bar

Tabs display different groups of


commands in the Ribbon Ribbon

Name Box
Formula Bar, showing
contents of selected cell

Drag or Fill
Selected Handle
Cell C4

Status Bar
Worksheet Tabs

Term Description
workbook A spreadsheet file like MyBook.xlsx is called a workbook.
worksheet A workbook may contain one or more worksheets, shown as tabs at the bottom of the window.
cell Each worksheet is made up of cells in a rectangular grid. Cells are referenced like in the game Battleship
using the column letter followed by the row number, such as B2, C4, or G7
range A group of cells is called a range. A range is referenced using the upper left and lower right cells separated by
a colon such as C10:E11

Tip #2 Completed

3 Excel Basics ▲
If you are brand new to Excel, the following online videos will help you get started. Otherwise, skip the videos and check
the Completed box.

VIDEO ► Support.Office.Com Video Series: Create your first Excel 2013 workbook

These videos were created for Excel 2013, but most of them still apply to Excel 2010 and 2016

Video Title Time (mm:ss)


Part 1: Start using Excel 04:24
Part 2: Save and print an Excel workbook 01:47 Applies mostly to Excel 2013
Part 3: Add formulas and references 02:51
Part 4: Advanced formulas and references 04:19 This is still just "basic" stuff
Total Time: 13:21 (13 minutes, 21 seconds)

Tip #3 Completed

4 How to provide feedback and get help ▲


Feedback and Updates

One of the reasons we chose to provide a downloadable workbook is so that we can make rapid and more frequent
improvements. You will be able to return to the download page to get the updated versions. We will announce significant
updates via the email notification list.

Your feedback matters!

Please help us improve the workbook by completing the following survey:

LINK ► Take the Survey

NOTE The survey was created using the Survey tool in the Excel Web App. All entries are anonymous, and
completing the survey is optional.

Getting general Excel help

Perhaps the best way to get an answer to a specific Excel question is to search on Google.com. You can also search via
Excel Help (F1).

Tip #4 Completed

Click on the button to the left to start on the Navigation tips, or click on one of the
Next > worksheet tabs below to go to the category of your choice.

About this workbook ▲


Knowing is half the battle

Perhaps the most valuable thing you will gain from this workbook is learning what is possible to do with Excel. You may
not use every tip in this workbook, and you will probably not master every tip right away, but knowing what is possible
really IS half the battle. That is one of the reasons for the many "In Practice" sections that highlight how tips are used in
real-world spreadsheet templates.
Perhaps the most valuable thing you will gain from this workbook is learning what is possible to do with Excel. You may
not use every tip in this workbook, and you will probably not master every tip right away, but knowing what is possible
really IS half the battle. That is one of the reasons for the many "In Practice" sections that highlight how tips are used in
real-world spreadsheet templates.

A worksheet tab for each category of tips

The tips in this workbook are grouped into categories, with a separate worksheet for each category. We recommend
starting with the Navigation category, which lists some tips that will help you navigate this workbook.

Learn tips in numerical order

You CAN skip around and learn tips out of order, but the tips are designed to be learned in numerical order within a
particular category. For example, Tip #10 might use a concept from Tip #5. When a tip requires knowledge of another tip
from a different category, it will reference the other tip.

Understanding keyboard shortcuts

Many commands can be performed using keyboard shortcuts such as CTRL+c for Copy and CTRL+v for Paste. The following
conventions are used to describe a keystroke or series of keystrokes.

A keystroke in which all keys are held down at the same time uses a "+"
Example: CTRL+c

A sequence of keystrokes uses commas to separate them


Example: ALT,h,a,r

Detailed Explanation: Press and release the ALT key, then press and release the H key, then press and
release the A key, then press and release the R key.

A combination of holding a key down while pressing a sequence of keys uses parentheses
Example: SHIFT+(END,DOWN)

Detailed Explanation: Hold down the SHIFT key and while holding it down, press END and then release END
and press DOWN

About the Authors

Jon Wittwer, PhD


Dr. Wittwer is the owner and founder of Vertex42.com. He earned a PhD in mechanical engeering from Brigham Young
University. Then, after working for 3 years at Sandia National Laboratories, he left to work full time on Vertex42.com.
He has created over 300 spreadsheet templates and offers most of them as free downloads, leading to over 40 million
downloads to date. His experience creating and refining spreadsheet templates in response to the questions and
suggestions from thousands of users is what led to the creation of this workbook.
Brent Weight
Brent Weight received a combined Masters Degree in mechanical engineering and MBA from Brigham Young
University. He and Jon are long-time friends and Brent has helped research and create many of the Excel spreadsheets
that Vertex42.com offers. He has spent countless hours developing spreadsheets for business solutions while working
at both large and small companies. He now runs his own companies and does Excel consulting for Vertex42 on the side.

Acknowledgements

Both Laura Cutler and Jim Wittwer spent many hours helping us create this workbook. Laura Cutler, currently finishing up
a degree in Information Systems, was hired by Vertex42 to help develop some of the initial examples and material for the
tips. Jim Wittwer is a professional graphic artist and has been working with Jon for many years both on websites and of
course this workbook.

Feedback from the users of this workbook has been extremely helpful. We would like to thank John Kennedy, Nate Hall,
Scott Brooks, Brian Robertson, Kevin Lehrbass (of MySpreadsheetLab.com), Shannon Zirbel, and Keith Jarvis. We may be
adding more names later as we get more feedback.

While the bulk of the material in this workbook was generated from either our own brains or by referencing the help
content on microsoft.com, we must acknowledge those who have been most instrumental in filling our brains with Excel
stuff over the years. Much of Jon Wittwer's earliest Excel training came from reading books by John Walkenbach
(spreadsheetpage.com) and using Excel in school (thank you to the professors who gave those assignments). We have also
learned a lot from Excel gurus John Peltier (peltiertech.com), Michael Alexander (datapigtechnologies.com), Bill Jelen
(mrexcel.com), Chip Pearson (cpearson.com), Debra Dalgleish (contextures.com) and numerous other Excel MVPs. For
example, Jon first learned about dynamic named arrays from David Hawley's website, ozgrid.com. And of course, thank
you to Google for indexing all of the various Excel forums, where you can find answers to almost any Excel question ever
asked.

Last, but not least, we must acknowledge the thousands of people who have emailed us over the years asking Excel
questions and suggesting ways to improve a template. We are especially grateful to the people who are able to criticize
our work tactfully and who understand that real people spent real time trying to create stuff for them to use. Thank you!

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
Vertex42® is a registered trademark of Vertex42 LLC. Microsoft® and Microsoft Excel® are registered trademarks of Microsoft Corporation. Vertex42.com is not associated with
Microsoft.
Navigation and Selection < Start Next >

Tips in this category Progress: 0%

Mastered Level
1 Move to the top and bottom of a worksheet - 0
2 Move to the next or previous worksheet - 0
3 Select cells and ranges quickly using the keyboard - 0
4 Use keyboard shortcuts for editing text and formulas - 0
5 Find or replace text in a worksheet - 0
6 Select the entire worksheet or active range - 0
7 Quickly select the current Row or Column - 0
8 Quickly go to and select a cell or Named Range - 0
9 Use the Go To Special command for fancy selection - 0
10 Select non-contiguous ranges - 0
11 Select multiple worksheets at a time - 0

1 Move to the top and bottom of a worksheet

In this workbook, whenever you want to return to the top of a worksheet, use the keyboard shortcut,
CTRL+HOME. Or, click on the up arrow (▲) within the tip title. Press CTRL+END to select the last cell in the
worksheet (bottom right).

PRACTICE

A) Click on the button to the right to go to the top of this worksheet. Then return here.

B) Press CTRL+HOME to go to the top of this worksheet. Then return here.

C) Press CTRL+END to select the last cell in the worksheet. Then return here.

TIP When editing text or a formula in a cell, CTRL+HOME moves to the beginning of the cell and
CTRL+END moves to the very end.

D) Double-click inside the text box below, and press CTRL+HOME and CTRL+END.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis euismod ultricies.
Donec quis libero eget lacus aliquam semper.
E) Check the "Mastered" checkbox when you are comfortable using these shortcuts.

Tip #1 ✘ Mastered

2 Move to the next or previous worksheet

Use CTRL+PAGEDOWN to move to the next worksheet tab and CTRL+PAGEUP to move to the previous worksheet. This
shortcut works in many other software programs that use tabs, including browsers.

Hold down CTRL and press PAGEDOWN or PAGEUP repeatedly to quickly navigate through multiple tabs.

TIP When using CTRL shortcuts with End, Home, PageUp, PageDown, and Arrow keys, use your
left hand to press CTRL and your right hand to press the other key.

PRACTICE

A) Navigate to the next worksheet and then return back to this worksheet (Press CTRL+PAGEDOWN and
then CTRL+PAGEUP).

B) Navigate to a different category of tips by clicking on one of the worksheets tabs. Then return here.

C) Click on the the Mastered checkbox in this tip's title. Continue to check the Mastered checkboxes to
record your progress.

Tip #2 Mastered

3 Select cells and ranges quickly using the keyboard

• Holding the CTRL key while pressing an ARROW key allows you to jump to the edges of ranges.
• Holding the SHIFT key while pressing an ARROW key allows you to select cells, rows, and columns.
• You can use CTRL and SHIFT together to jump to edges of ranges and select at the same time.
• The HOME, END, PAGEUP, and PAGEDOWN keys can also be combined with SHIFT to select ranges.

HELP START: Understanding keyboard shortcuts


PRACTICE

A) Navigate around the square using 1 1 1


CTRL+ARROW 4
B) Select all the cells with a 2 starting at the top 4
SHIFT+CTRL+DOWN or SHIFT+(END,DOWN) 4
C) Select all the cells in the square using 4
CTRL+SHIFT,RIGHT,DOWN 4
D) Select all cells with a 1 starting on the left 4
SHIFT+(RIGHT,RIGHT) 4
SHIFT+(CTRL+RIGHT,LEFT) 3 3 3

Tip #3 Mastered

REFERENCES

VIDEO ► Excel Help: Keyboard shortcuts for moving around workbooks

VIDEO ► Excel Help: Keyboard shortcuts for selecting

4 Use keyboard shortcuts for editing text and formulas

Use CTRL+LeftArrow and CTRL+RightArrow when editing text to jump between words and CTRL+DownArrow and
CTRL+UpArrow to jump between lines. Add the SHIFT button (CTRL+SHIFT+Arrow) to highlight text as you go. These
keyboard shortcut works in almost all software programs.

PRACTICE

Double-click inside the paragraph of text below and try to remove all the red "blah" words from the text without using
the mouse.

Lorem ipsum dolor blah sit amet, consectetur adipiscing elit. Nulla blah venenatis euismod
ultricies. Donec quis libero eget lacus aliquam semper. Cras interdum, mauris volutpat tempor
blah gravida, sapien nunc mollis elit, sed eleifend blah quam libero pharetra mauris. Aliquam
congue lacus ac diam feugiat pulvinar.

Tip #4 Mastered
5 Find or replace text in a worksheet

Use the CTRL+f shortcut to open the Find and Replace dialog box. This is a shortcut that works in almost any software
application. In Excel, you can search for specific values as well as cells with a specific format. If you have a range
selected, you can search just that range.

Click on Options to see advanced options including:


Within: Select workbook to search the entire workbook
Search: You can search across (by rows) or down (by columns)
Look in: Focus your search on values (results), formulas or comments.
Match entire cell contents: Require an exact match of the entire cell value or formula

PRACTICE

1) Find the hidden phrase "Vertex42 rocks" on this


worksheet.

2) Find the MIN() formulas to the right A B


Select A1 to C8. Press CTRL-f. Enter "min" (without the 1
quotes). Set Look in to Formulas. Uncheck Match entire cell
contents. Press Find Next. 2 1 2
3 2 4
4 3 6
3) Find and Replace all 4s in the table to the right with the 5 4 8
number 5.
6 1 2
Select A1 to C8. Press CTRL-f. Select Replace. Enter 4 in the 7
Find what box. Enter 5 in the Replace with box. Set Look in to
Formulas. Uncheck Match entire cell contents. Press Replace 8
All.
Vertex42 rocks

CAUTION Only use Replace All if you are sure that you won't be changing the wrong text. Press Next
and Replace to view and change each instance one at a time.

4) Find cells with specific formatting


Select A1 to C8. Press CTRL-f. Leave the Find what field blank.
Click on the arrow on the Format button and select Choose
format from cell. Select one of the cells with a red number.
Press Find All.

Tip #5 Mastered
REFERENCES

ARTICLE Excel Help: Find or replace text and numbers in a worksheet

ARTICLE Excel Help: Find and select cells that meet specific conditions

ARTICLE Excel Help: Find merged cells

6 Select the entire worksheet or active range

To select the entire worksheet, click on the box shown in the image. You can also use
the CTRL+a shortcut. CTRL+a is a general shortcut for Select All. Depending on what
cell(s) you have selected, you can press CTRL+a once or twice to select the entire
worksheet.

PRACTICE

A) Select the entire worksheet using the mouse. Then try again using CTRL+a.

TIP CTRL+a sometimes does the same thing as CTRL+SHIFT+* (select cells
in active range).

B) Select a single cell in the range of data to the right and press CTRL+a. 62.3
Press CTRL+a again to select the entire worksheet. 43.4
42.3

Tip #6 Mastered

REFERENCES

ARTICLE Excel Help: Select all cells on a worksheet

HINT Within a category, the tips get more advanced as you go down the page.

If you are just getting started, you might want to try some of the first tips in other categories.
You can always come back to this category later. Next >
If you are just getting started, you might want to try some of the first tips in other categories.
You can always come back to this category later. Next >

7 Quickly select the current Row or Column

Use SHIFT+Space to select the current Row and CTRL+Space to select the current Column. Remember which is which by
noting that both "Ctrl" and "Column" start with the letter "C". This can also be a useful way to find out if any cells in the
current row or column are part of merged ranges.

PRACTICE

A) Select an entire column by selecting a cell in column A and then pressing CTRL+Space.
B) Select the cell to the right and press SHIFT+Space to select the entire row.

TIP
Excel selects the columns or rows for all the currently selected cells. So if you
highlight two different rows and press SHIFT+Space, both rows will be selected.
Give it a try by selecting the cells to the right with the 1 and 2 and pressing
SHIFT+Space.

HINT If a row or column contains a merged range, then the selection is expanded to
include the merged range.

C) Select the cell to the right and press CTRL+Space. Why is more than one column selected?
Hint: Because of merged cells somewhere above or below it.
D) Select the cell to the right and press SHIFT+Space. Why is more than one row selected? Hint:
Because of these merged cells.

Tip #7 Mastered

REFERENCES

ARTICLE Excel Help: Select cells or chart items by using shortcut keys

8 Quickly go to and select a cell or Named Range

Navigate to and select a Named Range by pressing CTRL+g to list the named ranges. Click on the name you want to
select and press OK. This is also useful for selecting the current Print Area.
PRACTICE

1) Go to the cell named tip_nav8

HINT Alternatively, navigate to a named range by selecting the


name from the Name Box dropdown to the left of the
formula bar.

2) Go to the range named tip_nav9

TIP As you are using this workbook, if you use a link to jump to another tip and want to return to where you
were, press CTRL+g and then Enter. Try this by clicking on the related tips below.

SEE ALSO Special Features Tip #1: Name cells and ranges

Special Features Tip #2: Create bookmarks using named cells

Printing Tip #1: Control what area of the worksheet is printed

Tip #8 Mastered

REFERENCES

ARTICLE Excel Help: Find named ranges using Ctrl+g


9 Use the Go To Special command for fancy selection
Advanced Topic

The Go To Special command (CTRL+g > Special) allows you to do things such as select all cells containing comments,
formulas, conditional formatting, data validation, etc. It can also be used to select all objects (like autoshapes).

PRACTICE

1) Select the entire table to the right 1 1


2 7
2) Find the one cell that contains a formula 3 3
CTRL+g > Special > Formulas > OK 4 4
5 6
3) Find cells within a row that do not match 6 5
CTRL+g > Special > Row Differences > OK 7 7
Change the Fill color of these cells to yellow 8 3
9 9

Tip #9 Mastered
Mastered

REFERENCES

ARTICLE Excel Help: Find cells that have conditional formats

ARTICLE Excel Help: Find cells that contain formulas

10 Select non-contiguous ranges


Advanced Topic

Hold down CTRL to select Non-contiguous ranges (ranges that are not connected). If you are using only the keyboard,
press SHIFT+F8 after selecting a region to navigate to another range without canceling the current selection.

TIP Try combining this tip with Data Entry Tip #3 - Use Ctrl+Enter to fill a range of cells

PRACTICE

A) Highlight just the cells with a 1 by holding the CTRL key A B


while selecting cells with the mouse.
2
1 2
B) Select the cells with a 2 using only the keyboard. 1 2
1) Select a cell with a 2 1
2) Hold down the SHIFT key and select with the arrows
3) Press SHIFT+F8 2 1
4) Arrow to the next range of cells. 2 1
5) Repeat steps 2-4 as needed 1

NOTE Perhaps this is a bug, but after selecting a range and pressing SHIFT+F8, you cannot select a
single cell and then press SHIFT+F8 to continue expanding the selection.

Tip #10 Mastered

REFERENCES

ARTICLE Excel Help: Select cells, ranges, rows, or columns on a worksheet

11 Select multiple worksheets at a time


Advanced Topic
One of the most common uses for this tip is for making changes to the Page Setup properties (footers, margins, scaling,
etc.) on multiple worksheets at the same time. Select multiple worksheets by holding CTRL or SHIFT as you click on
other worksheet tabs. Changes you make on one sheet will be mirrored on all selected sheets including formatting,
values, formulas and even Page Setup properties. To unselect a sheet, hold CTRL and click the worksheet tab again.
Right-click on a tab to ungroup all selected sheets.

CAUTION Remember to ungroup multiple sheets when finished. If not, your changes will continue to be mirrored
on all selected sheets and you will end up with a big mess.

TIP Right click on a tab to Select All Sheets or


Ungroup (unselect) Sheets

PRACTICE

A) Spreadsheet-based calendars commonly use multiple worksheets, where each month is on a separate worksheet.
Download a calendar template from Vertex42.com to experiment with making changes to multiple worksheets at the
same time, such as changing the format (font and color) of the month name.

TEMPLATE Calendar Template for Excel

B) If you want to take the risk of really messing things up in this workbook, try using this tip to change the font color of
the main header (cell A1) of all the tip categories in this workbook at the same time.

CAUTION Do not forget to ungroup the worksheets when you are done.

Tip #11 Mastered

REFERENCES

ARTICLE Excel Help: Group worksheets

ARTICLE Excel Help: Select one or multiple worksheets

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
Next >



orksheet. This


2
2
2
2
2
2
2
2
2


rrow and
u go. These

without using

any software
a range

6
8
10
12
6

Vertex42 rocks

1.4
38
45.7

Next >
Next >


hich is which by
any cells in the

1
2


ou want to
to where you

comments,
apes).

he keyboard,
on.

1
1
1
2
2
2


argins, scaling,
ou click on
ormatting,
tab again.

o be mirrored

worksheet.
sheets at the

e font color of
General Tips < Start < Prev Next >

Tips in this category Progress: 0%

Mastered Level
1 Use Excel Help (F1) and support.office.com - 0
2 Know the essential keyboard shortcuts - 0
3 Use ALT key shortcuts - 0
4 Show or hide Gridlines - 0
5 Use Comments to annotate cells - 0
6 Copy and paste using Paste Special - 0
7 Change the number of sheets in a new workbook - 0
8 Status bar shows Average, Sum, and Count - 0
9 Force a recalculation using F9 - 0
10 Get rid of the green triangles (error checking) - 0

1 Use Excel Help (F1) and support.office.com ▲


Not surprisingly, there is a wealth of Excel help content on support.office.com. We will be providing reference links to
some of that content within this workbook. Some of the online help information is available via Excel Help by pressing
F1. If you have not already done so, view the Getting Started with Excel articles and videos that are available by
pressing F1.

TIP If you like videos, try searching on support.office.com and include the word "video" in your
search phrase. For example: "video keyboard shortcuts"

Tip #1 ✘ Mastered

REFERENCES

LINK Excel Help on office.microsoft.com

2 Know the essential keyboard shortcuts ▲


There are some essential keyboard shortcuts that everybody should know and use. These include CTRL+z (Undo),
CTRL+s (Save), CTRL+c (Copy), CTRL+x (Cut), and CTRL+v (Paste). These shortcuts are common to most other software
as well, so knowing these will improve your productivity with more than just Excel.

Shortcut Description
CTRL+z Undo
CTRL+y Redo (Undoes an Undo)
CTRL+s Save
CTRL+c Copy
CTRL+x Cut
CTRL+v Paste
CTRL+w Close the window or file
ALT+F4 Close the entire application
ESC Cancel (e.g. cancel editing a cell)

TIP When learning new keyboards, it helps to print out a summary of the various shortcuts. You
can download a free printable keyboard shortcut sheet from the resource page listed below.

RESOURCE Vertex42.com: Printable Keyboard Shortcut Sheet

HINT You will be learning many more keyboard shortcuts throughout this workbook.

Tip #2 Mastered

REFERENCES

VIDEO ► Excel Help: Basic keyboard shortcuts

3 Use ALT key shortcuts ▲


You can use keyboard shortcuts to access all of the commands in the ribbon. Just press ALT and the letters for each
command will appear on the ribbon as key tips. Typing a letter will do exactly the same thing as clicking the button with
your mouse. If you see two letters in the key tip, like [AR], type "A" and then "R".

The access key tips show up next to the commands after pressing ALT, as shown in the image below.

Microsoft provides a thorough series of videos demonstrating the use of access key shortcuts. See the link below to
learn more about access keys for the ribbon, dialog boxes, and drop-down boxes.

VIDEO ► Excel 2010 keyboard shortcuts: ALT key shortcuts


TIP With access keys and the other shortcuts you will learn in this workbook, you can do almost
anything in Excel without using a mouse. One way to practice using keyboard shortcuts is to
put your mouse far from your keyboard (or switch it to a left-handed mouse if you are right-
handed).

HINT Not all keyboard shortcuts result in greater productivity, but if you find yourself doing
repetitive tasks, look for a way to optimize your work using shortcuts.

PRACTICE

Select the text to the right and try a few access key (ALT) shortcuts.

1) Align right: ALT,H,A,R Align this text


2) Align left: ALT,H,A,L
3) Align center: ALT,H,A,C

Tip #3 Mastered

REFERENCES

ARTICLE Excel Help: Use the keyboard to work with Ribbon programs

4 Show or hide Gridlines ▲


You may have noticed that these worksheets do not display
the row and column gridlines. To toggle gridlines on or off, go
to the View tab and check/uncheck the Gridlines box.

Try turning ON the gridlines right now. Would you rather be


using this workbook with the gridlines ON or OFF?

IN PRACTICE

HINT By tradition, input fields have borders. So, for financial models and other templates, turning
off the grid and adding borders to input cells (via cell formatting) can help make it easier to
identify cells that are meant to be edited.
Look at the screenshot of the Loan Amortization Schedule template below. Which one would you rather
use? Why?

TEMPLATE Loan Amortization Schedule: Gridlines are turned off and inputs use cell borders.

Tip #4 Mastered

REFERENCES

ARTICLE Excel Help: Show or hide gridlines on a worksheet

5 Use Comments to annotate cells ▲


A cell comment is a note that pops up when you hover your mouse over a cell with a Example
little red triangle in the upper-right corner. Comments are useful for providing
contextual help, adding notes to specific values, and making annotations when
collaborating or sharing files with other users. Insert, Edit, Delete, or Show/Hide Example Comment:
comments by right-clicking on a cell and selecting the appropriate action.
To hide this comment, right-
click on the cell and select
Show/Hide Comments.

TIP Use the shortcut SHIFT+F2 to insert or edit a comment.

TIP A comment can be toggled on and off by right-clicking on a


cell and selecting Show/Hide comments

IN PRACTICE

The following templates show examples of how you can use comments to annotate your worksheets.
TEMPLATE Personal Budget Spreadsheet: You can use comments to annotate specific budget values

TEMPLATE Project Tracking Template: Uses comments to track communication

TEMPLATE Home Mortgage Calculator: Uses comments to provide contextual help

Tip #5 Mastered

REFERENCES

ARTICLE Excel Help: Annotate a worksheet by using comments


6 Copy and paste using Paste Special ▲
The Paste Special feature allows you to copy a cell and paste just the
values, formulas, formats, comments, data validation, plus other options.

With the Mouse: Go to Home > Paste and click on the down arrow. This
opens a menu showing common Paste Special options. Advanced options
can be found by clicking on Paste Special. You can also go directly to the
Paste Special by right-clicking where you want to paste and selecting Paste
Special.

Keyboard Method: After copying a cell or range, press CTRL+ALT+v to


open the Paste Special dialog box. Pasting values without formatting is
one of the most common reasons for using Paste Special. You may want
to learn the keyboard shortcut for pasting just values: ALT,h,v,v.

VIDEO ► Excel Help: Paste with live preview (demonstrates various paste options)

PRACTICE

1) Copy the menu on the right. Day Special


Mon Meringue
Tues Turnover
Wed Waffle

2) Use Paste Special to paste Values. (here)


(hint: Go to Home > Paste > Paste Values > Values)

3) Use Paste Special to paste Formats. (here)


(hint: Go to Home > Paste > Other Paste Options > Formatting
or press CTRL+ALT+v and select Formats)

4) Use Paste Special to paste All except borders. (here)


(hint: Go to Home > Paste > Paste Special > Formats)
5) Use Paste Special to Transpose. (here)
(hint: Press CTRL+ALT+v and select Transpose)

TIP Excel gives you alternative paste options right after you do a normal paste
(CTRL+v). Look for the little format box on the lower right corner of the pasted
range. Click on it (or press CTRL) and select the Paste Option you need. This is
great if you forget to do a Paste Special.

Tip #6 Mastered

REFERENCES

ARTICLE Excel Help: Copy specific cell contents or attributes in a worksheet

If you are just getting started, you might want to try some of the first tips in other categories.
You can always come back to this category later. Next >

7 Change the number of sheets in a new workbook ▲


By default, a new workbook contains 3 worksheets, but having a bunch of blank worksheets in every file may be
annoying. To change the default number of sheets, go to File > Options > General and change the value for "Include
this many sheets".

You can always add new worksheets when you need them by clicking on
the "Insert Worksheet" button to the right of the tabs, or by right-clicking
on a worksheet tab and selecting "Insert..."
Tip #7 Mastered

REFERENCES

ARTICLE Excel Help: Insert or delete a worksheet

8 Status bar shows Average, Sum, and Count ▲


When you have a range of cells selected, the Status Bar will show the Average, Sum, and Count. You can choose to
display the Minimum and Maximum values by right-clicking on the status bar and enabling those options.

PRACTICE

Select the numbers to the right, then look at the status bar. If 18 64 56 49 71
you don't see the Min: and Max: values, right-click on the
status bar and enable those options. 21 22 94 73 6
25 43 15 13 51
61 100 19 52 64

Tip #8 Mastered

REFERENCES

VIDEO ► Excel Help: Let the Excel status bar do the work
9 Force a recalculation using F9 ▲
When you have a large worksheet that takes a long time to recalculate,
you can change the Calculation Options via the Formulas tab to Manual
and then press F9 to manually recalculate. Pressing F9 will also cause
volatile functions to recalculate.

Volatile functions like NOW(), TODAY(), RAND(), RANDBETWEEN(),


OFFSET(), INDIRECT(), and CELL() will update whenever the worksheet
recalculates.

PRACTICE

A) Press F9 repeatedly to recalculate the following random 1 =RANDBETWEEN(1,25)


numbers 0.780045 =RAND()

TIP You can perform quick calculations within the formula bar by pressing
F9 prior to pressing Enter, so that the resulting value is entered rather
than the formula.

B) In the cell to the right, enter =10+20+30 and press F9 before


leaving the cell.

IN PRACTICE

TEMPLATE Savings Calculator: Press F9 to see the effect of random interest rates

ARTICLE Vertex42.com: Monte Carlo Simulation in Excel

Tip #9 Mastered

REFERENCES

ARTICLE Excel Help: Change formula recalculation iteration or precision

10 Get rid of the green triangles (error checking) ▲


Are you tired of seeing the little green triangles in Excel? They let you
know your formula might have an error. This error checking feature can
be very helpful at times, but is often just annoying, such as the warning
that a number is stored as text. You can turn off specific rules/warnings
via File > Options > Formulas. In the same tab, you can turn off error
checking altogether with the "Enable background error checking" check
box.

8 Example: Green triangle warning that a number


is stored as text.

PRACTICE

Use the example to the right to experiment with turning on/off the error checking options.

1) In cell A4 change the "+1" in the formula to "+2" A B


Result: A green triangle should appear in the cell. 1 Day Hrs
2) In cell B5 type '8 (apostrophe 8) 2 Tue 4/2
Result: A green triangle should appear in the cell. 3 Wed 4/3 8.00
4 Thu 4/4
3) Open File > Options > Formulas. Turn off error checking altogether by 5 Fri 4/5
unchecking Enable background error checking. Click OK to be sure the Sat 4/6
green triangles are gone. 6
7 Mon 4/8 8
8 Tue 4/9
4) Back in the dialog box, check Enable background error checking and
uncheck Formulas inconsistent with other formulas in the region. Click
OK to see that one of your green triangles is gone

Tip #10 Mastered

REFERENCES

ARTICLE Excel Help: Use error checking to detect errors in formulas

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
Data Entry Tips < Start < Prev Next >

Tips in this category Progress: 0%

Mastered Level
1 Use F2 to edit the currently selected cell - 0
2 Insert a Line Break inside a cell - 0
3 Use Ctrl+Enter to fill a range of cells - 0
4 Use CTRL+d or CTRL+r to copy adjacent cells - 0
5 Drag the fill handle to quickly fill ranges - 0
6 Fast-Fill by double-clicking the fill handle - 0
7 Understand how Date and Time values are stored - 0
8 Quickly enter the current date or time - 0
9 Enter numbers as fractions - 0
10 Use Freeze Panes and Split screen when scrolling - 0
11 Add and Remove Hyperlinks - 0
12 Speed-key data into tables - 0
13 Enter numbers as text - 0
14 Customize the AutoCorrect feature - 0
15 Create shortcuts for entering symbols as you type - 0

1 Use F2 to edit the currently selected cell ▲


Pressing F2 when you have a cell selected places the cursor at the very end of the text or formula. It is like double-
clicking on a cell and then pressing CTRL+END.

F2 lets you keep your hands on the keyboard and can speed things up when used in combination with other keyboard
shortcuts.

PRACTICE

A) Select all the text in a cell by pressing F2, CTRL+SHIFT+HOME Select this text

B) Select the cell, press F2, then add "+475" to the formula 810

Tip #1 ✘ Mastered

2 Insert a Line Break inside a cell ▲


Instead of using Wrap Text and letting Excel decide where to break up text, you can manually add a Line Break within a
cell by pressing ALT+ENTER while editing the text.

NOTE IMPORTANT: Wrap Text must be turned on when using Line Breaks
within a cell.
PRACTICE

In this merged range of cells, I have added a Line Break

by pressing ALT+ENTER twice. Try pressing ALT+ENTER when editing this cell.

TIP ADVANCED: You can enter a Line Break with a formula using the & operator and the
CHAR(10) function. Double-click on example below to see the formula in action.

This example adds line breaks

using a formula.

Tip #2 Mastered
3 Use Ctrl+Enter to fill a range of cells ▲
Pressing CTRL+Enter will fill each cell in the selected range with the same value or formula of the active cell.

PRACTICE

A) Fill in Column A with the number 42 A B C


Select A1 to A8, Enter 42, CTRL+Enter 1 23
2 42
B) Fill Column C with a formula that adds columns A & B 3 35
Select C1 to C8, Press "=", Press Left Arrow 4 62
Enter "+", Press Left Arrow twice 5 73
Press CTRL+Enter 6 12
7 24
8 32

Tip #3 Mastered

4 Use CTRL+d or CTRL+r to copy adjacent cells ▲


• Pressing CTRL+d will copy the cell(s) immediately ABOVE the selected cell(s)
• Pressing CTRL+r will copy the cell(s) immediately to the LEFT of the selected cell(s)
• Formatting will be copied using both methods.

HINT Using CTRL+d and CTRL+r can often be faster than using Copy (CTRL+c) and Paste
(CTRL+v)

PRACTICE

A) Copy column A to column B A B C


Select B1:B5 then press CTRL+r 1 23 23
2 24
B) Copy the formula in C1 to C2 3 25
Select C2 then press CTRL+d 4 26
5 27

TIP The shortcut CTRL+' (CTRL+Apostrophe) acts like CTRL+d except that only the
value or formula is copied, and the cursor is placed at the end of the value or
formula, ready for editing.

Tip #4 Mastered
5 Drag the fill handle to quickly fill ranges ▲
The fill handle is the little square in the lower right corner of the selected range. The
results depend on what was initially selected and what other keys are pressed.

Action Description
Copy Select a cell and drag the fill handle
Increment Hold down CTRL as you drag the fill handle to increment by 1 (e.g. 4, 5, 6, 7, …)
Extend Select two cells and drag the fill handle to extend a pattern (e.g. 10, 20, 30, 40, …)
Repeat Select two or more cells and drag the fill handle to repeat a pattern (e.g. 1, 3, 2, 1, 3, 2, …)

TIP Drag using the right mouse button for additional fill options including fill formating
and geometric series.

PRACTICE

Use the fill handle for copying cells A B C


A) Select A1. Ctrl+drag across the row. 1 1/1/2013
B) Select A2. Drag across the row. 2 12
3
Use the fill handle to extend and repeat patterns 4 1 2 Sun
C) Select A4 and A5. Drag down to A10. 5 3 4
D) Select B4 and B5. CTRL+drag down to A10. 6
7
Excel recognizes patterns such as days (Mon, Tue, …) and 8
months (Jan, Feb, …)
9
E) Select C4. Drag down to C10. 10

Decreasing the size of a selected range using the fill handle


clears cell contents
F) Complete step C. Select A4:A10.
Drag the fill handle to decrease the range to A4:A7

Tip #5 Mastered

6 Fast-Fill by double-clicking the fill handle ▲


Double-click the Fill Handle of a selected cell to fill (copy) down the same number of rows as the adjacent column(s),
stopping at the first blank cell. This is equivalent to dragging the fill handle.

PRACTICE

Follow the steps below, paying attention to the results. A B C


A) Select C1 and double click the fill handle. 1 John Doe Doe, John
Result: copies down to C6 2 Jane Doe
B) Reset by pressing CTRL+z (UNDO) 3 Bob
C) Delete the row numbers. Repeat step A. 4 Pistol Pete
Result: copies down to C4 5
6 The Joker
Tip #6 Mastered

7 Understand how Date and Time values are stored ▲


Dates are stored as the number of days since Jan 0, 1900. Times are stored as a decimal fraction of a day, so 0.5 would
be 12:00 PM. When you enter a date, Excel will attempt to autoformat the cell to display the date, unless the cell has
already been formatted.

CAUTION IMPORTANT: When entering a time, leave a space before entering PM or AM (e.g.
6:30 PM), or just enter as military time (18:30).

PRACTICE

Numeric Value
A) Enter a date to see its numeric value Date: 2/6/2013 41311

B) Enter a time to see its numeric value Time: 12:19 PM 0.5131944

C) Combined date/time value Now: 9/5/2022 7:27 44809.311

TIP Quickly change a date or time to the General number format by


pressing CTRL+SHIFT+~

TIP Time values consist of hours, minutes and seconds (hh:mm:ss).


Minutes and seconds default to 0 if left off and AM/PM are included.

SEE ALSO Formula Tip #11: Common Date formulas

Tip #7 Mastered

8 Quickly enter the current date or time ▲


Press CTRL+; (CTRL + Semicolon) to quickly enter the current date in a cell. Press CTRL+: (CTRL + SHIFT + Semicolon) to
enter the current time. Unless the cell is already formatted, the date or time will be auto-formatted based on default
settings.

PRACTICE

A) Press CTRL+; in the Date field Date:

B) Press CTRL+: in the Time field Time:


Tip #8 Mastered

If you are just getting started, you might want to try some of the first tips in other categories.
You can always come back to this category later. Next >

9 Enter numbers as fractions ▲


You can enter fractions such as 24 1/2 and Excel will convert the value to a number and format the cell using the
Fraction format. If you want to enter a fraction such as 3/4 and avoid having Excel convert the value to a date, enter it
as "0 3/4". If the cell is already formatted as a fraction, you can just enter "3/4". To quickly change the format to the
General number format, press CTRL+~

PRACTICE

A) Enter "24 1/2"

B) Enter "1/2"

C) Enter "0 1/2"

D) Enter "5 24/76"

Tip #9 Mastered

10 Use Freeze Panes and Split screen when scrolling ▲


Use Freeze Panes (via the View ribbon) and Split screen so that you can keep certain rows or columns in view as you are
scroll through another part of the worksheet.

Watch this video on support.office.com


Excel Help: Freeze or unfreeze rows and columns

Tip #10 Mastered


11 Add and Remove Hyperlinks ▲
Hyperlinks can be added to any cell. They can also be added to an object to turn an autoshape into a navigation button.
They can point to URLs, other cells, named ranges, and even emails. You can insert a hyperlink manually by pressing
CTRL+k, going to Insert > Hyperlink, or by letting Excel convert a URL to a hyperlink automatically.

PRACTICE

A) Let Excel convert a URL to a hyperlink. Enter a URL such as Enter link here
www.vertex42.com then press Enter.

HINT Press CTRL+z after Excel converts a URL to a hyperlink to UNDO the autoformat
action.

TIP To permanently stop Excel from autoformatting hyperlinks, go to File > Excel
Options > Proofing > AutoCorrect Options > AutoFormat As You Type, and
uncheck the related option.

B) Use the Insert Hyperlink dialog box to add a hyperlink. Example Link to Vertex42
- The Display Text and ScreenTip can be customized
- Try creating a link to your favorite website Create your own link here

CAUTION It is easy to forget about custom ScreenTip text when you are copying and pasting
hyperlinks. Use screentip text mainly for navigation buttons.

HINT Press CTRL+k to jump to the Insert Hyperlink dialog box

C) Turn a picture or autoshape into a navigation button.


- Try adding a hyperlink to the up arrow that will take you to
cell A1 of this worksheet.
- Hint: Select "Place in This Document" in the Insert Hyperlink
dialog box.

D) Create a link to a location in the workbook


- The Up arrows to the right of each tip title are just hyperlinks that point to cell A1 ▲
- The display text of the hyperlink is a special arrow symbol
- Select the cell with the arrow to the right and press CTRL+k to see where
it points

HINT It can be tricky to select a cell or object containing a hyperlink without


navigating to the link location. Right-click on the cell or object, or use
the arrow keys to move to the cell.

SEE ALSO Special Features Tip #2: Create bookmarks using named cells
E) REMOVE a hyperlink
- Remove one of the hyperlinks above by right-clicking on the cell or object and choosing the correct option.

HINT Right click on a cell and press ESC to select the cell without activating the
hyperlink.

NOTE When removing a hyperlink from a cell, Excel automatically converts the cell to
the Normal style. We don't know a way around that.

Tip #11 Mastered


12 Speed-key data into tables ▲
By default, the ENTER key finalizes the changes to the active cell and then selects the cell BELOW the active cell. The
TAB key finalizes the changes and then selects the cell to the RIGHT of the active cell.

To get the full benefit of using a "10 key" (the number pad on your keyboard) for data entry, select the range of cells
you want to edit before starting to enter values. When you reach the end of the selected region, the cursor will
automatically move to the next row or column allowing you to forget the mouse and just key in data.

HINT You can modify the behavior of the enter key so that it moves in another direction. Just go to Options >
Advanced > Editing > After Pressing Enter Move Cursor and select the desired direction. This is handy if
you are using a "10 key" (the number pad on your keyboard) for data entry and need the enter key to
behave differently.

PRACTICE

A) Select cells A1 to C8. A B C


1
B) Key in data, pressing Enter and/or Tab as you go. 2
Notice what happens when you get to the end of
the column or row. 3
4
5
C) Adjust your enter key behavior (see the hint 6
above) and try it again.
7
8

Tip #12 Mastered


13 Enter numbers as text ▲
When you enter a number into a cell, Excel will format the value as a number unless you tell Excel that you specifically
want the value to be stored and displayed as text. There are several ways to do this. One way is to enter an apostrophe
before the value like '42.14. Another way is to change the cell format to Text. A third way is to use the TEXT() function.

PRACTICE

1) Enter an apostrophe (') before numbers to enter them as text.

Enter 42.12 in the cell to the right


Enter '42.12 in the cell to the right

NOTE Unless the cell is otherwise formatted, Excel aligns text to


the left and numbers to the right.

TIP Use the apostrophe if you want to enter text -32 days to deliver
that might be interpretted as a fomula, such as =3+4
text starting with "-" or "+" or "="
+1 templates on Vertex42.com

2) Change the cell format to Text


To do this, select the Text format from the Number format drop-down box in the Home tab, or by going to the Format
Cells dialog box (CTRL+1) and selecting Text from the Number tab.
=ISNUMBER()
A) Change the cell to the right to Text format 23 1
B) Enter the number "23" into the cell
C) Try entering "23 kg" into the cell

NOTE If the value is a number and only formatted as text, some functions like
ISNUMBER() and SUM() will still interpret the value as a number.

CAUTION It is not obvious from looking at a spreadsheet if a number is formatted


as a number or text. You have to select the cell and then look at the
Home tab to see the current format.

3) Use the TEXT() function.


This function formats a value as text based on a text format that you specify. It is usually used as part of a more
complex formula. See the Formulas worksheets for examples that use the TEXT() function.

Simple example: 23.000 =TEXT(23,"0.000")

Tip #13 Mastered

14 Customize the AutoCorrect feature ▲


If Excel annoys you when it uses AutoCorrect to correct text you do not want corrected (such as correcting TWo INitial
CApitals to Two Initial Capitals), you can turn off default AutoCorrect options by going to File > Options > Proofing >
AutoCorrect Options. You can also add Exceptions.

TIP To UNDO an auto-correction as you are typing or entering text, press CTRL+z
immediately after Excel does the auto-correction.

PRACTICE

1) Experiment with some of the AutoCorrect options

Correct TWo INitial CApitals: Enter "MPa" or "IDs"


(Excel already knows to not correct "KBs", "MBs", and "GBs")

Capitalize names of days: Enter "monday"

Replace text as you type: Enter "(c)" or "(r)"

Capitalize the first letter of sentences: Enter "I did. you did."

2) Add Exceptions

Add "MPa" and "IDs" as exceptions in the "INitial CAps" tab after going to File > Options > Proofing >
AutoCorrect Options.
Tip #14 Mastered

15 Create shortcuts for entering symbols as you type ▲


Advanced Topic

The AutoCorrect feature already converts (c) to © and (tm) to ™ as you type. There are many other symbols that are
available as ASCII characters. You can create shortcuts for these by adding custom entries under "Replace text as you
type" via File > Options > Proofing > AutoCorrect Options.

TIP When defining new AutoCorrect entries, use a text sequence that you
would probably never use for anything else and one that is also
intuitive, such as (<<) for the « character.

HINT The Math AutoCorrect entries only work when using the Equation
Editor (Insert → Equation), but there are a lot of good examples you
might want to use.

NOTE AutoCorrect stops working if a cell or merged range of cells contains


255 characters or more.

EXAMPLES

Below are some examples for AutoCorrect entries you could add under "Replace text as you type."

Replace: With:
(deg) or (degree) °
(+/-) ±
(<=) ≤
(>=) ≥
(<>) or (notequal) ≠
(~~) or (approx) ≈
(<-) ←
(->) →
(<->) ↔
(<<) «
(>>) »
(micro) µ
(delta) ∆
(dot) ·
(bullet) or (bull) •
(check) or (radical) or (root) √
(^1) ¹
(^2) ²
(^3) ³
(1/4) ¼
(1/2) ½
(3/4) ¾
(part) or (partial) ∂
(inf) or (infinity) ∞
(cent) ¢
(pound) £
(bsq) or (bsquare) ■
(wsq) or (wsquare) □
(bcircle) ●
(wcircle) ○
(rarrow) ►
(larrow) ◄
(uarrow) ▲
(darrow) ▼

SEE ALSO Vertex42.com Blog: Using Unicode Character Symbols in Excel

Tip #15 Mastered

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
Cell Formatting Tips < Start < Prev Next >

Tips in this category Progress: 0%

Mastered Level
1 Essential shortcuts for text, number, and cell formatting - 0
2 Use the Format Painter to copy formatting - 0
3 Apply formatting to selected text within a cell - 0
4 Indent and align cell contents for better legibility - 0
5 Change the Currency symbol - 0
6 Resize columns and rows - 0
7 Center a title across cells without merging - 0
8 Use Shrink to Fit to avoid the ##### error - 0
9 Create custom number formats - 0
10 Use and create Themes - 0
11 Use and create Cell Styles - 0
12 Intro to Conditional Formatting - 0
13 Advanced conditional formatting - 0

1 Essential shortcuts for text, number, and cell formatting ▲


The Home tab contains most of the commands you will use for formatting numbers, text, and cells. You will also find
some formatting commands in the mini toolbar that pops up when you right-click a cell. Formatting text and cells is
such a big part of what you end up doing in Excel, it pays to learn some of the most common keyboard shortcuts.

The following list is not comprehensive. Instead, we have carefully chosen the shortcuts we use most often and are
easiest to remember.

Shortcut Description
CTRL + 1 Open the Format Cells dialog box
CTRL + b Bold
CTRL + i Italic
CTRL + ~ Apply the General number format
CTRL + $ Apply the Currency number format
CTRL + % Apply the Percent number format
CTRL + ! Apply the #,##0.00 number format
CTRL+ALT+TAB Increase Indent (Decrease: CTRL+ALT+SHIFT+TAB)
CTRL + _ Remove borders

HINT The shortcut CTRL+1 is one of the most important formatting shortcuts. The shortcut for bold
(CTRL+b) might be the only one we use more.
TIP The shortcut CTRL+~ (CTRL+SHIFT+Tilde) is useful for changing a value back to a General
number when Excel autoformats it as a date, currency, percent, etc.

PRACTICE

A) Select cells A1:C1. Press CTRL+SHIFT+% A B C


Press CTRL+SHIFT+~ to revert back to General format 1 0.8765 0.4242 0.1
2
B) Select cells A3:C3. Press CTRL+SHIFT+! 3 3.2345 1300.2 45.1234
4
C) Select cells A5:C5. Press CTRL+SHIFT+$ 5 1.2 0.75 12.3
6
D) Select cells A1:C7. Press CTRL+_ to remove borders. 7
Press CTRL+SHIFT+& to add an outer solid border.

E) Select the cell to the right and practice using Practice indenting
CTRL+ALT+TAB and CTRL+ALT+SHIFT+TAB
If this shortcut does not work on your computer, see Tip #4

Tip #1 ✘ Mastered

REFERENCES

VIDEO ► Excel Help: Keyboard shortcuts for formatting

2 Use the Format Painter to copy formatting ▲


Use the Format Painter to quickly copy formatting from one cell, range or object to
another. The Format Painter is found in most of the Microsoft Office products. Select
the cell, range or object you want to copy, then click on the Format Painter. Finally,
click on the cells or object you want to format.

TIP Double-click the Format Painter to apply the format to multiple


objects or cells.

PRACTICE

A) Use the Format Painter to make the rectangle


have the same format as the red circle.
Use the Format Painter to make the rectangle
have the same format as the red circle.

B) Use the Format Painter to format the other Month Budget Percent
rows in this table like the first row.
January $ 23.30 7.2%
February 54 0.1663074
March 10.2 0.0314136
April 80 0.2463813
May 95.2 0.2931937
June 62 0.1909455

NOTE Formatting is repeated in a pattern if the destination range


is larger than the source range. You can format a table
with alternating row colors using this approach.

C) Change the background color of the first row in the table


from step B. Then, select the first and second rows in the
table. Use the Format Painter to paint the rest of the rows.

Tip #2 Mastered

REFERENCES

ARTICLE Excel Help: Copy formatting using the Format Painter

3 Apply formatting to selected text within a cell ▲


To apply text formatting to a portion of text within a cell, such as font, bold, italic, color, subscript, superscript,
strikethough, and size, simply highlight the target text before applying the formatting.

To format text within a cell, highlight the specific text and either press CTRL+1 or right-click on the highlighted text and
select Format Cells.

Note You can edit text formatting within the formula bar, but the text formatting will
only be displayed within the cell contents.

EXAMPLES
A) Showing chemical formulas like H2O
B) Including endnotes and footnotes[23]
C) Editing text and tracking showing changes
D) Highlighting text to make aware of errors
E) Using bold and italics to emphasize key words
F) Changing the font to display a formula like ="Formula" within some text

Note When a cell contains a formula, font formatting can only apply to the cell as a whole.

Tip #3 Mastered

4 Indent and align cell contents for better legibility ▲


Appropriate use of white space can improve readability. You can align and indent text
using the buttons on the Home tab in the Alignment section. The shortcuts for
indenting are CTRL+ALT+TAB (increase indent) and CTRL+ALT+SHIFT+TAB (decrease
indent). These shortcuts are easy to remember if you note that TAB is comonly used
for indenting in other software.

PRACTICE

A) Use indention or a trailing colon or space to label input cells

Example Edit this to match


1) Place a colon after the label Date: Date
2) Place a single space after the label Date Date
3) Use indentation Date Date

B) Use indentation for outlines

Example Edit this to match


1) Heading level 1 1) Heading level 1
a) Sub-heading level 2 a) Sub-heading level 2
i) Sub-heading level 3 i) Sub-heading level 3
ii) Sub-heading level 3 ii) Sub-heading level 3
b) Sub-heading level 2 b) Sub-heading level 2

C) Use cell alignment, number formats, and indention to make a table more readability

1) Left-align the text in the Item column. Item Qty Price


2) Center the values in the Qty field Flour (cups) 4 2.34
3) Change the number format in the Price column Eggs 5 1.45
to 0.00, so that the decimal points align vertically.
Butter (tbsp) 10 2.3
Bacon (strips) 5 1.45

IN PRACTICE

Alignment and indenting is very important for forms, invoices, purchase orders, or other documents that are intended
for other people to use or look at. The Job Application Form (link below) uses many examples of indention and
alignment:

TEMPLATE Job Application Form: An example of using alignment and indention

Tip #4 Mastered

REFERENCES

ARTICLE Excel Help: Rotate or align text in a cell

5 Change the Currency symbol ▲


Many financial templates use the dollar currency symbol "$" by default.
To change the currency symbol, select the cells to change. Then press
Ctrl+1 to open the Format Cells dialog box. In the Number tab, select
Currency or Accounting in the Category list. Then select a currency symbol
from the Symbol drop-down box.

HINT You can also select from a few common currencies by


clicking on the drop-down next to the "$" button in the
Home tab.

EXAMPLE Change the currency symbol in the cell to the right: $ 5.00

NOTE Changing the currency symbol is not the same thing as doing a currency conversion using an
exchange rate. Only the symbol is changed, not the value.

Tip #5 Mastered

REFERENCES
VIDEO ► How to Change the Currency Symbol

ARTICLE Excel Help: Format numbers as currency

6 Resize columns and rows ▲


CAUTION Avoid changing the width of the columns in this workbook.

Using the mouse to drag the boundary of a column or row is the most
intuitive way to change the width or height. You can also right-click on a
the column or row label and select Column Width or Row Height to enter
the size as a number.

See the article in the reference below for information about what the
column and row sizes are based on.

TIP Make multiple columns the same width by selecting each of the columns and then changing
the width of just one of them. This applies to row heights as well.

TIP Double-click on the column or row-sizing handle to make the column or row auto-fit based on
the contents of the cells. Some exceptions apply when using formulas, the Wrap Text option,
and merged cells.

Tip #6 Mastered

REFERENCES

ARTICLE Excel Help: Change the column width and row height

If you are just getting started, you might want to try some of the first tips in other categories.
You can always come back to this category later. Next >

7 Center a title across cells without merging ▲


Many people use merged cells to center a title across multiple cells. While that solution works, merged cells can often
lead to problems when copying and pasting, moving a table to a different location, inserting rows and columns, etc.

Instead of using merged cells, you can select the range of cells and press CTRL+1 to open the Format Cells dialog box.
Go to the Alignment tab and select "Center Across Selection" in the Horizontal drop-down box.

PRACTICE

A) In each of the examples to the right, try using cut (CTRL+x) Using Merge & Center
and paste (CTRL+v) to move the highlighted region one cell to
the left and right.
Example: Center Across Selection

B) Center the title of the following table using the Center Table Title
Across Selection method.
Month Budget Percent
January $ 23.30 7.2%
February $ 54.00 16.6%

Tip #7 Mastered

8 Use Shrink to Fit to avoid the ##### error ▲


When a column is too narrow to display a number or date, you will see "#####" in the cell. Use the "Shrink to Fit" cell
format option to avoid showing "#####" if you can't make the column wider or wrap the text. This can be especially
useful for cells containing dates or for forms with fixed formatting.

HINT A "#####" error may also mean that a cell formatted as a date or time
contains a negative value.

PRACTICE

The cell to the right contains a date that doesn't fit within the cell. ###

1) Select the cell and press CTRL+1 to open the Format Cells dialog box.
2) Go to the Alignment tab and check the "Shrink to Fit" checkbox. Then click OK.

IN PRACTICE
When creating forms, keep in mind that names and addresses may be longer than expected. The Job Application
template below is an example of this. Download the template and look at the name fields. The fields allow for long
names by using the Shrink to Fit format option.

TEMPLATE Job Application Form: Uses Shrink to Fit for the name and address fields

Screenshot from the Job Application Form template.

Tip #8 Mastered

REFERENCES

ARTICLE Excel Help: Correct a ##### error

9 Create custom number formats ▲


You can do some useful things with custom number formats. To get started, press CTRL+1 to open the Format Cells
dialog box. Then go to the Number tab and find the format that is closest to the one you want to use. Then, choose
Custom in the list of categories to view the code for that format. You can then edit the format in the Type field.

This image from the Excel help material explains the parts of the format code:

See the following Excel Help article for a detailed explanation of the format code.

ARTICLE Excel Help: Create or delete a custom number format

PRACTICE

In the table below, the Displayed As column shows what the numbers in the Value column look like when using the
specified Format Code.

A) Edit the numbers in the Value column to see how the Displayed As column changes.
B) To practice applying custom formats, format some of the cells in the Value column to look like
the Displayed As column.

Custom Number Formats


Description Format Code Value Displayed As
Display Leading Zeros 0000 50.8 0051
-50.8 -0051
Use a "K" to display values in thousands 0,"K" 23543 24K
-23543 -24K
0.0,"K" 23543 23.5K
-23543 -23.5K
Use an "M" to display values in millions 0,,"M" 2354300 2M
(Note that you need two commas) -2354300 -2M
0.0,,"M" 2354300 2.4M
-2354300 -2.4M
Positive numbers displayed with "K" or "M" 98 98.0
[>100000]0.0,,"M";[>100]0.0,,"K";0 123 0.1K
1234 1.2K
123000 0.1M
1230000 1.2M
-1234 1234.0
Positive numbers with singular/plural labels
1 1 person
[=1]# "person";[>1]# "people";0 5 5 people
0 0
Include units 0.0 "ft" 50.8 50.8 ft
-50.8 -50.8 ft
0.0 "kg" 50.8 50.8 kg
0.0"'" 50.8 50.8'
0.0"°" 50.8 50.8°
Add a bullet in front of text #;#;#;" • "@ Eggs • Eggs
Bacon • Bacon
Hide values (display nothing) ;;; 23.5
Up/Down arrows for +/- values [Color10]"▲"0.0; -4 ▼4.0
[Red]"▼"0.0 5 ▲5.0
Decimal number of feet displayed as feet and #"'" ??/12 5.75 5 9/12
inches 5.87 5 10/12
5.99 6
Add a carriage return within a format code by d/m/yy 41340.23 7/3/135:31 AM
pressing CTRL+j h:mm AM/PM

Leading and Trailing Characters @*- ✁ ✁-----------


@*_ Sign Sign_____
*.@ pg# ...........pg#

HINT Remember that dates and times are stored in Excel as numbers, so you can use custom
number formats to control how dates and times are displayed.
Remember that dates and times are stored in Excel as numbers, so you can use custom
number formats to control how dates and times are displayed.

SEE ALSO Data Entry Tip #7: Understand how Date and Time values are stored

Some Custom Date and Time Formats


Description Format Code Value Displayed As
Time displays as [hours]:[minutes] [h]:mm 0.99 23:45
1.99 47:45
Custom date formats d 3/7/2013 7
(date formats vary based on language) m 3/7/2013 3
ddd 3/7/2013 Thu
dddd 3/7/2013 Thursday
mmm 3/7/2013 Mar
mmmm 3/7/2013 March
Display AD and BC for positive and negative years 0 "AD";0 "BC" 234 234 AD
-234 234 BC
Add a Carriage Return within the format code by mmm 1/1/2013
pressing CTRL+j yyyy Jan2013

Display a date/time value as a TIMESTAMP 5/8/2013 13:10


yyyy-mm-dd hh:mm:ss TIMESTAMP: 2013-08-05 13:10:00

HINT Custom number formats are only available in the workbook in which they are created and are listed in
the Custom list on the Number tab. To use a custom format in another workbook, you can copy and
paste the formatted cell from one workbook to the other.

CAUTION Be aware that the number displayed may not represent the actual value of the cell, because
Excel will round values to fit the number format.

IN PRACTICE

TIP Using a date format of "d" allows you to display just the day of the month while still allowing
Excel to perform calculations on the actual date. This technique is used extensively in many
Vertex42 templates.

TEMPLATE Class Attendance Template: Uses the "d" format to display the day of the month

Tip #9 Mastered

REFERENCES
ARTICLE Vertex42.com: Examples of Custom Number Formats

ARTICLE Peltiertech.com: Examples of using custom number formats in chart axes

ARTICLE MyOnlineTrainingHub.com: Excel Custom Number Format Guide

10 Use and create Themes ▲


Excel 2007 introduced the ability to easily change the format (colors, fonts, and graphic effects) of a workbook by
choosing a new theme. All you need to do is go to Page Layout > Themes, and hover your mouse over the list of themes
in the drop-down gallery.

NOTE Themes only apply to the new XML file format (XLSX). An Excel 2003 file (.XLS) opened in
Excel 2010 does not use the new color palette or theme fonts, so changing the theme will
have no effect.

Theme-Enabled Templates
Vertex42.com provides many free "theme-enabled" templates, meaning that the templates are designed to let you
choose a different theme. The Invoice template and Calendar template below are good examples of how the look and
feel of a spreadsheet can be modified by just choosing a different theme.

TEMPLATE Invoice Template: Download the XLSX version

TEMPLATE Calendar Template: Download the XLSX version


CAUTION The theme definition is saved with your workbook. Some themes may increase the size of
your file significantly.

PRACTICE

Creating a custom theme is a great way to apply your own look and feel to multiple documents. Creating your own
theme is not difficult, but it does take some extra time and planning, especially if you want to define your own set of
colors. Once complete, you can quickly apply one of your saved themes to any document. This is a great way to provide
a consistent look and feel for business documents.

Create your own theme by choosing a combination of Colors, Fonts, and Effects

A) Download a theme-enabled template (such as the invoice template


above), and open the workbook.
B) Go to Page Layout > Colors and choose your color preference from the
gallery of colors.
C) Go to Page Layout > Fonts and choose the font that you like.
D) Go to Page Layout > Themes > Save Current Theme, and enter a
filename for your custom theme.

Changing the Theme Effects

Theme Effects define the lines and fill effects for graphics that use the default Shape Styles. Go to Page Layout > Effects
and watch how the squares below change as you hover your mouse over different choices in the gallery. Change the
Theme Effects back to "Office" when you are done.

Tip #10 Mastered

REFERENCES
ARTICLE Excel Help: Apply, customize, and save a document theme

ARTICLE Vertex42.com: Theme-enabled Templates

11 Use and create Cell Styles ▲


You can quickly apply a built-in Cell Style to a range of selected cells by
going to Home > Cell Styles and choosing a style from the gallery. Cell
styles can help you maintain consistent formatting within your document.
A cell style can define the Number format, Alignment, Font, Border, Fill,
and/or Protection (all the options available via the cell format dialog box).

You can define your custom cell styles by creating a new style based on an
existing cell (select the cell and then go to Home > Cell Styles > New Cell
Style) or by duplicating and modifying an existing cell style (right-click on a
style in the list of all cell styles).

HINT If design isn't your thing, try using some of the built-in styles.

NOTE • Cell Styles are saved as part of the current workbook


• Cell Styles that use theme-based fonts and colors will change if the user changes the theme
• You can copy Cell Styles from to another workbook by going to Home > Cell Styles > Merge Styles
• If you copy and paste a cell from one workbook to another, the Cell Style is copied as well

PRACTICE

Applying a cell style to a cell or range of cells

A) Apply the Normal Cell Style to the following cell $ 5.00


Hint: Go to Home > Cell Styles and select Normal

B) Apply a more interesting header style for the


heading on the right:
Heading 1

A cell style that only affects cell borders

When you create or modify a cell style, you can select or deselect the Number, Alignment, Font, Border,
Fill, and Protection options to determine what gets changed.

The default built-in "Input" style looks like this: Input

We don't like the built-in "Input" style, so we Input


defined a new cell style named "v42_input" that
defines only the Border.
We don't like the built-in "Input" style, so we
defined a new cell style named "v42_input" that
defines only the Border.

C) Apply the style named "v42_input" to ALL the center 3


cells on the right. Notice that only the borders are
affected. Sun Times $23.00
25% 5

D) Now, apply the default "Input" style to those


same cells. Notice that the fill is affected.

Exceptions: Formatting a cell after applying a Cell Style

If you format a cell after applying a Cell Style, the changes you make will take
precedence over the Cell Style.

We created a cell style named "TEMP" for you to TEMP


use in this example.

E) Change the background color of this cell: TEMP

F) Modify the format of the "TEMP" style.


Go to Home > Cell Styles and right-click on the TEMP style, select
Modify then Format. Change the fill color to something other than what
you did in Step E, then press OK twice.

What happens? (see the note below)

G) Delete the cell style named "TEMP".


What happens? (see the note below)

NOTE When you modify or delete a cell style, that change is applied to all cells with
that cell style, but the change does not overwrite any manual formatting you may
have applied.

Tip #11 Mastered

REFERENCES

ARTICLE Excel Help: Apply, create, or remove a cell style

12 Intro to Conditional Formatting ▲


Conditional Formatting allows you to automate formatting tasks such as highlighting outlier data, highlighting data that
meets specific criteria, finding duplicates, adding in-cell data bars and icons, and more. Conditional Formatting is an
extremely powerful feature and deserves extra attention, especially if you use Excel for data analysis. The following
video link provides a very useful introduction.
Conditional Formatting allows you to automate formatting tasks such as highlighting outlier data, highlighting data that
meets specific criteria, finding duplicates, adding in-cell data bars and icons, and more. Conditional Formatting is an
extremely powerful feature and deserves extra attention, especially if you use Excel for data analysis. The following
video link provides a very useful introduction.

VIDEO ► Excel Help: Using conditional formatting to make data stand out

EXAMPLES

Below are some examples of conditional formatting. Click on one of the formated cells and go to Home > Conditional
Formatting > Manage Rules to see how the conditional formatting is implemented.

Highlight values based on specific criteria

Student Score
Bob 45
A) Change the inputs below and watch the shading in the table. Jim 30

Inputs Sally 5
Highlight red any value > 30 John 18
Highlight green any value <= 10 Ian 12
Chris 31
Fred 5
Kate 10

Highlight duplicates

Highlighting duplicates is one of the standard conditional formatting 1 4


options. 7 3
3 2
B) Select the cells to the right and go to Conditional Formatting > 4 8
Highlight Cell Rules > Duplicate Values and click OK. 9 5

NOTE Conditional formatting rules override any manual formatting.

Icon Sets

This workbook uses conditional formatting Icon Sets to display a green


checkmark when you master a tip, and a mini rating bar to show the skill
level for each tip.

C) Display an icon in place of a value


1) Select the cell to the right
2) Go to Conditional Formatting > Icon Sets and Try It: 1
experiment with some of the options.
3) To show just the icon and not the value, select the cell and
go to Conditional Formatting > Manage Rules > Edit Rule.
Then, check the "Show Icon Only" box.
To show just the icon and not the value, select the cell and
go to Conditional Formatting > Manage Rules > Edit Rule.
Then, check the "Show Icon Only" box.

Data Bars

Data bars are especially useful for data analysis, and can often take the Name Sales
place of separate bar charts. In the example to the right, the data bars
inside the Sales column make it easier to compare the Sales figures. Joe 56
Sally 103
Sam 87
Sue 139
D) Select the data in the Sales column and go to Conditional Formatting Jim 65
> Data Bars to select a different bar style. John 117

HINT The Progress bar at the top of each worksheet is just a data bar with a specific
minimum and maximum value (0% and 100%).

Clearing conditional formatting rules

E) Highlight the cells containing the data bars in the above example, and go to Conditional
Formatting > Clear Rules > Clear Rules from Selected Cells.

HINT Almost any cell formatting characteristic can be changed with conditional
formatting including font, borders, shading and number formatting.

HINT When you copy and paste a cell, the conditional formatting rules that are applied
to that cell are also copied.

Tip #12 Mastered

REFERENCES

ARTICLE Excel Help: Quick start to apply conditional formatting

13 Advanced conditional formatting ▲


This is an advanced tip that requires you to know the basics of conditional formatting

Conditional formatting can be used in a wide range of situations including data analysis, data screening and automation.
Many of the advanced conditional formatting techniques use formulas, references to other ranges, and nested
conditions. The examples below demonstrate some of these techniques.
To see the conditional formats applied to a cell or range, select the cell or range and go to Home > Conditional
Formatting > Manage Rules. The Manage Rules tool lets you add and delete rules, change the order, and change which
cells the rules are applied to.

EXAMPLES

Shade every other row

This technique is useful when you frequently delete, insert, or sort rows Name Sales
but do not want to use the "Format as a Table" feature. Ted 87
Sally 234
In the table on the right, the Sales column uses the conditional formatting John 98
formula "=MOD(ROW(),2)=1" to highlight every other row. The Name Kate 70
column was formatted manually.
Ian 120
Fred 12
Try sorting the Name column A to Z using the auto filter. What happens
and why?

Many of the templates created by Vertex42.com use this technique, such as the invoice template below.

TEMPLATE Invoice Template: Highlights every other row, via conditional formatting.

Using Multiple Conditions

The mini calendar in the "calendar" worksheet is an example of


how multiple rules can be applied to the same range of cells.
To see these rules, go to the calendar worksheet and select the
cells of the calendar as shown in the image to the right. Then,
go to Conditional Formatting > Manage Rules. You will see that
there are 4 different rules, as shown in the image below.
Rule #1: Displays the current date with red font and a red border (but does NOT set a background color).

Rule #2: Highlights the dates listed in the table to the right of the calendar with a purple background.

NOTE It is possible for both Rule #1 and Rule #2 to be true at the same time, so because we have
NOT selected the Stop If True box, if today's date is listed in the table to the right, it will be
highlighted purple AND have a red border.

Rule #3: Highlights the weekends with a gray background

NOTE Notice that if both Rule #2 and Rule #3 are true (meaning that a date is both a weekend AND
listed in the table to the right), it is highlighted purple but NOT gray. That is because the rules
listed first take precedence.

Rule #4: Adds a gray border to cells that are not blank and formats the background white.

NOTE This rule is listed last because it provides the default way to format the dates that are not
blank.

HINT Conditional formatting conditions override manual formatting. In the example above, we
formatted all the cells with a light gray border. Rules #2, #3, and #4 override the background
color.

Many of the calendar templates on Vertex42.com use the techniques described above.

TEMPLATE Yearly Calendar Templates

Using Relative and Absolute References in Conditional Format Formulas

When you use a formula as a conditional formatting rule, like in Rule #2 in the above example, it is very important that
you understand how absolute and relative references behave when cells are copied and pasted. See the tip below:

SEE ALSO Formula Tip #4: Copy formulas using Absolute or Relative references

TIP When creating rules, think of the $ in a reference as an "anchor". Ask yourself whether you
want the reference to change for each of the cells in the Applies To range, or whether you
want it to be anchored to the column, the row or both.
The formula for Rule #2 is shown below. It includes both a relative reference (B34) and an absolute reference
($J$33:$J$39). The Applies To range is shown as $B$34:$H$39.

Formula: =NOT(ISERROR(MATCH(B34,$J$33:$J$39,0)))

When a rule is applied to a range, think of the conditional formatting formula as being applied to the FIRST cell in the
Applies To range (B34 in this case) and then being copied to the rest of the cells in the Applies To range. Relative
references behave just as they would when copying other formulas.

TIP You can view and edit ALL the rules within a worksheet without it mattering what cell(s) you currently
have selected. Just go to Conditional Formatting > Manage Rules and select "This Worksheet" from the
drop-down box.

TIP You can edit the Applies To range if you need to expand or consolidate conditional formatting rules.

Highlight different sets of inputs

The Home Mortgage Calculator on Vertex42.com uses


conditional formatting to help the user know which inputs
need to be edited. When the interest rate is fixed, many of the
inputs are not applicable, so we "grey them out" to indicate
that those cells are not used.

TEMPLATE Home Mortgage Calculator: Highlights different inputs depending on user selection

Other Examples

Inventory Reorder
This sample shows how to automatically highlight inventory that needs to be reordered. A second conditional format is
used to bold items that are close to the reorder point (based on the input cell). Spend some time reviewing the
conditional formats and playing with the stock numbers to fully understand how the conditional formatting works.

Warn (bold) at 120% of reorder point

Item In Stock ReOrder


Bumper 13 15
Fender 11 10
Handle bar 28 20
Seat 26 25
Front Wheel 35 20
Rear Wheel 11 20

Highlight Past Due Invoices - using today's date in a condition


Review the conditional formatting below. Notice how the TODAY() function is used in the formulas to compare the Due
Date for each invoice to today's date. As the date changes, the formatting will update based on this rule. Change the
Due Dates for the invoices to see how the condition works. (We set the Due Dates to calculate based off of today for
illustration purposes only.)

Customer Amount Due Date


ABC Widgets $ 110.00 9/15/2022
XYZ Manufaturing $ 120.00 8/26/2022
ACME Signs $ 35.45 9/7/2022
Joe's Plumbing $ 43.56 9/5/2022

IN PRACTICE

In addition to the templates already listed above, the following templates on Vertex42.com make use of conditional
formatting.

TEMPLATE Gantt Chart: Creates the bars of the gantt chart by changing the background color of cells

TEMPLATE Rotation Schedule: Highlights days on/off for a rotating work schedule

Tip #13 Mastered

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
Formula Tips < Start < Prev Next >

Tips in this category Progress: 0%

Mastered Level
1 Intro to Formulas - 0
2 Use the Insert Function dialog box and Help - 0
3 Edit an existing formula - 0
4 Copy formulas using Absolute or Relative references - 0
5 Use Named cells and ranges in formulas - 0
6 Use the & operator to concatenate text and numbers - 0
7 Using the IF function and other logical functions - 0
8 Rounding values using functions - 0
9 Round to the nearest multiple other than 10 - 0
10 Formulas for manipulating text - 0
11 Common Date formulas - 0
12 Formulas for working with Times - 0
13 Date formulas involving weekends and holidays - 0
14 Insert and delete rows without breaking formulas - 0
15 Look up values in a list using VLOOKUP, INDEX, and MATCH - 0
16 Return the last value in a column - 0
17 Conditional sums using SUMIF and SUMIFS - 0
18 Conditional sums and counts using SUMPRODUCT - 0
19 Intro to Arrays and Array Formulas - 0
20 Use the WATCH window to monitor the value of a cell - 0
21 Use the formula trace tool to track formulas - 0
22 Handling errors in formulas (#REF!, #DIV/0!, #VALUE!, #N/A) - 0

Formula-Related Tips in Other Categories


Special Features Tip #1: Name cells and ranges
Special Features Tip #10: Generate random numbers
Special Features Tip #12: Create dynamic named ranges

1 Intro to Formulas ▲
The real power of a spreadsheet tool like Excel comes from the ability to enter formulas that reference other cells.
Formulas in Excel begin with the equal sign (=). For example, if you wanted to add a formula to cell A3 that adds
the values in cells A1 and A2, you would enter =A1+A2.

You can use common operators like the plus sign (+) for addition, minus sign for subtraction (-), asterisk for
multiplication (*), forward slash (/) for division, and carrot (^) for exponentiation. Excel also has many built-in
functions like SUM(range) and AVERAGE(range) that make it easy to perform calculations.
You can use common operators like the plus sign (+) for addition, minus sign for subtraction (-), asterisk for
multiplication (*), forward slash (/) for division, and carrot (^) for exponentiation. Excel also has many built-in
functions like SUM(range) and AVERAGE(range) that make it easy to perform calculations.

The following videos provide a good introduction to creating simple formulas that add numbers.

VIDEO ► Excel Help: Add Numbers in Excel 2013

VIDEO ► Excel Help: The SUM Function in Excel 2013

PRACTICE

Simple Math

Practice some simple math problems by referencing the X Y Z


cells for X, Y, and Z.
10 2 3

Addition (X + Y) answer
1) Select the cell where you want the results Try it: 12
2) Press = and then select the cell with the X value
3) Press + and then select the cell with the Y value
4) Press ENTER to complete the formula

Subtraction (Z-Y) Try it: 1

Multiplication (Y*Z) Try it: 6

Division (X/Y) Try it: 5

Exponentiation (X^Y) Try it: 100

Use parentheses to establish order of operations

Does 20+10/2 equal 15 or 25? If there is ever a question about the order of operations in a formula, use
parentheses to make Excel do what you want. For example, if you want to make sure that 20 and 10 are added
BEFORE you divide by 2, use parentheses like this: =(20+10)/2.

The table below lists the order of operations with an example for each. First, try guessing whether the answer in (a)
or (b) is correct. Then, enter the Example formula in the Try It column (with an equal sign in front) to see whether
you guessed correctly. For instance, in the second example, type =2+10% in the Try it column.

Which is Correct?
Precedence Example (a) (b) Try it:
1. Negation -10^2 100 -100
2. Percents 2+10% 12% 210%
3. Exponentiation 2^2*2 8 16
4. Multiplication and Division 20+10/2 15 25
5. Addition and Subtraction 2+3&"kg" 5kg error
6. Concatenation 2&3="23" 1 20
7. Comparison operators 5*5>20 1 0

NOTE The answers in (a) and (b) are formulas that use parentheses to specify whether the first
or second operator should be evaluated first.

Use Built-In Functions like SUM()

Excel has many powerful built in functions. One simple example is the SUM() function which has the syntax
=SUM(number1, [number2],…). When looking at the syntax for a function, optional input parameters are
surrounded by brackets [ ]. In the case of the SUM() function, at least one number or cell (number1) must be
included, while [number2], [number3], [number4] and so forth are optional.

You might wonder why a SUM() function is useful. After all, you can just use the plus sign. The following practice
problems will help you discover the power of using built-in functions.

X Y Z
10 2 3
A) Add the values for X, Y, and Z using the + operator and cell answer
references, such as = A1 + A2 + A3.
Try it: 15
answer
B) Now try to do the same thing using the SUM() function. Your Try it: 15
formula will be =SUM(refX, refY, refZ) where refX is the cell reference
for the X value, refY is the cell reference for the Y value, etc.

HINT The real power of many functions like SUM() or AVERAGE() comes from being able use a
reference to a range of cells, such as =SUM(A1:A10).
answer
C) Add the values again, but use =SUM(range), where range is the Try it: 15
range of cell values for X, Y, and Z. See the formula in the answer cell
to the right if you have a question.

Month Sales
What formula would you use to add the 12 months of sales numbers Jan 25
in the table to the right? Is it easier to create the formula using "+" or
SUM()? Enter your formula in the cell to the right of Total at the Feb 23
bottom of the table. Mar 12
Apr 12
May 67
Jun 32
Jul 19
HINT The AutoSum feature can be used to create some Aug 39
formulas automatically. Select the cell to the right of
Total and then go to Formulas > AutoSum or press Sep 62
ALT+"=". Oct 39
Nov 20
Dec 28
Total

TIP Different functions require different kinds of inputs.


Use the tooltip that appears after you enter the first
parenthesis to help you know what inputs that function
requires.

Tip #1 ✘ Mastered

REFERENCES

VIDEO ► Excel Help: Keyboard shortcuts for formulas

Useful keyboard shortcuts for working with formulas


CTRL + ` Toggle View formulas
F4 Toggle absolute, relative, mixed references
ESC Cancel editing a formula
SHIFT+F3 Opens the Insert Function dialog box
CTRL+SHIFT+ENTER Enter an array formula
CTRL+SHIFT+U Expand the formula bar

2 Use the Insert Function dialog box and Help ▲


There are books and websites that list all Excel functions, but one of the best ways to
familiarize yourself with the built-in Excel functions is to use the Insert Function dialog box
via the Formula tab (or SHIFT+F3).

NOTE Use the Help link in the lower left corner of the Insert Function dialog box to go directly
to the Help file for that function. The Help file does a great job of explaining the syntax
and details for all the built-in functions.
TIP Another way to get to the Help for a function is to click
on the function name hyperlink in the tooltip when the
cell is selected.

HINT Pressing the fx (Insert Function) button while editing a formula will
take you to the Function Arguments window that provides
definitions and explanations of the arguments and options.

TIP Excel will suggest functions as you begin to type them. Press TAB
to automatically accept the suggestion.

PRACTICE

Take a couple minutes to browse the built-in Excel functions using the Insert Function dialog box.

Tip #2 Mastered

3 Edit an existing formula ▲


To edit an existing formula, you can either (1) double-click on the cell, (2) select the cell and press F2, or (3) select
the cell and click somewhere in the Formula Bar.

When in Edit Mode, the cell references (A1, $B2, etc.) will
turn different colors. These colors match colored boxes
that appear around the referenced ranges. To edit a
reference, either modify the text in the formula or drag the
colored box.
When in Edit Mode, the cell references (A1, $B2, etc.) will
turn different colors. These colors match colored boxes
that appear around the referenced ranges. To edit a
reference, either modify the text in the formula or drag the
colored box.

TIP Press ESC when editing a formula to undo all changes and exit edit mode.

PRACTICE

A) Edit the formula below. Modify the formula so it references the 4 rather than the 3. You can do this by modifying
the reference from H232 to I232 or by dragging/moving the colored box to the right.

Formula Referenced Cells


49.7 10 2 3 4

TIP Excel color-codes parentheses () within a formula. The opening and closing parentheses are the same
color. When your cursor is on or near a parenthesis, the matching parenthesis will be bolded. This is
very helpful when working with long nested functions.

B) Select the Formula cell from step (A) again and press F2 to enter Edit Mode. Notice the colors of the parenthesis.
Try moving side to side with the arrow key to see what happens. Press ESC to exit formula edit mode.

Tip #3 Mastered

4 Copy formulas using Absolute or Relative references ▲


When you Copy and Paste a cell containing a formula, Relative references like =B2 may change but Absolute
references like =$B$2 will not. For example, if you copied a cell containing the formula =B2 and pasted it one
column to the right and 2 rows down, the new cell would contain the formula =C4. If you copy a cell containing a
Mixed reference like =B$4, the column (B) may change, but the row (4) will not.

A dollar sign ($) before a column letter or row number can be thought of as an "anchor." If you do not want the
column to change, add the anchor ($) before the column letter. If you do not want the row to change, add the
anchor ($) before the row number.

TIP When entering or editing a formula, you can press F4 when the cursor is on a cell
reference to toggle between A1, $A$1, A$1, $A1. Even better, F4 will change all
references simultaneously if you have multiple references selected.
PRACTICE

Relative references (B2)


Create the Fibinocci Sequence: Select the cell under Start and drag the Fill Handle to copy the cell (and its formula)
to the right until you get to the cell under End. Notice how the referenced cells are always the two cells to the left of
the formula.

Start End
0 1 1

Absolute references ($B$2)


Add a single value to a range of cells: Select the cell under Start and drag the Fill Handle to copy the cell (and its
formula) to the right until you get to the cell under End. Notice that the absolute reference remains the same,
while the relative reference moves with the formula.

Value: 10 Data: 5 10 15 20 25 35

Start End
15

Mixed references ($B2 and B$2)


Create a data table that references the columns and rows

1) Select the cell that contains "A1"


2) Double-click on the cell or click inside the Formula Bar to see what cells the formula is referencing
3) Press ESC to cancel editing the cell
4) Press CTRL+c to copy the cell
5) Select the rest of the gray cells: Hold SHIFT as you press RIGHT, RIGHT, DOWN, DOWN, DOWN
6) Press CTRL+v to paste
7) View the formula in the last cell to see how the references changed

A B C
1 A1
2
3
4

Tip #4 Mastered
5 Use Named cells and ranges in formulas ▲
Named cells and ranges can be used as references in formulas to
increase the readability and may also make it easier to troubleshoot
and for others to understand the formulas. Named cells and ranges
will act as absolute references.

To use a named cell or range, just type the name into the formula.
Excel will suggest named cells and ranges as you begin to type them.

SEE ALSO Special Tip #1: Name cells and ranges

TIP Press F3 when entering a formula to list and select from all
available Names.

PRACTICE

Create a formula to calculate the area of a triangle. Enter the following formula in
the Area cell below =(base*height)/2. We have already named the "base" and
"height" cells for you.
height
base
Area base height
12 10

Tip #5 Mastered

6 Use the & operator to concatenate text and numbers ▲


When you need to combine text from multiple cells or combine text with numbers, use the & operator or the
CONCATENATE function. For example, to display "24.5 kg" when the value 24.5 is located in cell A1, you could use
=A1&" kg" or =CONCATENATE(A1," kg").

PRACTICE
Look at the example formulas and then try to recreate the formula yourself.

Display an Age as "y Years, m Months and d Days"

Years Months Days Example formula (double-click to view)


21 5 4 21 Years, 5 Months and 4 Days

Try it:

Combine Last Name and First Name

Last First Example formulas


Sawyer Tom Tom Sawyer (using &)
Tom Sawyer (using CONCATENATE)

Try it:

Tip #6 Mastered

REFERENCES

VIDEO ► Excel Help: The CONCATENATE function in Excel

7 Using the IF function and other logical functions ▲


The IF() function is a simple and highly useful function. You need to have an understanding of this function to be
effective in Excel. It is used in error checking, conditional formatting, calculations with user inputs, and both simple
and complex modeling.

The function has three arguments: =IF(logical_test, value_if_true, value_if_false).

Logical_test - an expression that will typically have a relational operator (=, >, <, >=, <=) so that when evaluated, the
result will be TRUE or FALSE. For example, the logical test may be simply A1=3. If cell A1 is equal to 3, then the
logical test result will be TRUE. If not, it will be FALSE.

Value_if_True - This is the value to be returned if the logical_test is TRUE. The value can be a number, text, or a
nested formula.

Value_if_False - This is the value to be returned if the logical_test is FALSE.


PRACTICE

A) Start by just calculating a logical test on its own. Let's say we want to test whether A is greater than 100. In the
example below, enter a formula that will return TRUE or FALSE.

1) Select the cell under Logic Test and type "=" to begin A Logic Test
entering the formula.
30
2) Then press the Left Arrow once (to select the cell
containing the value for "A") and then type ">100" and
press Enter

B) Now lets try creating a complete IF statement. See if you can create a formula that matches the following
statement: IF A is greater than 100, then return the text string "yes", otherwise return the text string "no"

Result
Formula: =IF( refA > 100, "yes", "no" ) Try it:
refA is a reference to the cell labeled "A" in Step A

C) Create the following IF formula. IF X-Y is greater than 0, X Y


then show the result of X+Y. Otherwise, show the average
of X and Y. 100 30

1) First, figure out what the logical test will be. In this case, Logic Test
we want to test whether X minus Y is greater than 0.
Enter the formula on the right. Try it:

HINT When in doubt about the order of operations, use parentheses. Does "X-Y>0" mean "(X-
Y)>0" or "X-(Y>0)"? If there is any question, then use the parentheses to force it to do
what you want, which in this case is (X-Y)>0.

2) Now try writing the full IF formula. Use SUM() for the TRUE
response and AVERAGE() for the FALSE response.
Result
Formula: =IF( (refX-refY)>0, SUM(refX,refY), AVERAGE(refX,refY) ) Try it:
Or: =IF( (refX-refY)>0, refX+refY, (refX+refY)/2 )

Notice how you can nest other functions and formulas within the IF formula.

Logic tests can be more complicated than just a simple single expression. You can use the AND(), OR() and NOT()
functions to combine multiple small logic tests into one large boolean expression.

AND(logical1,logical2,...) - This function does a logical AND operation on 2 or more logical tests. For AND() to be
TRUE, ALL of the logical tests within it need to be TRUE.
OR(logical1,logical2,...) - This function does a logical OR operation on 2 or more logical tests. For OR() to be TRUE,
ONE or more of the logical tests within it needs to be TRUE.

NOT(logical) - This function inverts the result of a logical test. If the logical test is TRUE, then FALSE is returned and
vice versa. This function is helpful when making complex nested logical tests.

A B
100 30

D) Create a logical test for A>0 AND B>0. It will start with =AND( Try it:

E) Create a logical test for A>0 OR B>0. It will start with =OR( Try it:

F) Add NOT() around your logical test in E above. Now D and E will Try it:
always be opposites.

Any of these logic tests could be used in an IF() function.

TIP Logical test formulas are commonly used as Conditional Formatting rules. For example, if you
wanted to highlight cell A1 red if a cell value returns an error, you could use the formula
=ISERROR(A1) which returns TRUE when A1 returns a #DIV/0, #N/A, or other error.

SEE ALSO Formatting Tip #12 - Intro to Conditional Formatting

Tip #7 Mastered

REFERENCES

VIDEO ► Excel Help: IF function

VIDEO ► Excel Help: Advanced IF functions

8 Rounding values using functions ▲


Changing the way a number is formatted (number of decimal places) may make the number appear to be rounded,
but does not change the value that is actually stored and used in calculations. To change the value, use rounding
functions such as ROUND, ROUNDUP, ROUNDDOWN, CEILING, FLOOR, MROUND, INT, EVEN, ODD.
PRACTICE

Round to the nearest EVEN or ODD integer


Result
Value: -123.456 EVEN(value) -124
ODD(value) -125

Try it:

Truncate a number, by dropping a specified number of digits

Result
Value: -123.456 TRUNC(value,2) -123.45
TRUNC(value) -123

Try it:

Round to an Integer
Result
Value: 123.456 INT(value) 123 (rounds down)
ROUNDDOWN(value,0) 123 (rounds down)
FLOOR(value,1) 123 (rounds down)
ROUNDUP(value,0) 124 (rounds up)
CEILING(value,1) 124 (rounds up)

Try it:

NOTE INT, TRUNC, ROUNDDOWN, and FLOOR may behave differently when the
value is negative. See Help on TRUNC for more info.

IN PRACTICE

TEMPLATE Loan Amortization Schedule: Calculate accurate payments by rounding

We use rounding in our Loan Amortization Schedule to calculate interest payments, rounded to the nearest penny.
After all, you don't write checks for fractions of a penny, so banks round to the nearest penny when calculating
interest due. The screenshot below shows part of the formula for the Interest calculation. You'll see a lot of nested
IF functions, but the important part is ROUND(rate*H17,2).
If you look closely at the formula in the screenshot, you will notice that the rounding can be turned on or off by
toggling the Rounding On check box just above the Balance header. The named range "roundOpt" is the name of
the cell linked to the check box. The tips below will help you figure out how this is done.

SEE ALSO Special Tip #1: Name cells and ranges

SEE ALSO Special Tip #7: Add a Check box form control to a worksheet

Tip #8 Mastered

9 Round to the nearest multiple other than 10 ▲


If you want to round a price to nearest nickel (multiple of 0.05), or feet to the nearest inch (multiple of
1/12), or minutes to the nearest second (multiple of 1/60), you can use one of the following formulas:

a) =MROUND(value,multiple)
b) =ROUND(value/multiple,0)*multiple
c) =MROUND(value,SIGN(value)*multiple)

TIP When using MROUND(value, multiple), value and multiple must have the same sign. To protect
against sign changes, multiply the multiple by the SIGN(value) to match the signs of both value and
multiple.

NOTE The CEILING and FLOOR functions also behave like MROUND, but are used to round up (CEILING) or
round down (FLOOR).

PRACTICE

Below are some examples. Change the inputs, value and multiple, to see how they affect the results. Remember to
try changing the value to a negative number.

Input Formula Result


value 123.4 MROUND(value,multiple) 120.00
multiple 15 ROUND(value/multiple,0)*multiple 120.00 (robust to negative values)
MROUND(value,SIGN(value)*multiple) 120.00 (robust to negative values)
CEILING(value,multiple) 135.00 (Round to the larger value)
FLOOR(value,multiple) 120.00 (Round to the lesser value)

Try it:

Round a Price in Dollars to a Nickel (multiple = 0.05)

Input Formula Result


price 123.42 MROUND(price,0.05) 123.40

Try rounding to a Quarter (multiple = 0.25):

Round Minutes to a 15-Minute Interval (multiple = 15)

Input Formula Result


minutes 123.42 MROUND(minutes,multiple) 120

[h]:mm:ss 0:42:23 ROUND(time*(24*60)/15,0)*(15/(24*60)) 0:45:00

Try it:

Round Minutes to the Nearest Second (multiple = 1/60)

Input Formula Result


minutes 123.42 MROUND(minutes,1/60) 123.41667 minutes

Try it:

Round Feet to the Nearest Inch (multiple = 1/12)

Input Formula Result


feet 123.42 MROUND(feet,1/12) 123.41667 feet

Try it:

Tip #9 Mastered

10 Formulas for manipulating text ▲


Manipulating text data is a very common task in Excel. Whether it's a list of product data dumped from a
database, or a Christmas card address list you've assembled over the years, you will likely need a way to
manipulate text at some point. You have already learned how to concatenate text using the & operator.
The following practice section will introduce you to many more text functions.

We will also be showing you a technique for assembling a very complex formula.

PRACTICE

Count the number of characters using LEN()

The LEN() function can be used when you are wanting to keep text within a cell to a certain length, and it
is also used within many other string manipulation formulas. In the example below, the result of LEN()
will not change until you press Enter after editing text.

Create a "Tweet" message that is under 140 characters:


LEN()
0

Change the case to UPPER, lower, or Proper

Use the UPPER(), LOWER(), and PROPER() functions to change the case of the title below.

title This is a sample title

Try it:

Use TRIM() to get rid of extra spaces

title Use TRIM to remove extra spaces from this text.

Try it:

HINT After manipulating text with a formula like this, it may be desirable to convert the result back to
regular text rather than keeping the formula. To do that, just copy the cell with the formula and then
use Paste Special > Values.

Return a special character like double quotes (") using a formula


When you concatenate text and need to include double quotes, you can use the CHAR(34) function. The CHAR()
function lets you return the character for a given numeric code. The CODE() function will tell you the numeric code
(0-255) for a given character.

Example: This formula returns double-quotes (") using CHAR(34)

Code Symbol Code


34 " 34
182 � 239
169 � 239
149 � 239

TIP View all the symbols in the Wingdings font: In a new workbook, enter the formula
=CHAR(ROW()) in cell A1 and change the cell's font to Wingdings, then copy that formula
down to row 255.

SEE ALSO Data Entry Tip #2: Insert a Line Break inside a cell

Extract a First or Last name

To extract the first word (or name) from a text string, you can use the following formula, where text is either a cell
reference or a string surrounded by double quotes like "this".

Formula: =LEFT(text,FIND(" ",text)-1)

In the above formula, FIND(" ",text) returns the numeric position of the first space " " within the text, and we
subtract one from that value so that we do not include the space in the result.

To return the rest of the string after the first space, we use the RIGHT() function, which extracts a specified number
of characters from the end of the string. We calculate the number of characters to extract by subtracting the
position of space from the total length of the string:

Formula: =RIGHT(text,LEN(text)-FIND(" ",text))

Try to use the above formulas to dispay the First and Last name in different cells.

First Last
text: Allen Reems Try it:

HINT We could also use the Data > Text-to-Columns feature for this particular
example, if we only needed to do it once.

What if there was a middle name or a title? How do we extract just the last name?
We could use the above formulas and extract the parts of the name in stages. But, if we want to extract
the last name with a single formula, we'll first need to learn how to count the number of spaces.

Count the number of spaces in a text string

Formula: =LEN(text)-LEN( SUBSTITUTE(text," ","") )

# of Spaces
text: Allen Jay Reems 2 Try it:

The SUBSTITUTE function in this example returns a new text string with the spaces removed (replacing
all " " with ""). We are subtracting the length of that modified text string from the original length to
calculate the number of spaces in the original text.

Extract the text after the last space

Now that we know how to count the number of spaces, we can use the SUBSTITUTE() function to
temporarily replace the last space with a rare character like "^" and then use FIND() to figure out the
location of that character, and THAT is the key to extracting the last name.

Because this formula is very complex, we will create a few intermediate formulas, starting from the top
down (A, B, C). Then, we will test the formulas starting from the bottom up (C, B, A).

text: Allen Jay Reems


A) last_name Result
=RIGHT(text, LEN(text) - position_of_last_space ) A) Reems
B) position_of_last_space
=FIND("^", SUBSTITUTE(text," ","^",number_of_spaces)) B) 10
C) number_of_spaces
=LEN(text)-LEN( SUBSTITUTE(text," ","") ) C) 2

After we confirm that the result of formula (A) is correct, we can assemble what John Walkenbach,
author of countless Excel books, calls a "Megaformula" - a combination of several intermediate functions
used to create a single complex formula.

Last Name
1) Copy the working formula from (A) into the cell to the right. Try it:
2) Select the cell containing the working formula for (B).
3) Press F2, then copy the entire formula except the "=" sign, then
press ESC. Important: We are not copying the cell. We are copying
the text of the formula within the cell.

4) Now, edit the Last Name formula, replacing the reference to formula
B with the formula text you just copied, by selecting the reference
and pressing CTRL+v to paste.

5) Repeat steps 2-4 but this for formula (C).


Tip #10 Mastered

REFERENCES

ARTICLE Vertex42 Blog: Text Manipulation Formulas in Excel - The Ultimate Guide

ARTICLE Excel Help: Top ten ways to clean your data

11 Common Date formulas ▲


Many spreadsheets perform calculations on dates. Examples may include time sheets, gantt charts, shift schedules,
calendars, planners, payment schedules, money managers, timelines, or health and exercise logs.

To understand how data formulas work, it is important to remember that date values are integer serial numbers
counting from Jan 1, 1900. For instance, the date May 8, 2013 is actually stored in the cell as the number 41402.
The next day (May 9, 2013) is 41403. How a date is displayed depends on the cell formatting.

SEE ALSO Data Entry Tip #7: Understand how Date and Time values are stored

SEE ALSO Formatting Tip #9: Create custom number formats

REMEMBER When using the 1900 Date System, Excel only recognizes date values for dates starting on
Jan 1, 1900.

PRACTICE

Return today's date

Use the TODAY() formula to return the current date. Formula: =TODAY()
Try It:

NOTE The TODAY() formula will update whenever the worksheet recalculates.

Simple Date Addition and Subtraction


Dates are stored as integer serial numbers, so adding and subtracting days is very simple.

start_date days end_date


4/24/2013 20 5/14/2013

A) Add a number of days to a date: Formula: = start_date + days


Try It:

B) Subtract two dates: Formula: = date_end - date_start


Try It:

Use DATE and DATEVALUE to define a date

year month day date


2013 5 2 5/2/2013

A) Use the DATE formula to convert the year, month, and day to a date.
Formula: =DATE( year, month, day)
Try It:

B) Use the DATEVALUE formula to convert a date string to a valid date serial number.
Formula: =DATEVALUE("Sep 3, 2013")
Try It:

CAUTION The DATEVALUE formula recognizes most types of date strings such as "2 Sep, 2012", "2012-09-02",
"2/9/2012". Your computer's date settings (language and regional settings) can affect how the
DATEVALUE interprets date strings.

C) For a given date, return the day, month, or year using DAY(), MONTH(), YEAR()

date year month day


9/5/2022 2022 9 5
Try it:

Return the Last Day of the Month

A) Using the EOMONTH function, return the last day of the month for the current month
Formula: =EOMONTH(date,0)
date: 9/5/2022 Try it:

B) An alternative to using the EOMONTH() formula is to recognize that the zeroth day of the next month
is the last day of the current month
Formula: =DATE(YEAR(date),MONTH(date)+1,0)
Try it:
Use WEEKDAY to return the day of the week

There are many cases where you may want to use a formula to
determine what day of the week a date falls on. In many calendar and
planner templates, we use the WEEKDAY() function to highlight
weekends via conditional formatting.

TEMPLATE School Year Calendar Template

date: 9/5/2022 Weekday: 2 Weekday Name: Monday

A) Return TRUE if a date falls on a weekend


Formula: =OR( WEEKDAY(date,1)=1, WEEKDAY(date,1)=7 )
Try it:

B) Return the WEEKDAY name using TEXT()


Formula: =TEXT(date,"dddd")
Try it:

C) Return a specific weekday abbreviation


Formula: =INDEX({"Su","M","T","W","Th","F","Sa"},WEEKDAY(date,1))
Try it:

NOTE You will learn about INDEX() and Array Constants like {"Su","M",…} in
subsequent tips

Adding Months to a date

In our loan calculators, monthly payments are assumed to fall on the same day of the month. You can use the
EDATE function to add a number of months to a start date. If the start date is "Jan 31, 2013" and you add 1 month,
EDATE will return the last day of the month of February.

date: 1/31/2013 Formula: =EDATE(date,months)


Try it:

Calculating Ages using DATEDIF

The DATEDIF function is an undocumented function that has survived since the early days of Excel and is still very
useful for some applications, such as calculating ages.

Formula: =DATEDIF(birth_date, current_date, interval_type)

Interval Returns
"m" Total number of complete months between dates
"d" Total number of days between two dates
"y" Number of complete years between two dates
"ym" Remaining number of complete months after excluding years
"yd" Remaining number of days after excluding years
"md" Remaining number of days after excluding months

birth_date 1/1/1970 current_date 9/5/2022

AGE: 52 years, 8 months, and 4 days

ARTICLE Vertex42 Blog: Use DATEDIF to Calculate Age in Excel

Calculating the Week of the Year (i.e. "Week Number") for a given date

Many businesses and schools use the "week number" for planning and scheduling (mostly European and Asian
countries). Note that for ISO week numbering, week 1 is defined as the week containing the first Thursday, and day
1 is a Monday. When using the WEEKNUM() function for ISO week numbering, select "21" as the return_type
parameter. See the help on the WEEKNUM() function to learn more.

thedate 9/5/2022 ISO Week Num: 36 Try It:

Below is an example of a common way of displaying a date when using week numbers. There is no format code for
displaying the week number, but we can create the date string using concatenation.

Formula: =YEAR(thedate)&"-W"&WEEKNUM(thdate,21)&"-"&WEEKDAY(thedate,11)

Example of a date in "YYYY-Www-d" format: 2022-W36-1

Tip #11 Mastered

12 Formulas for working with Times ▲


Time calculations are used extensively in spreadsheets like time sheets. The examples below provide a few of the
common calculations you may need if you work with times.

To understand how time formulas work, remember that time values are stored in a cell as decimal values
representing the fraction of a day. So, 12:00pm would be stored as the number 0.5. How a time value is displayed
depends on the formatting.

SEE ALSO Data Entry Tip #7: Understand how Date and Time values are stored
PRACTICE

Use TIME and TIMEVALUE to define a time

hours minutes seconds time h:mm:ss format


5 3 25 5:03 AM 5:03:25

A) Use the TIME formula to convert hours, minutes, and seconds to a time value.
Formula: =TIME( hours, minutes, seconds)
Try It:

B) Use the TIMEVALUE formula to convert a time string to a decimal time value.
Formula: =TIMEVALUE("8:30 AM")
Try It: 0.354166666666667

C) Display the time value as a formatted time: Select the value in Step B then go to Home >
Number group and select Time from the drop-down box.

D) Split a time value into hours, minutes, and seconds using HOUR(), MINUTE(), SECOND()

date hour minute second


5:03 AM 5 3 25
Try it:

Time Conversions

Converting hours to minutes or seconds can be done through simple multiplication or division, but you can also use
the CONVERT function as in the examples below.

days hours
A) Convert days to hours 5 120 Formula: =CONVERT(ref,"day","hr")
120 Formula: =ref*24
Try It:

hours minutes
B) Convert hours to minutes 5 300 Formula: =CONVERT(ref,"hr","mn")
300 Formula: =ref*60
Try It:

How do you convert hours entered as 5.75 to a time value that can be formatted as h:mm? Just divide by 24, the
number of hours in a day. To convert minutes to a time value, divide by 1440, the number of minutes in a day. Or,
use the CONVERT function.
hours
C) Convert 5.75 hours to a time value 5.75 Formula: =CONVERT(ref,"hr","day")
Formula: =ref/24
Try It:

Adding and Subtracting Times

To add and subtract time values we just need to remember that time values are decimal fractions of a day and use
appropriate conversions.

start_time minutes end_time


1:38 PM + 20 = 1:58 PM

A) Add 45 minutes to the start_time Formula: =start_time + 45/1440


Try It:

B) Add 2 hours to the start_time Formula: =start_time + 2/24


Try It:

C) Subtract two times and convert the result to Formula: =( end_time - start_time)*1440
minutes
Try It:

Calculate the number of hours worked

The Timesheet Template on Vertex42.com uses a formula to calculate the number of hours worked based on a Time
In and Time Out. The formula handles the case where a person might work a night shift, but the formula does not
work for a time period longer than 24 hours.

TEMPLATE Time Sheet with Breaks: Calculate hours worked

Formula: =IF( (t_out < t_in), ((t_out-t_in)*24)+24, (t_out-t_in)*24 )

Time In Time Out Hours


2:04 PM 9:00 PM 6.93

Combined Date and Time values

A date is stored as an integer and a time is stored as a decimal value, so if you add them together you get a
datetime value. For example, the value for "May 8, 2013 12:00 PM" is 41402.5.

A) Enter a datetime value in the cell below by entering the date as "1/1/2013 12:00 PM"

datetime datetime number


9/5/22 7:27 AM 44809.3109787874

B) Select the datetime value and press CTRL+~ to change the number format to General.

C) Change the format of the datetime value back by press CTRL+1 to open the Format Cells dialog box. Then select
the appropriate format from either the Date or Time category in the Number tab.

SEE ALSO Formatting Tip #9: Create custom number formats

D) To separate a datetime value into a date value and a time value, use =INT(datetime) to return the date and
=MOD(datetime,1) to return the time.

datetime date value time value


9/5/22 7:27 AM 44809 0.310978738561971
Try It: Try It:

Display the current time

A) Use the NOW() function to return the current datetime value. Formula: =NOW()
Try It:

B) Return only the current time by subtracting off the date. Formula: =NOW()-TODAY()
Try It:
value: 0

CAUTION When working with times, you can't tell from just looking at a formatted cell whether a
time is JUST a time, or whether it is a datetime, because the format might not be
displaying the date.

C) To demonstrate the CAUTION note above, try entering =NOW() into the Try It cell in step B.

NOTE The TODAY() and NOW() functions are volatile functions, meaning that they update every time the
worksheet recalculates. Try pressing F9 to see the result in Step B change.

Tip #12 Mastered

13 Date formulas involving weekends and holidays ▲


The NETWORKDAYS() and WORKDAY() functions allow you to do simple date calculations that exclude weekends
and holidays. This tip is especially useful for anyone who is involved in project planning. For example, if you have a
task that you know is going to take 7 work days, how do you calculate the end date if you do not want to count
weekends or holidays?
PRACTICE

Use WORKDAY() and NETWORKDAYS() to exclude weekends and holidays

Use the WORKDAY() function to return the date that is a number of work days after the start date.

Formula: =WORKDAY(start_date, work_days, holidays)

HINT It helps to refer to a calendar as you experiment with these formulas.

A) Enter a few dates in the list of Holidays Holidays February 2013


B) Enter a start date and number of work days below 2/14/2013 Su M Tu W Th F Sa
1 2
start_date 2/11/2013 3 4 5 6 7 8 9
work days 3 10 11 12 13 14 15 16
17 18 19 20 21 22 23
C) Use WORKDAY() to calculate the end date 24 25 26 27 28
answer
Try It: 2/15/2013

D) Use the NETWORKDAYS() function to count the number of work days between two dates.

Formula: =NETWORKDAYS(start_date, end_date, holidays)


answer
start_date 2/4/2013 Try It: 9
end_date 2/15/2013

TIP If your weekend is defined as something other than "Saturday and Sunday," you can use
the WORKDAYS.INTL() and NETWORKDAYS.INTL() functions.

Formulas for Special Holidays

Some of the Vertex42 calendar templates and planners, such as the two mentioned below, have some holidays
already defined, but if you ever need to calculate the dates for holidays on your own, here are some useful
formulas.

TEMPLATE Weekly Planner: Includes many holiday calculations

TEMPLATE Perpetual Calendar: Includes common U.S. holidays

A) A holiday occuring on a specific day of the week such as "first Monday of September" (month=9, dow=2,
week=1) or "Last Sunday in March" (month=4, dow=1, week=0)
A) A holiday occuring on a specific day of the week such as "first Monday of September" (month=9, dow=2,
week=1) or "Last Sunday in March" (month=4, dow=1, week=0)

Formula: =( DATE(year,month,1) + (week-1)*7 ) + dow - WEEKDAY(DATE(year,month,1)) +


IF(dow<WEEKDAY(DATE(year,month,1)),7,0)

Holiday Definition year month week dow Date


Thanksgiving 4th Thursday of November 2013 11 4 5 11/28/2013
Mother's Day 2nd Sunday of May 2013 5 2 1 5/12/2013
Father's Day 3rd Sunday of June 2013 6 3 1 6/16/2013
Memorial Day Last Monday of May 2013 6 0 2 5/27/2013

B) A specific day of the week AFTER or ON a given date like "the Saturday after or on June 20"
Formula: =thedate+(dow-WEEKDAY(thedate,1)+IF(dow<WEEKDAY(thedate,1),7,0)

C) A specific day of the week ON or BEFORE a given date (such as Victoria Day)
Formula: =thedate-MOD(WEEKDAY(thedate,1)-dow,7)

Holiday Definition dow thedate Date


Victoria Day Monday on or before May 24 2 5/24/2013 5/20/2013

D) A day of the week in the last full week of a month.

Formula: =IF(WEEKDAY(DATE(year,month+1,0),1)=7,DATE(year,month+1,0)-(7-dow),(DATE(year,month+1,0)-
WEEKDAY(DATE(year,month+1,0),1))-(7-dow))

Holiday Definition year month dow Date


Admin Day Wednesday of last full week of April 2012 4 4 4/25/2012

Tip #13 Mastered

14 Insert and delete rows without breaking formulas ▲


If you want to use a formula in a table that references a row immediately above it, such as an automatic row
number, a running balance, or cumulative sum, the OFFSET function provides a solution that lets you insert and
delete rows without messing up the formula. To reference a cell immediately above the current cell, use
OFFSET(this_cell,-1,0,1,1). If this_cell is B7, the OFFSET function would be referencing cell B6.

The OFFSET() formula allows you to create a reference to a range of cells by defining the starting reference, an
offset number of rows and columns, and the height and width of the range. The syntax for the formula is
OFFSET(reference, offset_rows, offset_columns, height, width).
The OFFSET() formula allows you to create a reference to a range of cells by defining the starting reference, an
offset number of rows and columns, and the height and width of the range. The syntax for the formula is
OFFSET(reference, offset_rows, offset_columns, height, width).

PRACTICE

In the example tables below, the Num column is used to automatically number the transactions in a check register.
The Balance column shows the running balance as debits and credits are made to the account.

A) Look at the formulas in the cells highlighted with the gray background. Both the Num and the Balance formulas
reference a cell in the preceding row.

Without using OFFSET Using OFFSET


Num Debit Credit Balance Num Debit Credit Balance
5 Starting Balance: 50.00 5 Starting Balance: 50.00
6 50.00 6 50.00
← delete this row 7 500 550.00 7 500 550.00
8 25 525.00 8 25 525.00
9 42 483.00 9 42 483.00
10 483.00 10 483.00

B) Delete transaction # 7 by deleting the entire row. In the Table on the left you will end up with #REF! errors,
because the references that the formulas pointed to were deleted. The Table on the right survived without a
problem because it uses the OFFSET() technique.

C) Cut and Insert: Undo what you did in Step B (press CTRL+z). This time, select the entire row for transaction #7
and press CTRL+x to Cut the row. Then, insert the cut row above transaction #10 (right-click on the row number
containing transaction #10 and select Insert Cut Cells). What happens? The table on the left gets really messed up,
but the table on the right does not.

D) Copy and Insert: Undo what you did in Step C (press CTRL+z). This time, instead of pressing Ctrl+x to Cut, press
CTRL+c to Copy. Once again, the table on the left gets messed up, but the table on the right handles the process just
fine.

CAUTION The problem with the OFFSET function is that it doesn't highlight the range or cell that it is
referencing, so it can make the formula more difficult to debug.

Other ways to create robust cumulative sums

Cumulative sums are common in many financial and accounting spreadsheets, and they need to be constructed
properly so that rows can be inserted and deleted and tables can be sorted without breaking the formulas. There
are a couple other ways to create cumulative sums:

1) Using SUM() with a mixed reference like this: =SUM( A$2:A2 )


2) Using SUM(OFFSET()) like this: =SUM( OFFSET( $A$2, 1, 0, ROW(A2)-ROW($A$2), 1) )
The table below shows total Sales for a particular Date. Look at the two cumulative sum examples and then try it
yourself using the column on the right.

Cumulative Sum Examples


Date Sales SUM() SUM(OFFSET()) Try it
2/9/13 193.00 193.00 193.00
2/10/13 924.00 1117.00 1117.00
2/11/13 896.00 2013.00 2013.00
2/12/13 917.00 2930.00 2930.00
2/13/13 728.00 3658.00 3658.00
2/14/13 887.00 4545.00 4545.00
2/15/13 976.00 5521.00 5521.00

HINT Although using SUM() with a mixed reference is very simple, the green error checking triangles can
be annoying. Using SUM(OFFSET()) has the additional benefit of allowing you to insert a row above
the first row in the table.

IN PRACTICE

We use the OFFSET() technique in many of our templates to allow the user to insert or delete rows. Both the Check
Book Register and the Money Management Template below uses the OFFSET technique for the running balance.

TEMPLATE Check Book Register: Uses OFFSET for the running balance calculation

In the Money Management Template below, we use the "SUM() with mixed reference" technique to calculate a
running "Account Balance" and "Cleared Balance." In this case we are using SUMIF() instead of SUM(), but the idea
is the same. In the screenshot, you can see the formula in cell M8 that is adding all the Deposit amounts for the
"Checking" account and subtracting all the Payment values.

TEMPLATE Money Management Template: Uses SUMIF() with a mixed reference


We use the OFFSET function in the Pro version of the Gantt Chart Template for work breakdown structure (WBS)
numbering. The formula is different for different levels of tasks, but it allows you to cut/paste or copy/insert rows
without having to manually change all the WBS numbering (and to use the template you don't need to know how
the formula works). You can view the formula in the example table below.

TEMPLATE Gantt Chart Template: Uses OFFSET within a formula for WBS numbering

WBS Task
1 [Task Category]
1.1 [Task]
1.2 [Task]
1.2.1 [Task]
1.2.2 [Task]
1.2.3 [Task]

Tip #14 Mastered

15 Look up values in a list using VLOOKUP, INDEX, and MATCH ▲


Lookup formulas come in handy whenever you want to input or select a value and then have Excel automatically
return an associated price, product ID, address, or some other associated value. The VLOOKUP function can be used
when the lookup value is in the left column of your data table. The INDEX and MATCH functions can be used to do
the same thing, but provide greater flexibility.

If you like to watch videos, you can check out the following videos on microsoft.com, or just skip down to the
practice section.

VIDEO ► (Excel 2010) Training Video Series: VLOOKUP - What it is, and when to use it
(Excel 2013) Video Series: VLOOKUP - When and how to use it.

VIDEO ► Excel Help Video: Using the MATCH function in Excel

VIDEO ► Excel Help Video: The INDEX function

PRACTICE
We will use the Price List Table to the right to Price List Table
try a few lookup formulas. First, let's assume
that you want to look up a price based on the Item ID Price Product Name
Item ID. We can use the VLOOKUP function 5 34.50 Product A
because the Item ID is the left-most column in 6 52.30 Product B
the table.
7 29.30 Product C
8 87.20 Product D
9 98.10 Product E

Formula: =VLOOKUP(lookup_value, table_array, col_index_num, FALSE)


Note: For an exact match, the last argument in the VLOOKUP function should be FALSE

A) Use the VLOOKUP function to return a Price for a particular Item ID

1) Enter an Item ID in the cell to the right Item ID: 6 Price: 52.3
2) What happens when the ID is not found? Try It:

If we wanted to use the same table to look up the Item ID for a particular Product Name, we could not
use the VLOOKUP function, but we could use INDEX and MATCH.

The INDEX() function returns a value from a specific row and/or column in a range or array.

B) Use the INDEX() function to return the value in the Nth row of the Price column

Formula: =INDEX(array,row_num) row_num: 4 Price: 87.2


Try It:

The MATCH() function lets us figure out what the row number is for a specific value.

C) Which row in the Product Name column is "Product D"?

Formula: =MATCH(value,array,0) value: Product D row: 4


Try It:

D) Now we can combine the INDEX and MATCH functions to return the value in the Price
column that corresponds to a chosen Product Name

Formula: =INDEX(price_array, MATCH( product_name, product_name_array, 0) )

product_name: Product A Price: 34.5 Try It:

IN PRACTICE
TEMPLATE Sales Invoice: Uses a price list to return the Item # and Unit Price

The Sales Invoice template provides a good example of where lookup functions can be used. In this template, a user
selects an item from a drop-down list. Formulas in the Item # and Unit Price columns use lookup functions to return
the corresponding ID and price.

TEMPLATE Service Invoice: Uses a customer list to populate address fields

The Service Invoice with Customer List lets the user select a Customer ID and lookup functions populate the Bill To
address automatically by looking up the corresponding address for that Customer ID.

TEMPLATE Gradebook: Returns a letter grade from a customizable grading scale

The Gradebook templates use an INDEX-MATCH lookup to display a Grading Scale


letter grade for a given percentage score. In this case, we cannot
Percents Letters
expect an exact match, so the MATCH() function uses the "Less Than"
match type. To make this work, we must have the table of grades 0.0% F
listed in ascending order. 60.0% D-
63.0% D
66.0% D+
Formula: =INDEX(letters,MATCH(score%,percents,1)) 70.0% C-
or: =VLOOKUP(score%,table_array,2,TRUE) 73.0% C
76.0% C+
Try It: Enter a % score in the cell below. Look at the formulas in 80.0% B-
the Grade fields below.
83.0% B
86.0% B+
% Score: 83% 90.0% A-
Grade: B- uses INDEX(MATCH()) 93.0% A
Grade: B- uses VLOOKUP() 96.0% A+

TEMPLATE Paycheck Calculator: Calculates tax withholding from a tax table

The Paycheck calculator uses lookup functions to calculate federal tax


withholding from a lookup table. Enter an amount in the Taxable Gross
field below. The total withholding amount is the Base amount plus the Withholding Table
Percent times the amount in excess of the amount in the Over Over Base Percent
column. 0 0 0.0%
2200 0 10.0%
11125 892.5 15.0%
Annual Taxable Gross: $ 42,000.00 38450 4991.25 25.0%
Excess Over: $ 38,450.00 90050 17891.25 28.0%
Base Amount Withheld: $ 4,991.25 185450 44603.25 33.0%
% of Excess: 25% 400550 115586.25 35.0%
Monthly Federal Withholding: $ 489.90 402200 116163.75 39.6%

Tip #15 Mastered

REFERENCES

ARTICLES Vertex42 Blog: VLOOKUP and INDEX-MATCH Examples in Excel

16 Return the last value in a column ▲


This tip is an extension of the previous tip: "Look up values in a list using VLOOKUP, INDEX, and MATCH"

Returning the final value in a column is especially useful for spreadsheets that have running balances, where you
want to reference the final balance regardless of whether it is the smallest or largest value in the column. This can
be done using VLOOKUP or INDEX-MATCH formula.

When the lookup_value in the VLOOKUP(lookup_value, lookup_range, column_index) function is larger than all the
values in the lookup_range, the function returns the last non-blank numeric value in the lookup_range. So, to find
the last number, use a very large lookup_value, such as 9E+100.

The MATCH(lookup_value, lookup_range, match_type) function can return the row number of the last numeric
value in a lookup_range when the match_type is set to 1 (for "Less Than"). So, we do the same thing with the
MATCH function and set the lookup_value to a large number.
The following two formulas work very well and are still able to return the last numeric value even if the range
contains blanks, error values (like #N/A), and text values.

Formula: =VLOOKUP(9E+100,lookup_range,1)
Formula: =INDEX(lookup_range,MATCH(9E+100,lookup_range,1)

PRACTICE

Return the Last NUMERIC Value in a Column

A) Use the VLOOKUP formula to find that last date value in Date Debit Credit Balance
the table to the right.
1/1/2013 Starting Balance: 50.00
answer 1/2/2013 20 30.00
Try It: 1/7/2013 1/3/2013 500 530.00
1/4/2013 25 505.00
HINT VLOOKUP returns the numeric value of the 2/5/2013 42 463.00
date (the date serial number). The next step
would be to format the Try It field as a date. 1/6/2013 30 493.00
1/7/2013 ---
---
---
B) Use the INDEX-MATCH formula to find that last numeric
value in the Balance column.
answer
Try It: 493.00

The formula in step (B) is able to ignore the " --- " values in the Balance column. Select the Debit amount of 42 and
press Delete to clear the cell. Notice that even though the Balance shows an error, the formula for returning the last
numeric value still works.

We use this method to find the Current Balance in the Checkbook Register template (see the screenshot below). It
allows us to find the last numeric value in the table even though there may be some empty rows at the end of the
table.

TEMPLATE Checkbook Register: Uses VLOOKUP to return the current balance


Return the Last TEXT Value in a Column

There may be times when you want to know which row contains the last text value. We can use the same technique
we used for numbers, but instead of using the largest number, we use the largest character string. In the case of
strings, "larger" means that if you sorted the values in ascending order, the largest value would be listed last.
"zzzzzzzz" works fine in most cases, but if you have non-English characters you might need to use a string such as
"ΩΩΩΩΩ".

Formula: =VLOOKUP("zzzzzzzzzz",range,1)
Formula: =INDEX(range,MATCH("zzzzzzzzz",range,1))

The example below comes from the Meal Planner template, where we use the MATCH function to find the row of
the last text value in a customizable list.

TEMPLATE Meal Planner Template: Uses MATCH to find the last text value in a column

A) Use the VLOOKUP formula to find that last text value in the table to Dinner Salad
the right.
answer A B
Try It: Lettuce Choices
Pasta
B) Use the INDEX-MATCH formula to accomplish the same thing you Salad
did in step A.
Tacos
answer Chicken
Try It: Lettuce
Bacon
C) Look at the drop-down list above the table in the cell to the right of
Dinner. We are using the MATCH function to know how many rows to
include in the drop-down list. The formula for the data validation Lettuce
source is:

Formula: =OFFSET(A1,1,0,MATCH("zzzz",A2:A10),1)

SEE ALSO Special Tip #11: Create a drop-down list via Data Validation
Special Tip #12: Create dynamic named ranges
Tip #16 Mastered

17 Conditional sums using SUMIF and SUMIFS ▲


If you have a data table and want to add values based on some criteria, you are in luck. You do NOT need to use a
pivot table. Instead, you can use the SUMIF() or SUMIFS() functions. Use SUMIF() when you have just one
condition. Use SUMIFS() for multiple conditions.

NOTE SUMIFS() is only compatible with Excel 2007 and above.

PRACTICE

Use the Monthly Shoe Sales table below to work through some example problems. The examples show different
criteria that can be used for conditional sums.

Monthly Shoe Sales


Category Model Price Sales On Sale
Sneakers A $25 $1,200 y
Sneakers B $36 $1,300
Sneakers C $50 $1,350
Dress A $31 $1,000
Dress B $42 $1,200
Dress C $67 $1,150 y
Hiking A $36 $900
Hiking B $47 $1,500 y
Hiking C $75 $1,400

Syntax: =SUMIF(criteria_range, criteria, sum_range)


Syntax: =SUMIFS(sum_range, range_criteria1, criteria1, range_criteria2, criteria2,... )

HINT Pay attention to the order of the input values in these two formulas.

Criteria Type Question: What are the … Try It answer


String ("=string") Total sales for Sneakers? $3,850
Model
Cell Reference Total sales by Model? A $3,100

Non blank ("<>") Total sales for shoes on sale? $3,850


Comparison (">=") Total sales for shoes priced < $35 $2,200
Price >=
Total sales for shoes priced >= $50 ? 50 $3,900

Multiple Criteria Total sales for the Model C shoes


on sale
$1,150

Total sales for Model B and priced Model Price <


under $40
A 40 $3,100

Challenge: Total sales for Model B and Model C combined? $7,900


hint: SUMIF() + SUMIF()

TIP The COUNTIF() and COUNTIFS() functions are nearly identical to SUMIF() and SUMIFS(),
except that they count rather than add.
Try It answer
Count How many Hiking shoe models are there? 3

How many shoes are on sale? 3

IN PRACTICE

The Checkbook Register template uses the SUMIF() function to calculate a cleared balance. It uses the SUMIF()
+SUMIF() technique to add deposits and subtract payments where the Reconcile column is either "c" or "r". The
comparison is not case sensitive, so "C" and "R" also match. In case you haven't seen them before, the references
"Table1[R]" and "Table1[Deposit]" are called Structural References and may be used when data is formatted as a
Table. See the Data Analysis category to learn about using Tables.

TEMPLATE Checkbook Register: Uses SUMIF() to calculate a cleared balance


Tip #17 Mastered

REFERENCES

ARTICLE Vertex42 Blog: SUMIF and COUNTIF in Excel

VIDEO ► Excel Help: The SUM function

VIDEO ► Excel Help: The SUMIF function

18 Conditional sums and counts using SUMPRODUCT ▲


The SUMPRODUCT formula can be used for more than just weighted sums. It is also very useful for advanced
conditional sums and counts.

SUMIF(), SUMIFS(), COUNTIF(), and COUNTIFS() are all very useful functions, but SUMIFS() and COUNTIFS() are not
backward compatible with Excel 2003 and these functions are all limited to the use of basic conditional operators
like <, <=, >=, =, <>.

With the SUMPRODUCT() function, you can use conditional operators as well as nested functions like IF(),
ISNUMBER(), and other functions that return TRUE/FALSE.

PRACTICE

SUMPRODUCT(array1, array2, array3, ...) takes two or more equally sized arrays, multiplies the value in one array
by the corresponding value in the other arrays, and then adds all of the results. Before talking about conditional
sums and counts, let's look at how SUMPRODUCT works with a simple example.

Grade book example

TEMPLATE Grade Book Template: Uses SUMPRODUCT to calculate weighted grades

The table to the right lists the points possible for each test, Points Points
and the grade (as a percent) that a student scored on each
test. The number of points earned on a test is calculated as Type Possible Grade Earned
the product of the Points Possible and the Exam Grade (e.g. Quiz 20 80% 16
20 * 80% = 16 ). The total points earned can then be Quiz 30 85% 25.5
calculated using the SUM() function. This table
demonstrates exactly how the SUMPRODUCT() works. Exam 70 95% 66.5
Quiz 10 100% 10
Quiz 20 95% 19
20 * 80% = 16 ). The total points earned can then be
calculated using the SUM() function. This table
demonstrates exactly how the SUMPRODUCT() works.

Exam 70 75% 52.5


Total: 220 Total: 189.5
Weighted Score 86.1%
1) Calculate the Total Points Earned using SUMPRODUCT()
Try It
Formula: =SUMPRODUCT(points_array, grade_array)
answer 189.5

Conditional sums using SUMPRODUCT

The above example shows a typical use for SUMPRODUCT(). You can also use SUMPRODUCT() to create complex
SUMIF expressions. In this case, we use TRUE/FALSE criteria as arrays in our SUMPRODUCT() formulas that return
either a 0 or a 1. By multiplying the values in another array by 0 or 1, we can either include (1) or exclude (0) the
values.

Let's look at our grading example again. What if we want to Type Points Grade Condition
figure out just the Exam score (not including the Quiz
scores)? Quiz 20 80% 0
Quiz 30 85% 0
Exam 70 95% 1
All we need to do is add a third array to our Quiz 10 100% 0
SUMPRODUCT() formula that tells us whether the Type is
equal to "Exam" or not. This third array will be the Quiz 20 95% 0
conditional formula 1*(type_range="Exam") Exam 70 75% 1
Exam total: 119

HINT The purpose of multiplying (type_range="Exam") by 1 is to convert the boolean


TRUE/FALSE values to 0 or 1

2) Calculate the Points Earned for just Exams, using SUMPRODUCT()


Try It
Formula: =SUMPRODUCT(points_range, grade_range, 1*(type_range="Exam") )
answer 119

3) To review, use SUMIF to determine the total Exam points possible


Try It
Formula: =SUMIF( type_range, "=Exam", points_range )
answer 140

4) Challenge: Calculate the overall Exam score (as a percent) by dividing the total Earned
Points by the Total Points Possible

Try It answer Try It answer


Exam Score: 85.0% Quiz Score: 88.1%

Conditional COUNT using SUMPRODUCT and multiple conditions


In this example, we want to count the number of graded homework # Type Graded
assignments shown in the table. The conditional formula
1*(type="HW") will return a 1 if the type is equal to HW. The 1 HW yes
conditional formula 1*NOT(ISBLANK(graded) will return a 1 if the 2 HW yes
graded value is not blank. When both conditions are true, 1*1 = 1, so 3 Quiz yes
we can use SUMPRODUCT() to count all the cases in which both
conditions are true. 4 Exam yes
5 Quiz
6 HW yes
7 HW
8 Quiz
9 HW

5) Count the number of howework assignments that have been graded


Try It
Formula: =SUMPRODUCT( 1*(type_array="HW"), 1*NOT(ISBLANK(graded)) )
answer 3

Tip #18 Mastered

19 Intro to Arrays and Array Formulas ▲


In Excel, an Array is just a one- or two-dimensional list of values, such as {1, 2, 3; 4, 5, 6}. A range of cells may
contain an array of values, but an array does not necessarily need to be a range of cells.

Array Constants

An Array Constant can be used within a formula by enclosing the list of values in braces { }, like {1, 2, 3, 4} or
{"M","T","W"}. Many functions in Excel that require you to reference a range can also accept an Array Constant as
an input, such as =SUM( {1,2,3} ).

Array Formulas, or CSE Formulas

After entering or editing an Array Formula, you must press CTRL+SHIFT+ENTER instead of just ENTER or TAB. This
type of array formula will show curly brackets or braces { } in the Formula Bar like this: {=the_formula}. An Array
Formula is often called a "CSE formula" because of the requirement to press CTRL+SHIFT+ENTER after entering the
formula.

PRACTICE

Define and display an Array Constant


When defining an Array Constant, use commas ( , ) and semi-colons ( ; ) to separate the items in different columns
and rows. For example, {11; 22; 30} is a vertical array of numbers, and {"M","T","W"} is a horizontal array of strings.

A) Display a vertical array of numbers Try it


1) Select the 3 cells to the right
2) Enter ={1;2;3} and press Enter. What happens?
3) Repeat steps 1 and 2, but press CTRL+SHIFT+ENTER instead of Enter

B) Display a horizontal array of strings.


1) Select the 7 cells below
2) Enter ={"Su","M","Tu","W","Th","F","Sa"} and press CTRL+SHIFT+ENTER
3) What would have happened if you had only selected the first 3 cells?

Try it:

TIP Any time that you use a formula to return multiple values, you must use
CTRL+SHIFT+ENTER to display multiple values.

Use an Array Constant in a Formula

C) A very simple example of using an Array Constant in a formula is Try it


=SUM({1,2,3}). Try entering that formula in the cell to the right. Is this a CSE
formula (do you need to press CTRL+SHIFT+ENTER)?

TIP Not all formulas that use arrays are "CSE Formulas". Aggregate functions like SUM,
AVERAGE, and SUMPRODUCT do not always require you to press CTRL+SHIFT+ENTER.

Using functions that return arrays

Like the Array Constant examples above, if you use a function that returns an array, such as ROW(A1:A3), you must
use CTRL+SHIFT+ENTER to display each of the values. Otherwise, only the first value will be returned.

D) Use the ROW() function to complete the following steps Try it


1) Select the 3 cells to the right
2) Enter =ROW(A1:A3) and press Enter. What happens?
3) Repeat steps 1 and 2, but press CTRL+SHIFT+ENTER instead of Enter

E) What happens when you use the ROW() function inside the SUM() function? Try it
1) Enter =SUM(ROW(A1:A3)) in the cell to the right and press Enter
The answer will be 1 (not 1+2+3), because ROW(A1:A3) returns 1
when entered normally.
Try it
2) Repeat step 1, but press CTRL+SHIFT+ENTER instead of Enter
This time, the answer will be 6, because ROW(A1:A3) returns {1;2;3}
when you press CTRL+SHIFT+ENTER

NOTE The functions MMULT(), MINVERSE(), and TRANSPOSE() are other examples of functions
that must be entered using CTRL+SHIFT+ENTER, because they return an array of values.

F) What happens when you use the ROW() function within SUMPRODUCT()? Try it
1) Enter =SUMPRODUCT(ROW(A1:A3)) in the cell to the right.
Do you need to enter it as an array formula using CTRL+SHIFT+ENTER?

HINT SUMPRODUCT is designed to use arrays and does not require you to press
CTRL+SHIFT+ENTER unless you are nesting other formulas that DO require it, such as IF.

Conditional Averages using Array Formulas


Advanced

Before the SUMIFS, COUNTIFS, and AVERAGEIFS functions were added to Excel, array formulas were often the
solution for performing conditional averages, sums, and counts with multiple criteria. We'll use an example from
the Conditional SUM tip to demonstrate this.

Monthly Shoe Sales


Category Model Price Sales On Sale
Sneakers A $25 $1,200 y
Sneakers B $36 $1,300
Sneakers C $50 $1,350
Dress A $31 $1,000
Dress B $42 $1,200
Dress C $67 $1,150 y
Hiking A $36 $900
Hiking B $47 $1,500 y
Hiking C $75 $1,400

F) Calculate the average sale price for shoes that are on sale
Try It
Formula: =AVERAGE( IF(onsale_array="y", price_array, FALSE) )
Remember to enter this using CTRL+SHIFT+ENTER answer 15.444444
using AVERAGEIF 46.333333
How does this work?
When you enter this formula using CTRL+SHIFT+ENTER, the IF() function performs the tests
one value at a time, returning an array of values. The AVERAGE() function then averages
each of the values.
G) Calculate the average sales for the Model C shoes that are priced > $55

Formula: =AVERAGE( IF( (model_array="C")*(price_array > 55) , sales_array,


FALSE) )
answer 283.33333
using AVERAGEIFS 1275

IN PRACTICE

We use Array Constants in many of our templates like in the example above. But, we try to avoid using Array
Formulas. That is mainly because Array Formulas can make a template difficult to customize, and may confuse less
advanced users.

Tip #19 Mastered

REFERENCES

ARTICLE Vertex42 Blog: Array Formula Examples - Simple to Advanced

ARTICLE Excel Help: Guidelines and examples of array formulas

ARTICLE CPearson.com: Array Formulas

20 Use the WATCH window to monitor the value of a cell ▲


Use the Watch Window via the Formulas ribbon to see how the value on a different sheet changes as
you modify an input. This is especially useful when debugging large spreadsheets and multi-sheet
models.

TIP The watch window will stay on top regardless of which spreadsheet is active.
PRACTICE

Use the WATCH window to monitor the value of the cell to the right.
watch this
1) Click on Formulas > Watch Window > Add Watch 42
2) Select the cell to the right when prompted
3) Resize the Watch Window or the columns within the Watch
Window, if necessary.
4) Change the input value and watch the watch window. Input: 1

NOTE The watch window also tells you the name of the cell (if named), the worksheet and file
name, and displays the formula. Remember that this tip is mainly for cases where the cell
you want to watch is on a different worksheet.

HINT Try double-clicking on a row in the Watch Window. It should take you straight to the watched cell.

Tip #20 Mastered

21 Use the formula trace tool to track formulas ▲


It can be difficult to follow the logic and path of complex
formulas, especially if you are not the original author. Use
the Trace Precedents and Trace Dependents tools in the
Formulas tab to help follow the chain of references in
formulas. This can be very handy when trying to track
down errors or when trying to decide whether it is safe to
delete a cell.

In the example below, we used the Trace Precedents command after selecting the cell containing the
value 230.00. The arrows are telling us that the formula is referencing at least 3 cells. At least one of the
cells it references is on a different worksheet.

HINT All arrows will point from the Precedent cell to the Dependent cell.
PRACTICE

A) Use the Trace Precedents tool Total tips: 142


1) Select the gray cell to the right Tips completed so far: 0
2) Click on Formulas > Trace Precedents
3) How many cells does the formula reference?

TIP Double-click on an arrow to navigate to/from the referenced cells. If you double-click on the dotted
line pointing to/from the worksheet icon, you can view the list of references on the other sheet(s).

3) Double-click on the dotted line pointing from the worksheet icon


4) Select a reference in the Go To list if you want to navigate to the referenced cell

B) Use the Trace Dependents tool to find out what other cells reference a particular cell

The cell to the right is labeled as an input, but do any formulas reference it? Is it
safe to delete it without messing up the worksheet?
Input: 42
1) Select the Input cell value
2) Click on Formulas > Trace Depedents. Read the message that pops up.
3) It MIGHT be okay to remove this unnecessary input, but read the following caution.

CAUTION The Trace Dependents tool will NOT tell you if a cell is used within Data Validation or Conditional
Formatting formulas, closed workbooks, PivotTable reports, text boxes, or embedded charts.

TIP Each time you press Trace Dependents or Trace Precedents, you will get
another layer of arrows. This is helpful when trying to trace errors back to the
source.

C) Remove all arrows by clicking on Formulas > Remove Arrows

Tip #21 Mastered

REFERENCES

ARTICLE Excel Help: Display the relationships between formulas and cells
22 Handling errors in formulas (#REF!, #DIV/0!, #VALUE!, #N/A) ▲
Excel returns a number of different error values. The following are the errors that are encountered most
frequently. You can use the Evaluate Formula tool in the Formulas tab to help you debug complex formulas. To
handle errors within your formulas, you can use IF(), ISERROR(), IFERROR().

#REF! Occurs when there is something wrong with one of the cell references (such as
after deleting a cell that was referenced). Look for formulas with "#REF!" in
them to find the missing reference.

#DIV/0! Appears when dividing by zero. Use error checking to prevent this (see below).

#VALUE! Shows up whenever a value cannot be calculated. Commonly caused by using


the wrong values as arguments in built-in Excel functions.

#N/A Appears when a value is not available. Occurs when using lookup functions like
VLOOKUP(), MATCH(), and INDEX().

#NAME? Appears when Excel does not recognize a named range or function name within
a formula.

For additional details about these errors and others, check out the following article:

ARTICLE Excel Help: Detect errors in formulas

HINT Build in methods to handle errors rather than hiding them or ignoring them. Errors will cascade to
dependent formulas, causing havoc with downstream calculations.

Error Checking
To make a spreadsheet robust, you can include error checking in your formulas. Error checking can be
done by combining the functions IF() and ISERROR(), or by using IFERROR().

The following two formulas will both return 0 if myFormula returns an error. Otherwise, they will return
the value of myFormula.

Using IF() and ISERROR(): =IF( ISERROR(myFormula), 0, myFormula )

Using IFERROR(): =IFERROR(myFormula, 0)

HINT The IFERROR() function has been available since Excel 2007. It was designed to make it
unnecessary to list myFormula twice when using error handling formulas. However, it is
not backward compatible with earlier versions of Excel.
PRACTICE

A) Examples showing how a #REF! error occurs


Qty 23
1) Delete this entire row (row #1994) Price $15.00
2) What happens to the Total formula on the right? Total $345.00
Hint: Look at the Total formula to see where the #REF! appears
3) Press CTRL+z to Undo what you did in step 1

NOTE References can be messed up by cutting and pasting cells over the top of
other cells.

4) Cut (CTRL+x) and paste (CTRL+v) the cell to the right over the top of $25.00
the Price value. You should see that the Total formula again contains
a #REF! error.

B) Handling the #DIV/0! Error

TIP One of the most common places to see #DIV/0! errors are in spreadsheet-based
calculators and forms where the inputs may be initially blank.

To the right is a simple BMI (body mass index) calculator Calculate your BMI
that uses the formula BMI = W*703/H^2, where W is
pounds and H is inches.
Weight pounds

People usually don't like to see errors in their Height inches


spreadsheets, so try adding a simple error check to
display " - " instead of "#DIV/0!"
BMI #DIV/0!

Try It answer
1) Try using =IF(ISERROR(formula)," - ",formula) -

2) Try using =IFERROR(formula," - ") -

HINT You can return an empty string by using "" in the IF or IFERROR statement, but that
makes the formula cell appear to be blank. A dash " - " is often a good value to return
when handling these types of errors.

C) A #VALUE! error example


X 123
Why does the X*Y formula result in an error? Y 1O1
Hint: Is Y really a number?
Z = X+Y #VALUE!
D) An #N/A error example
Animal Count
1) Change the Target cell from "Bears" to "Zebras". Lions 23
2) What happens to the VLOOKUP formula to the right? Why? Tigers 45
Answer: "Zebras" is not in the list Bears 21

Target VLOOKUP
Bears 21

TIP You can use the NA() function to purposefully return the #N/A error.

Cascading Errors

Some formulas can handle values of different types. For example, the SUM() formula ignores text values. But, the
SUM() function does not ignore errors. Use Trace Precedents to diagnose cascading errors.

1) Enter the formula =NA() in the cell to the right A 5


What happens to the SUM() formula? B 3
C 5
2) Click on the cell containing the SUM() formula and go to D 6
Formulas > Trace Precedents.
SUM(A,B,C,D) 19

TIP Trace Precedents and Trace Dependents will show red arrows for cascading errors. This is
great for finding the root cause of the error.

3) Use the following SUMIF formula to ignore #N/A errors when


summing the values A through D
Try It
Formula: =SUMIF(range,"<>#N/A")
answer 19

Tip #22 Mastered

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
>
Printing Tips < Start < Prev Next >

Tips in this category Progress: 0%

Mastered Level
1 Control what area of the worksheet is printed - 0
2 Scale a printout to fit on a single page or one page wide - 0
3 Add headers and footers on printed pages - 0
4 Repeat specific rows on every printed page - 0
5 Print gridlines, row numbers, and column letters - 0
6 Control page breaks via Page Break Preview - 0
7 Prevent images and textboxes from printing - 0
8 Create a dynamic print area - 0

1 Control what area of the worksheet is printed ▲


For infrequent printing, you can select a range of cells and press CTRL+p then click on Print Active Sheets and select
Print Selection.

TIP Learn to use the CTRL+p shortcut for printing. In most software programs, CTRL+p
will open a print settings window.

Setting a Print Area is a more permanent solution for when you need to frequently print the same area of a worksheet.
To set a print area, select the range you want to print and go to Page Layout > Print Area > Set Print Area.

You can also use the Page Break Preview found in the View tab to set the print area. Drag the solid blue lines to change
the print area.

EXAMPLE The image below shows the Vertex42 Perpetual Calendar template in Page Break Preview
mode. Note that the area outside the print area is gray. The dotted blue lines show page
breaks.
TIP Setting a print area creates a named range called "Print_Area". You can select the
print area by press CTRL+g and selecting the named range.

TIP If you are seeing only a portion of a worksheet when printing, check the print area.

IN PRACTICE

We use the Print Area method in almost all the templates we provide. We place instructions, logos, control options,
form inputs, help links, and other information outside of a print area, so that a person can print a clean invoice or
calendar without having to include all the extraneous information and controls.

DEMO: Define the Print Area in Excel for a Calendar Template


Watch the Demo on Youtube.com

Tip #1 ✘ Mastered

REFERENCES

ARTICLE Excel Help: Set a print area on a worksheet

TEMPLATE Perpetual Calendar Template

2 Scale a printout to fit on a single page or one page wide ▲


If you do not choose a Scaling option when printing, you will likely end up with a difficult-to-read multi-page printout.
To select a common scaling option such as Fit Sheet on One Page, press CTRL+p and choose one of the options listed
under Settings.

You can also use the Page Setup dialog box to scale the print area to fit on a specific number of pages wide and tall. To
shrink the printout to fit on a single page wide, set the pages wide to 1 and leave the pages tall field blank.
Tip #2 Mastered

REFERENCES

VIDEO ► Excel Help Video: Fit all columns on a single printed page

3 Add headers and footers on printed pages ▲


You can add predefined or custom headers and footers to printed pages by going to Page Layout > Page Setup(icon) >
Header/Footer, then clicking Customer Header or Custom Footer. You can also edit headers and footers by going to
View > Page Layout. You can include auto page numbers, dates, custom text such as copyright notices and
confidentiality notices, file names and even images. Headers and Footers appear in Print Preview, Page Layout View,
and on actual printouts.

TIP Changes to Headers and Footers are only applied to the currently selected worksheets. See
Navigation Tip #11 - Select multiple worksheets at a time

HINT Select and print multiple worksheets at the same time for continuous auto page
numbers.

PRACTICE

Add page numbering to the footer of this worksheet

A) Open the Page Setup dialog box by clicking on the


icon in the corner of the Page Setup section of
the Page Layout tab.

B) Go to the Header/Footer tab and click on Custom


Footer.

C) In the right section of the footer, enter the text "Page


&[Page] of &[Pages]". Click OK twice.

D) Try this same thing by first going to View > Page Layout and clicking inside the
footer. Use the commands in the Design tab to add page numbering.

IN PRACTICE
Many Vertex42 templates use custom footers to show the name of the template, the URL of the template,
and the copyright.

TEMPLATE Weekly Planner Template: Using the footer for attribution and copyright notices

Optional: Download the Weekly Meal Planner template and add a custom header. You could include the
current date on the left, the page number and total page count on the right, and your name in the center.

Tip #3 Mastered

REFERENCES

ARTICLE Excel Help: Headers and footers in a worksheet

4 Repeat specific rows on every printed page ▲


Have a table spanning multiple pages? You can display the rows containing the table headers on each printed page by
going to Page Layout > Print Titles or Page Layout > Page Setup > Sheet. Then click in Rows to Repeat at Top and select
the rows to repeat. You can display a specific column on every page by entering the column in Columns to Repeat at
Left.

TIP Repeated rows or columns only appear in Print Preview or on printed pages.

SEE ALSO Data Entry Tip #10: Use Freeze Panes and Split screen when scrolling

EXAMPLES

The templates below have tables that may span multiple pages. You can download the templates to see how
this tip is applied.

TEMPLATE Checkbook Register Template

TEMPLATE Home Mortgage Calculator

TEMPLATE Home Inventory Spreadsheet

Tip #4 Mastered

REFERENCES
ARTICLE Excel Help: Repeat specific rows or columns on every printed page

5 Print gridlines, row numbers, and column letters ▲


Go to Page Layout and check Print under Headings or Gridlines if you want to print
the gridlines or worksheet row numbers and column letters. Toggling the gridlines on
and off this way is a lot easier than using cell formatting.

The following image shows what the print preview looks like with gridlines and headings turned on.

Tip #5 Mastered

REFERENCES

ARTICLE Excel Help: Print row and column headings on every page

6 Control page breaks via Page Break Preview ▲


Switch to Page Break Preview via the View menu to change the position of the page breaks in your worksheet. A
dashed line represents an automatic page break. A solid line represents a manual page break or the current Print Area.
Drag the lines with your mouse to move them.

TIP You can also use the Breaks command in the Page Layout
tab to insert and remove manual page breaks.

HINT Use the view modes in the bottom right of the Excel window to switch
between Normal and Page Break views.

PRACTICE
When printing this "Printing Tips" worksheet, you might want to avoid splitting a tip across two pages.
Switch to page break preview and adjust the page breaks so that each tip starts on a new page. Use Print
Preview to verify.

Tip #6 Mastered

REFERENCES

TEMPLATE Vertex42.com: Perpetual Calendar Template

ARTICLE Excel Help: Insert, move, or delete manual page breaks in a worksheet

7 Prevent images and textboxes from printing ▲


Objects such as textboxes, images, shapes and clipart can be set to either print or not print when the worksheet is
printed. Right-click on the object and go to Size and Properties > Properties to toggle the Print object checkbox on or
off. We use this tip frequently in Vertex42 templates to prevent instruction blocks from printing.

PRACTICE

Suppose you only want to print the blue shapes below (everything but the arrows). Uncheck the Print object
checkbox for all the other shapes. Then go to print preview (File > Print > Show Print Preview) and see what
happens.

HINT Select multiple objects at a time to update the properties of all the
objects at the same time.

SEE ALSO Object Tip #7: Select multiple objects

Tip #7 Mastered

8 Create a dynamic print area ▲


This is an advanced tip that requires you to know about dynamic named ranges

A Dynamic Print Area is a Print Area where the named range "Print_Area" is defined using a formula such as OFFSET().
Using a formula to define the print area allows you to change the print area based on values entered in your worksheet.
To create a dynamic print area, you first create a normal print area and then you edit the named range "print_area" like
you would any other Dynamic Named Range.
A Dynamic Print Area is a Print Area where the named range "Print_Area" is defined using a formula such as OFFSET().
Using a formula to define the print area allows you to change the print area based on values entered in your worksheet.
To create a dynamic print area, you first create a normal print area and then you edit the named range "print_area" like
you would any other Dynamic Named Range.

SEE ALSO Special Features Tip #12: Create dynamic named ranges

TIP Set the Print Area if you don't see the named range "Print_Area" in the Name Manager to
create the named range. Or just create it manually like you would any other named range.

Another way to define a dynamic print area is to use a conditional formula to define the "Print_Area" name, such as
=IF(A1="Summary",summary_range,full_range). The example below demonstrates this technique.

EXAMPLE Select the "Summary" option to the right, then press Print: Full Sheet
CTRL+p and check the print preview.

IN PRACTICE

Many Vertex42 templates use dynamic print areas to automatically adjust the print area. The free Home Mortgage
Calculator uses this tip to handle a variable-length payment schedule. The length of the print area depends on the
number of rows in the payment schedule.

TEMPLATE Home Mortgage Calculator template

Download the above template and look at the named range "Print_Area" by going to Formulas > Named
Manager. The formula that defines the print area is shown below:

=OFFSET(MortgageCalculator!$A$1,0,0,ROW(MortgageCalculator!$A$42)+1+ MortgageCalculator!
$J$13,COLUMN(MortgageCalculator!$J$2))

Tip #8 Mastered

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
Special Features < Start < Prev

Tips in this category Progress: 0%

Mastered
1 Name cells and ranges - 0
2 Create bookmarks using named cells - 0
3 Find and remove duplicate values - 0
4 Collapse and expand groups of rows - 0
5 Show the Developer tab (for macros and form controls) - 0
6 Add a Scrollbar form control to a worksheet - 0
7 Add a Check box form control to a worksheet - 0
8 Using Goal Seek to solve for a specific value - 0
9 Use What-If scenarios - 0
10 Generate random numbers - 0
11 Create a drop-down list via Data Validation - 0
12 Create dynamic named ranges - 0
13 Record a Macro and run it with a button - 0
14 Create your own keyboard shortcuts with Macros - 0
15 Create custom functions using VBA - 0
16 Creating your own Excel Add-in - 0

1 Name cells and ranges

You can define Names for cells, ranges, and formulas to use those names
within other formulas and some reference boxes. For example, if cell A95
was the input field for the interest rate in your financial model, you could
name that cell "rate" and use the name within a formula such as
=B10*rate.

The simplest way to name a cell or range is to select it and then enter the name into the Name Box and press Enter.
Use the Name Manager via the Formulas tab to view, edit, and add Names.

PRACTICE

Name a Cell or Range A


1) Select cell B1 1 rate:
2) In the Name Box, type "rate" and press Enter 2 years:
3) Select cell B2 3 PV:
4) In the Name Box, type "years" and press Enter 4
5) Select cell B3 5 FV:
6) In the Name Box, type "PV" and press Enter 6
7) In cell B5, enter the following formula: 7
=FV(rate,years,0,-PV)
8) Use the Name Manager to find and delete the Names "rate", "years", and "PV"

Name a Formula: A Name does not need to refer to a cell or range


1) Open the Name Manager, and click on New
2) In the Name field, enter "current_date"
3) In the Refers to field, enter "=TODAY()"
4) Press OK, then Close the Name Manager
5) In the cell below, enter the formula =current_date

Today's Date:

Name a Constant: A Name can be used to define a constant like 3.14159 or an array like {1;2;3;4;5}
1) Open the Name Manager, and click on New
2) In the Name field, enter: days
3) In the Refers to field, enter: ={"Su";"M";"Tu";"W";"Th";"F";"Sa"}
4) Press OK, then Close the Name Manager
5) In the cell to the right, enter the following formula Day of Week:
=INDEX(days,WEEKDAY(TODAY(),1))

How does this formula work?


i) WEEKDAY(TODAY(),1) returns a number representing the current day of the week.
If today was Thursday, WEEKDAY(TODAY(),1) would return the number 5
ii) INDEX(days,5) returns the 5th value in the array named "days"

Advanced Topic: The Scope of a Name


The Scope of a Name defines where that name can be used, either within a single worksheet, or within
the entire workbook. When you create a new Name its scope will normally be the entire workbook. If y
are going to use Names extensively, learn more about the Scope of a Name by referring to the Excel He
article below.

ARTICLE Excel Help: Learn more about using names

IN PRACTICE

TEMPLATE Home Mortgage Calculator: Uses many Named ranges and formulas

The calculations used in the Home Mortgage Calculator are fairly complicated. Using named ranges and
formulas made it easier to develop the model. The users of the template do not need to know how to
named ranges though.
The calculations used in the Home Mortgage Calculator are fairly complicated. Using named ranges and
formulas made it easier to develop the model. The users of the template do not need to know how to
named ranges though.

Tip #1 Mastered

REFERENCES

ARTICLE Excel Help: Define and use names in formulas

ARTICLE Vertex42 Blog: Dynamic Named Ranges

2 Create bookmarks using named cells

You can create a bookmark within a large spreadsheet by naming a cell.


Select the cell and then enter a name such as "bm_1" in the Name Box.
You can press CTRL+g to quickly go to a named cell.

You can also create a hyperlink to navigate to a named cell (press CTRL+k
and click on Bookmark).

SEE ALSO Navigation Tip #8: Quickly go to and select a cell or Named Range

SEE ALSO Data Entry Tip #11: Add and Remove Hyperlinks

HINT This workbook uses named ranges for creating links to different tips. For example, the link below will
take you to the cell named "tip_sp2".

Tip #2 Mastered

3 Find and remove duplicate values

To highlight unique or duplicate values in a data set, select the range and go to Conditional Formatting > Highlight C
Rules > Duplicate Values. You can remove duplicate values permanently by selecting your data and going to Data >
Remove Duplicates. Remove duplicates via filtering by going to Data > Filter > Advanced Filter, and check Unique
Records Only.

PRACTICE
We often use Remove Duplicates to create a list of unique items. In this First
example, we are trying to create a list of unique First and Last name
combinations. In the data to the right, there are duplicates for "Sally Bob
Sullivan," "John Smith," and "Fred Mayor." Highlight the data and go to John
Data > Remove Duplicates. Check both the "First" and "Last" columns so Sally
that only duplicate combinations are removed.
John
Undo (CTRL+z) and try it again. Highlight both columns again and go to Bob
Data > Remove Duplicates, but this time only check the "First" column. Sally
All duplicates of the first name will be removed, along with the
corresponding last name data. Fred
Mary
Susan
Jim
Taylor
Fred
Sam
HINT Joan
Remove Duplicates removes the duplicates and shifts the
rest of the data up. Values in adjacent columns (if Katie
selected) are also removed. Joan

REFERENCES

VIDEO ► Excel Help: Find unique values and remove duplicates

ARTICLE Excel Help: Find and remove duplicates

ARTICLE Excel Help: Filter for unique values or remove duplicate values

Tip #3 Mastered

4 Collapse and expand groups of rows

You can use the Group and Outline features via the Data tab to expand
and contract groups of rows. Select a number of rows then go to Data >
Group or Data > Ungroup to add or remove the grouping. Groups can also
be nested inside of each other. This feature is useful for temporarily hiding
details you may not need to see all the time.

TIP Columns can also be grouped. Grouping columns can be a great way to hide sections of very
large data tables.
Columns can also be grouped. Grouping columns can be a great way to hide sections of very
large data tables.

PRACTICE

Below is a mini budget for an engineering project. Notice how the Marketing and Sales items have been grouped.
Collapse the group by clicking on the [-] button to the left of the row numbers. Then, add grouping to the Developme
and Production sections.

Department/Task Budget
Marketing and Sales 57000
Direct Sales 10000
Waranty 15000
Advertising 12000
SEO/Website 20000
Development 173000
Prototyping 35000
CAD 40000
Circuit Design 28000
Programming 70000
Production 227000
Mold 120000
Tooling 42000
Welder 35000
Test Fixture 30000

HINT Quickly expand and collapse entire group levels by clicking on the
level numbers at the top of the worksheet.

REFERENCES

ARTICLE Vertex42.com: Grouping and Outlining in Excel

ARTICLE Excel Help: Outline (group) data in a worksheet

Tip #4 Mastered
5 Show the Developer tab (for macros and form controls)

Before you can insert Form Controls like scroll bars and checkboxes or
work with macros, you will need to display the Developer tab. Right-click
on the ribbon somewhere and select "Customize the ribbon." You can also
go to File > Options > Customize the ribbon. In the list of Main Tabs,
check the Developer tab.

HINT Take a look at the other things you can do to customize the
ribbon and the quick access toolbar.

Tip #5 Mastered

6 Add a Scrollbar form control to a worksheet

A Scrollbar form control can make a spreadsheet more fun to use. Instead of requiring a person to enter an input va
manually, you can create a scrollbar that links to a cell so that the value in the cell updates automatically when the
person moves the scrollbar.

PRACTICE

Play with the scrollbar below and then look at the form control properties.
1) Right-click on the scrollbar and go to Format Control.
2) In the Control tab, note that the Cell Link field references the cell labeled "Value:" below

Value: 12

▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

NOTE In addition to using the scrollbar, you can enter a number manually in the "Value:" cell

IN PRACTICE

TEMPLATE Gantt Chart Template: Uses a scrollbar to dynamically adjust a date range

Tip #6 Mastered

REFERENCES

ARTICLE Excel Help: Add a scroll bar or spin button to a worksheet

7 Add a Check box form control to a worksheet

The Checkbox form control is useful for cases where you want to provide options in your spreadsheet model. The
checkbox is linked to a cell, making that cell's value either TRUE or FALSE. You can then refer to that cell in other
formulas.

You have probably already noticed that this workbook makes use of check box form controls. The "Mastered" checkb
within each tip title links to a cell within the Progress table at the top of the worksheet. The Mastered column in the
table multiplies the TRUE/FALSE value by 1 to convert the result to 1 or 0. Conditional formatting is used to display th
"check" or "x" based on whether the cell value is 1 or 0.
HINT You can also insert Option (radio) buttons if you want to give users multiple options.

PRACTICE

To insert a check box, go to Developer > Insert > Form Control > Check Box and then click on the worksheet. After t
check box is inserted, right-click on the check box and go to Form Control > Control and pick a cell to link to the chec
box. Use this link cell in formulas and conditional formatting.

CAUTION Make sure you insert a Form Control and not an ActiveX Control (both located under Developer > Inse
ActiveX controls are normally for macros and VBA and are not as easy to use.

A) Link a check box to the following cell: 0

B) Toggle the check box you just created to see how the following examples change

Examples of Possible Uses

Used in a conditional formula monthly =IF(cell_link,"weekly","monthly")

Used in a Conditional Formatting rule 42

IN PRACTICE

TEMPLATE Savings Calculator: Uses a checkbox to toggle a randomization feature

TEMPLATE Loan Amortization Schedule: Uses a checkbox to toggle rounding on/off


Tip #7 Mastered

REFERENCES

ARTICLE Excel Help: Add a check box, option, button, or toggle button to a worksheet

8 Using Goal Seek to solve for a specific value

A formula calculates a value based on a set of inputs. What if you want to reverse the problem to make one of the
inputs the thing you solve for? Depending on your model, you may be able to use Goal Seek to do that, by going to
Data > What-If Analysis > Goal Seek.

PRACTICE

In this example, a formula is used to calculate the monthly payment based on a loan amount, interest rate, and term
What if you know the exact Monthly Payment that you can afford, and want to solve for the maximum Loan Amount
Follow the steps below to see how this is done with Goal Seek.

1) Select the Monthly Payment value


2) Go to Data > What-If > Goal Seek INPUTS
3) In the "Set cell" field, select the Monthly Payment Loan Amount
value.
Annual Interest Rate
4) In the "To value" field, enter "400" Term of Loan (in Years)
5) In the "By changing cell" field, select the Loan OUTPUTS
Amount cell.
Monthly Payment
6) Click OK. Total Interest

TIP Use the Solver for advanced optimization and when you have multiple constraints and input
variables. In Excel 2010, enable the Solver Add-In by going to Developer > Add-Ins. The Solver
command will show up in the Data ribbon.

ARTICLE Vertex42.com: Excel Solver Examples

Tip #8 Mastered

REFERENCES
ARTICLE Vertex42.com: Using Goal Seek with the Debt Reduction Calculator

ARTICLE Excel Help: Using goal seek to find the result you want by adjusting an input value

9 Use What-If scenarios

If you have a mathematical model, consider using the Scenarios feature to store and analyze different what-if scenar
rather than creating multiple copies of a worksheet. For example, you could use what-if scenarios to save different s
of inputs when you are analyzing a home mortgage. To set up a what-if scenario, go to Data > What-If Analysis >
Scenario Manager.

TEMPLATE Home Mortgage Calculator: Try using the Scenario Manager

PRACTICE

Try using the Scenario Manager with the Monthly Payment example in the previous tip. Create different scenarios fo
different payment and interest rates. We created a scenario named "Base" to help you get started. Go to Data > Wh
If Analysis > Scenario Manager to see the "Base" scenario listed.

HINT To load a scenario, simply select it in the list and click Show.

CAUTION Only input values can be saved in a scenario. Any formulas in cells chosen as inputs via the scenario
manager (listed in the "Changing Cells" field) will be replaced with a value.

Tip #9 Mastered

REFERENCES

ARTICLE Excel Help: Switch between various sets of values by using Scenarios

10 Generate random numbers

Excel has the ability to generate pseudo random numbers that can be used in simulations or other cases. The RAND(
function can be used to create random numbers each time the spreadsheet is caculated. Use RANDBETWEEN() if yo
are looking for integers between two numbers.

SEE ALSO General Tip #9: Force a recalculation using F9


NOTE Random numbers generated by a computer are called "pseudo random" because a computer
only approximates true randomness.

PRACTICE

Press F9 to see the values on the right change.

Generate a random real value between 0 and 1 Example


=RAND() 0.0623895

Generate a random integer between min_value and max_value


=RANDBETWEEN(min_value,max_value) 11

Generate a random price with 2 decimal places


=RANDBETWEEN(min_value*100,max_value*100)/100 6.68

Generate a random real value between min_value and max_value


=min_value + RAND()*(max_value - min_value) 11.715279

Generate a random number from a Gaussian (Normal) Distribution


=NORMINV(RAND(), mean, standard_dev) 13.54835

HINT After you have generated a list of random numbers, you can copy and paste just the values
using Paste > Paste Values

SEE ALSO General Tip #9: Force a recalculation using F9

Tip #10 Mastered

REFERENCES

ARTICLE Vertex42 Guide to Monte Carlo Simulation: Generating random inputs

ARTICLE Excel Help: The RANDBETWEEN() function


Excel Help: The RAND() function

11 Create a drop-down list via Data Validation

The Data Validation feature in Excel provides a way to limit the


values that can be entered into a cell. One of the options
available via Data Validation is an in-cell list, or drop-down
box. Drop-down boxes can help make a spreadsheet more
user-friendly and help prevent input errors at the same time.
The Data Validation feature in Excel provides a way to limit the
values that can be entered into a cell. One of the options
available via Data Validation is an in-cell list, or drop-down
box. Drop-down boxes can help make a spreadsheet more
user-friendly and help prevent input errors at the same time.

To create a drop-down box: Just select a cell and go to Data >


Data Validation and choose "List" from the Allow field. The
Source box is where you enter what values are allowed in the
list. The Source can be a comma-delimited list, a reference to a
range, or even a dynamic range created with a formula.

The table below summarizes when you might use the various methods for drop-down lists.

Method Best Use Source examples


Comma- Use this for very simple lists that will not change. Do not use Y,N
delimited an = sign in the Source field. yes,no
list
Jan,Feb,Mar,Apr,etc.
Cell range =$A$2:$A$5
Use this for simple spreadsheets with simple Source ranges
that won't be changing. Simply select the range you want to
use.
Dynamic The Source field does not allow all types of formulas, but the =OFFSET($A$1,1,0,10,1)
range OFFSET() function can be used.

Use named ranges when the range is on another worksheet


Named or when the ranges will be moving or changing sizes
range frequently. =My_Named_Range

The following series of videos on Microsoft.com demonstrate how to create and use a drop-down list. The practice
section below provides examples from various Vertex42 templates.

VIDEO ► Part 1 (1:01): Drop-down lists


Part 2 (4:37): Drop-down list settings
Part 3 (2:46): Input and error messages
Part 4 (6:20): Manage drop-down lists

PRACTICE

TEMPLATE Home Mortgage Calculator: Uses a drop-down list for the Payment Frequency

In the Home Mortgage Calculator template, the user can


select from a list of Payment Frequencies as shown in the
screenshot to the right.

Let's try creating a drop-down list just like this, using 3


different approaches.
In the Home Mortgage Calculator template, the user can
select from a list of Payment Frequencies as shown in the
screenshot to the right.

Let's try creating a drop-down list just like this, using 3


different approaches.

A) Create the drop-down list using a comma-delimited source. Example:


1) Select the cell to the right of Try It
2) Go to Data > Data Validation Try It:
3) Select "List" from the Allow field
4) Type the following into the Source field:
Monthly,Semi-Monthly,Bi-Weekly,Weekly

HINT Using a comma-delimited list is easy, but is useful only when the
values in the list are not likely to change.

B) Create a drop-down list by referencing a range


1) Repeat steps 1-3 from (A)
2) Click on the range selection button to the right of the Source field and
use the mouse to select the 4 cells in the Options table to the right.

The Source field will be something like =$G$535:$G$538


Try It:

C) Create a drop-down list using a named range as the Source


1) Select the 4 cells in the Options table above
2) Use the Name Box to name the range "payment_options"
3) Repeat steps 1-3 from (A)
4) Type =payment_options into the Source field (including the Try It:
equal sign)

D) Use the OFFSET formula to define the Source Example:


1) Repeat steps 1-3 from (A)
2) In the Source field, enter the formula =OFFSET(cell_ref,1,0,4,1) where
cell_ref is the reference to the cell containing the word "OPTIONS". This
defines a range that starts 1 cell below cell_ref, 0 columns to the right, 4
rows high, and 1 row wide.
Try It:

TIP Dynamic named ranges that use the OFFSET formula can be very useful for drop-down lists that can v
in length. You will learn more about them in the next tip.

SEE ALSO Special Features Tip #12: Create dynamic named ranges

IN PRACTICE
The following two spreadsheets are examples of using LOOKUP formulas to display associated values based on what
user selects from a drop-down list.

SEE ALSO Formulas Tip #15: Look up values in a list using VLOOKUP, INDEX, and MATCH

TEMPLATE Sales Invoice: Uses a price list to return the Item # and Unit Price

The Sales Invoice template lets a user select a product from a List of products in another worksheet.

TEMPLATE Service Invoice: Uses a customer list to populate address fields

The Service Invoice with Customer List lets the user select a Customer ID from a list of customers in a separate
worksheet.

Tip #11 Mastered

REFERENCES

ARTICLE Vertex42 Blog: Create a Drop-Down List in Excel

ARTICLE Vertex42 Blog: Create a Dynamic Drop-Down List for Dates and Check Numbers
12 Create dynamic named ranges
This is an Advanced Topic that requires you to be comfortable with complex formulas

A dynamic range is a reference that is defined using a formula such as OFFSET() or INDIRECT(). If you define a Name
using a dynamic range formula, you will have created a dynamic named range.

Some of the common uses for dynamic ranges are (a) customizable lists for drop-down boxes, (b) print areas that
change based on user input , and (c) charts with variable-length data sources. Some applications of dynamic ranges
require that you use Names. For example, a chart source will not let you enter a formula, but will allow you to enter
Name.

PRACTICE

APPLICATION: Customizable Drop-Down Lists

In the example to the right, the Dinner field uses a drop-down box that Dinner:
lets the user pick from a list of items. In this example, we want to let the
user add items to the list, and we want the drop-down box to update.

1
2
Currently, the drop-down list references A2:A7 (which is actually 3
$G$637:$G$642). Select the Dinner field and go to Data > Data Validation
to verify this. 4
5
6
If you enter more than two more choices (values outside the Source 7
range, shaded light blue), the drop-down list will not include them. You
could modify the Source to include more cells, but that is not very user 8
friendly. It would be better if the Source reference could update based on 9
how many items are in the list. We will look at two different methods for 10
doing this.

Method 1: Using the OFFSET() function

The OFFSET() formula allows you to create a reference to a range of cells by defining the starting reference, an offset
number of rows and columns, and the height and width of the range. The syntax for the formula is OFFSET( reference
offset_rows, offset_columns, [height], [width])

Dynamic Range Formula


Formula: =OFFSET(A2, 0, 0, COUNTA(A2:A10), 1) Dinner:

In the above formula, we are starting from cell A2 with zero offset. The height of the range is defined by counting th
number of non-blank cells within the range A2:A10 using COUNTA(A2:A10). The width of the range is just 1 column.
In the above formula, we are starting from cell A2 with zero offset. The height of the range is defined by counting th
number of non-blank cells within the range A2:A10 using COUNTA(A2:A10). The width of the range is just 1 column.

A) Add a data validation drop-down box to the cell on the right where the Try It:
Source uses the OFFSET() formula. See the example above if you have
difficulties.

HINT Instead of using COUNTA() to determine how many rows to include in the range, we could
use the MATCH() formula to return the index of the last value in the range, as explained in
Formulas Tip # 14.

SEE ALSO Formulas Tip #16: Return the last value in a column

Create a Dynamic Named Range

B) Define a Name using the same OFFSET() formula


you created in step A.
1) Go to Formulas > Name Manager > New
2) Type "my_named_range" in the Name field
3) Enter the OFFSET formula in the Refers To field
4) Click OK

C) Try using =my_named_range for the Source in


the drop-down box that you created in Step A

TIP After learning how to create a dynamic named range, you can try creating a dynamic print area, beca
a print area is just a special Named range called "Print_Area"

SEE ALSO Printing Tip #8: Create a dynamic print area

Method 2: Using the INDIRECT() function

TIP In practice, using the OFFSET() function is almost always easier than using the INDIRECT()
function for creating dynamic ranges. But in case you are curious, the example below shows
how this can be done with the INDIRECT() function.

The INDIRECT() function lets you reference a range by specifying the range as a text string such as
INDIRECT("G431:G435",1) or INDIRECT("R431C7:R435C7",0). Note that the R1C1-type reference may be easier to us
Concatenation can be used to assemble the string.

Assembling the Reference String using the R1C1-type reference


Formula: "R"&ROW(A2)&"C"&COLUMN(A2)&":R"&ROW(A2)+COUNT Example:
A(A2:A10)-1&"C"&COLUMN(A2)
Dynamic Range Formula
Formula: INDIRECT(R1C1_ref_string,0) Dinner:

IN PRACTICE

The Meal Planner template by Vertex42 provides a good example of how dynamic named ranges are used
for populating drop-down boxes. The customizable lists are a critical feature of the template.

TEMPLATE Meal Planner Template: Uses dynamic named ranges

Tip #12 Mastered

REFERENCES

ARTICLE Vertex42 Blog: Dynamic Named Ranges in Excel

13 Record a Macro and run it with a button


Advanced Topic (prerequisite: Tip #5 - Show the Developer Tab)

Macros are really simple VBA programs that can be created by recording a series of actions. They are great
for automating repetative tasks. The Microsoft support site includes a great introductory video for recording
macros. View the video below before continuing.

VIDEO SERIES: Save time by creating and running macros in Excel 2010
View the video on support.office.com

To record a macro, click on the record button in the bottom left corner. Name the
macro and press OK. At this point, Excel will record all your actions so you can repeat
them later. When finished , press on the stop record button in the bottom left corner.

TIP Excel records every action that is taken and uses absolute positioning. If you record
activation or selection tasks (like picking worksheets or cells), then those same cells will be
picked when replayed. If any of the cells are moved after recording, the macro will no longer
function correctly. To make more robust macros, additional manual programming is
required.

To use a macro, go to Developer > Macros. You can also insert a Button Form
Control by going to Developer > Insert. Pick your macro when prompted or right click
on the button and go to Assign Macro and select your macro.
To use a macro, go to Developer > Macros. You can also insert a Button Form
Control by going to Developer > Insert. Pick your macro when prompted or right click
on the button and go to Assign Macro and select your macro.

SEE ALSO Data Entry Tip #5: Show the Developer tab (for macros and form controls)

HINT Recorded macros are a great way to learn how to create more advanced VBA programs.

PRACTICE

Record a Macro to Paste Values

1) Select the cell to the right and press CTRL+c to Copy SelectMe
2) Click on Developer > Record Macro
3) Enter the macro name as "MyPasteValue"
4) Choose "New Workbook" under Store Macro In, then press OK
5) Click on Home > Paste > Values
6) Click on Developer > Stop Recording
7) Insert a Button Form Control by going to Developer > Insert
8) Choose the macro you just created, then press OK.

For practice, you can try reproducing the example shown in the video, or try recording macros to perform the follow
tasks:
A) Clear data from specific cells and ranges to reset a model or worksheet
B) Add a specific kind of autoshape - useful for flow charting
C) Perform paste special tasks - like Paste Values (see the following tip for this practice)

Tip #13 Mastered

REFERENCES

VIDEO ► Excel Help Video: Quick start - Create a macro

14 Create your own keyboard shortcuts with Macros


Advanced Topic (prerequisite: Tip #13)

Using the macro recorder, you can create a macro and assign it a custom keyboard shortcut.

CAUTION One main problem with using macros is that after running a macro, you cannot use CTRL+z to Undo t
action or any action previous to running the macro.
TIP If you want to avoid adding macros to a file (to prevent the dreaded "macro warning" that
appears when you open a file containing macros), you can store your macros in a Personal
Macro Workbook or in a New Workbook or create an Add-In, rather than adding the macro
to your current workbook.

NOTE Excel will not prevent you from overriding built in keyboard shortcuts (such as CTRL+x,
CTRL+s). Custom keyboard shortcuts will remain active as long as the workbook the macro is
stored in is open.

PRACTICE

Try assigning one of the macros you created in the previous tip, such as Paste Values, to the shortcut
CTRL+SHIFT+v.

1) Go to the Developer tab and click on Macros


2) Highlight the macro you created
3) Click on Options
4) Assign the macro to CTRL+SHIFT+v

Tip #14 Mastered

REFERENCES

VIDEO ► Excel Help Video: Quick start - Create a macro


15 Create custom functions using VBA
Advanced Topic

Excel allows you to create user-defined functions (UDFs) with VBA that you can use just like other functions
such as SUM(). To get started, open the VBA window by pressing ALT+F11 or by clicking on Visual Basic in
the Developer tab. In the VBA window, create a new module to hold your function(s) by going to Insert >
Module.

NOTE After adding VBA (macros and custom functions), you'll need to save the workbook as an
"Excel Macro-Enabled Workbook" with the extension .xlsm. When saving, go to File > Save As
and select the .xlsm file type from the "Save as Type" drop down box.

PRACTICE

Open a new workbook and insert a new VBA module into that workbook as explained above. Then, just copy
and paste the VBA code below into the new module.

Function #1: Extract the Nth element from a string

What if you had a bunch of telephone numbers in the following format: 1-800-123-4567 and
you wanted to pull out just the 3-digit prefix?

Syntax: Examples:
=GetElement(text,n,delimeter) =GetElement("1-234-567-8900",3,"-")
=GetElement("[email protected]",2,"@")
Function GetElement(text As Variant, n As Integer, delimiter As String) As String
GetElement = Split(text, delimiter)(n - 1)
End Function

Note: The argument "text" can be a reference to another cell.

A) After adding the custom function to the new workbook, try entering the example formulas
listed above.

Function #2: Return the name of the month given the number of the month

Syntax: Examples:
=MonthName(month,abbreviate) =MonthName(3)
=MonthName(3,TRUE)

Function MonthName(themonth As Long, Optional abbreviate As Boolean) As Variant


'Based upon the VBA MonthName() function. See VBA Help for details.
MonthName = MonthName(themonth, abbreviate)
End Function

B) After adding the custom function to the new workbook, try entering the example formulas
listed above.

Tip #15 Mastered

REFERENCES

ARTICLE Vertex42 Blog: How to Create Custom User Defined Functions in Excel

16 Creating your own Excel Add-in


Advanced Topic

If you want to use your custom functions or macros in multiple worksheets, you can save your VBA code in a separat
workbook and then save that workbook as an Add-in filetype (.xlam for Excel 2007+ or .xla for Excel 2003).

CAUTION The Add-in must be installed or errors will occur in the calculations. Keep this in mind when sharing
workbooks with others that rely on functions in the Add-in.

Installing the Add-in


After you have created an add-in, you need to "install" it so that it will be loaded in memory when Excel opens. Follo
these steps:

Via the Developer Ribbon


1. Make sure the add-in file is saved in a permanent location.
2. Go to the Developer tab and click on Add-ins.
3. Click on Browse and find your add-in file. Select it an press OK.
4. Find your Add-in in the list and make sure that the box next to it is checked.

Via Options
1. Go to File > Options > Add-ins
2. In the Manage drop-down box, make sure Excel Add-ins is selected and then press Go.
3. Click on Browse and find your add-in file. Select it an press OK.
4. Find your Add-in in the list and make sure that the box next to it is checked.

To uninstall the add-in, simply uncheck it in the Add-in section.

TIP You can edit your functions in your Add-in directly through the VBA Editor, because it will be loaded in
memory when installed. To save changes, just press CTRL+s while in one of the modules.

Tip #16 Mastered

REFERENCES

ARTICLE Excel Help: Manage and Install Add-ins

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
< Prev Next >

0%

Level

he Name Box and press Enter.

B D
4.56%
10
500.00
ke {1;2;3;4;5}

of the week.

n a single worksheet, or within


ly be the entire workbook. If you
me by referring to the Excel Help

ated. Using named ranges and


e do not need to know how to use
ated. Using named ranges and
e do not need to know how to use

r example, the link below will


tional Formatting > Highlight Cell
our data and going to Data >
ed Filter, and check Unique
Last
Jones
Smith
Sullivan
Smith
Warner
Sullivan
Mayor
Snow
Parks
Maples
Smith
Mayor
Fisher
Miller
Taylor
Greer

hide sections of very


hide sections of very

s items have been grouped.


dd grouping to the Development


g a person to enter an input value
ates automatically when the

d "Value:" below
he "Value:" cell

ge


our spreadsheet model. The
n refer to that cell in other

ontrols. The "Mastered" checkbox


. The Mastered column in the
formatting is used to display the
tiple options.

lick on the worksheet. After the


d pick a cell to link to the check

ocated under Developer > Insert).


o use.

k,"weekly","monthly")
sheet


problem to make one of the
l Seek to do that, by going to

mount, interest rate, and term.


or the maximum Loan Amount?

15,000
7.500%
5

$300.57
$3,034.15

constraints and input


r > Add-Ins. The Solver
nput value


nalyze different what-if scenarios
-if scenarios to save different sets
Data > What-If Analysis >

p. Create different scenarios for


u get started. Go to Data > What-

en as inputs via the scenario


ue.


ons or other cases. The RAND()
ed. Use RANDBETWEEN() if you
" because a computer

Try it

paste just the values


Source examples

Jan,Feb,Mar,Apr,etc.
=$A$2:$A$5

=OFFSET($A$1,1,0,10,1)

=My_Named_Range

drop-down list. The practice

quency
Weekly

OPTIONS
Monthly
Semi-Monthly
Bi-Weekly
Weekly

Semi-Monthly

l for drop-down lists that can vary


ociated values based on what the

MATCH

er worksheet.

customers in a separate

Numbers

DIRECT(). If you define a Name

n boxes, (b) print areas that


applications of dynamic ranges
ula, but will allow you to enter a

Pasta

A B
Choices
Pasta
Salad
Tacos
Chicken

he starting reference, an offset


e formula is OFFSET( reference,

Salad

ange is defined by counting the


h of the range is just 1 column.
ange is defined by counting the
h of the range is just 1 column.

he range, we could
nge, as explained in

ng a dynamic print area, because

ing the INDIRECT()


xample below shows

ring such as
reference may be easier to use.

R637C7:R640C7
Salad

med ranges are used


mplate.

tions. They are great


ory video for recording

f you record
e same cells will be
macro will no longer
ogramming is
ls)

d VBA programs.

macros to perform the following

his practice)

ortcut.

cannot use CTRL+z to Undo the


acro warning" that
acros in a Personal
an adding the macro

uch as CTRL+x,
workbook the macro is

o the shortcut

t like other functions


g on Visual Basic in
by going to Insert >

e workbook as an
ng, go to File > Save As

above. Then, just copy

1-800-123-4567 and

Returns:
567-8900",3,"-") 567
ef.com",2,"@") def.com
As String

example formulas

Returns:
March
Mar

ean) As Variant
s.

example formulas

ve your VBA code in a separate


r .xla for Excel 2003).

ep this in mind when sharing


mory when Excel opens. Follow

d then press Go.

tor, because it will be loaded in


e of the modules.
Comment: An example of a
comment box with a custom
format.

Practice: Change
the shape of this
comment box

Practice: Change
the background o
this comment box
15,000
7.500%
5
Comment: An example of a
comment box with a custom
format.

Practice: Change
the shape of this
comment box

Practice: Change
the background of
this comment box
Objects: Images & Shapes < Start < Prev

Tips in this category Progress: 0%

Mastered
1 Insert an image into a worksheet - 0
2 Format a picture - 0
3 Tips for creating shapes - 0
4 Tips for moving shapes - 0
5 Preventing objects from changing size and position - 0
6 Format a shape - 0
7 Select multiple objects - 0
8 Apply formatting to multiple shapes - 0
9 Change the size of an object - 0
10 Align or distribute multiple objects - 0
11 Group objects - 0
12 Connect shapes with lines - 0
13 Edit the format of a cell comment - 0
14 SmartArt basics - 0
15 Link a textbox to a cell - 0
16 Excel magic with Linked Pictures - 0

1 Insert an image into a worksheet

Sometimes you may want your spreadsheet to show a company logo or other picture. There are several ways to inse
these images. If the picture is saved on your computer, you can select Insert > Illustrations > Pictures and browse to

If the image is in a document or web page that is open on your computer, you can use copy and paste: Right-click on
the image and select "copy" or "copy image". Open your Excel document, right-click where you want the picture to b
and select "paste". You may also be able to drag and drop the image into Excel using your mouse.

Excel has access to a large supply of images (Clip Art) which you can insert by going to Insert > Illustrations > Online
Pictures and searching for a topic in the Office.com Clip Art search box. After you find a picture you like, select it and
click Insert.

CAUTION If you are using a picture or image someone else created, be sure you have their permission! Otherwi
you might be violating copyright laws.
Tip #1 ✘ Mastered

2 Format a picture

When you select a picture or image, a new Format tab appears in the ribbon, as shown in the image below. This
contextual tab (so named because it only appears when a picture is selected) has some very useful formatting
commands. We will try a few, and you can experiment with the other commands on your own.

PRACTICE

Try using the Format tab to edit these pictures. All of the images are from the Office ClipArt collection (which you
access via Insert > Online Pictures > Office.com Clip Art).

Edit this one It should look like…


Remove the background of this picture, leaving only the tiger.
You may need to mark its paws as areas to keep before you
keep the changes.

1) Select the image


2) Go to Format > Remove Background
3) Fine-tune the selection by resizing or using the
Mark Areas to Keep command
4) When you are done, click Keep Changes
5) Press Undo (CTRL+z) to try again

Crop this picture, leaving only the top-right balloon. Edit this one It should look like…

1) Select the image


2) Go to Format > Crop
3) Drag the dark lines to select the portion of the
image you want to keep.
4) When you are done, click Crop again, or click
away from the image.
When you are done, click Crop again, or click
away from the image.
4) Press Undo (CTRL+z) a few times to try again.
5) Press Redo (CTRL+y) if you pressed Undo too
many times.

NOTE You may want to experiment with other Crop options, such as Crop to Shape or
cropping to a specific Aspect Ratio.

Style this picture by applying a picture effect. Edit this one It may look like…

1) Select the image


3) Go to Format > Picture Effect, or choose one of
styles from the gallery of Picture Styles

CAUTION When you crop an image inserted into Excel, the original image can be retrieved using Format > Rese
Picture and Size. This is a potential security problem if you THINK you are removing data from the
picture that you don't want somebody to see. Even using the Format > Compress Pictures command
may not permanently delete the cropped area.

Tip #2 ✘ Mastered

REFERENCES

ARTICLE Excel Help: Change the size of a picture, shape, text box, or WordArt

3 Tips for creating shapes

Excel allows you to easily insert many different types of shapes that you
can use for text boxes, flow diagrams, buttons, or just decoration. You
can insert shapes by going to Insert > Shapes and selecting the shape from
the drop-down gallery. After you click on the shape you want, you draw
the shape by selecting a position in the worksheet and then dragging the
mouse to size the shape.

TIP Hold down the SHIFT, CTRL, and/or ALT keys as you drag
the mouse, to control the shape and size of the object.
Key Effect when creating shapes
SHIFT Maintain equal proportions or aspect ratio
CTRL Grow out from the center of the object
ALT Align the object's edges with cell gridlines

HINT You can use these shortcuts together; for example, holding down the SHIFT +
CTRL keys while sizing the object will create a shape with equal proportions AND
grow out from the center of the object

TIP Any Shape can be turned into a Text Box by simply selecting the shape and typing
some text.

PRACTICE

A) Practice inserting shapes in the boxes below

1) Insert an oval, holding down SHIFT so it ends up


being a perfect circle. You may also want to hold
down the CTRL key.

2) Hold down the ALT key as you select the position


and size of an object to try aligning the edges to
cell borders.

3) Select the lower shape and type "I LOVE EXCEL"

B) Rotate and resize a shape after inserting it

Dragging the green circle after selecting a shape allows you to rotate the object. The
other drag points allow you to resize the object. Hold down the SHIFT key as you
rotate to snap to 15 degree increments.

• Try to reproduce the example on the right. The


circle you have done before. For the second
object, insert the "Flowchart Delay" which looks
✘ Mastered
like a "D" and then rotate it. Then, drag the
corners while holding the ALT key to snap to the
corners of the cell.

Tip #3
REFERENCES

ARTICLE Excel Help: Add shapes

4 Tips for moving shapes

After you create a shape, you can move it by clicking on it and dragging it with the mouse. That may be pretty obviou
but you may not realize that you can hold down the SHIFT, CTRL, or ALT keys as you drag the shape to move
horizontally/vertically, create a copy, and align to cell borders.

Key Effect when moving shapes


SHIFT Move horizontally or vertically
CTRL Create a copy of the shape and move the copy
ALT Align the object's edges with cell borders

PRACTICE
✘ Mastered

Practice moving the shapes in the left boxes to the boxes on the right

1) While moving the oval, hold down SHIFT so it


moves horizontally into the next box

2) Hold down the CTRL key while dragging the


rectangle to the box on the right. What happens?

3) Hold down the ALT key while moving the object


into the next box. Note how the object aligns to
the cell borders.

Tip #4

REFERENCES

ARTICLE Excel Help: Move a text box, WordArt, or shape

5 Preventing objects from changing size and position

Changes in cell size can affect an object's position and size. If you do not want that to happen, right-click on the shap
and go to Format Shape to open the Format Shape dialog box. In the Properties section, specify whether the shape
should or should not "Move and size with cells".
PRACTICE
✘ Mastered
The two star shapes below respond differently when you insert, delete, or re-size the cells they are in.

Insert a row above row 212. What happens? Look at each


shape's properties to see why.

TIP When editing the object Properties, notice also that you can choose whether or
not you want the object to print.

Tip #5

6 Format a shape

When you click on a shape, the Format tab appears in the ribbon. Here,
you can edit the shape's color, rotation, and other effects. This option is
only available if the shape is selected.

Alternatively, you can right-click on a shape and select Format Shape to


adjust specific format options.

Remember that after you have formatted a shape, you can use the Format
Painter to apply its formatting to other shapes in your document.

TIP Right-click on a shape and select Set as Default Shape to set the selected shape (and its
formatting) to be your default. If you do that, any shape you insert will have the same
formatting, including colors, borders, shading and 3D effects.

PRACTICE

A) Make the shape size square so all sides of the pentagon are equal
1) Select the shape
2) Go to the Format tab and set the Height and Width to 1.2"
B) Change this shape to a different color and give it a black border
1) Go to Format > Shape Styles > Shape Fill (Fill Color). Pick the color
you want to use.
✘ Mastered
2) Go to Format > Shape Styles > Shape Outline and choose a black
border.

C) Experiment with applying shape effects


1) Go to Format > Shape Styles > Shape Effects and experiment with
options like shadowing, reflection, and 3-D rotation.
2) Go to Format > Shape Styles > Shape Effects > Soft Edge and select
10-point.
3) Go to Format > Shape Styles > Shape Effects > Presets and select
one of the presets. Note that this overrides other changes you may
have made.

Tip #6

REFERENCES

ARTICLE Excel Help: Change the size of a picture, shape, text box, or WordArt

7 Select multiple objects

There are three main ways to select multiple objects.

Method 1: Click on the first object to select it, then hold down the CTRL or SHIFT key as you select the other objects.

Method 2: Select the Arrow (the Select Objects command) from the Quick Access Toolbar, or go to Home > Editing >
Find & Select > Select Objects. Use your mouse to click and drag a selection window around the objects you want to
select, or hold CTRL or SHIFT as you select the objects with the mouse.

Method 3: Navigate to Home > Editing > Find & Select > Selection Pane, and hold CTRL as you select from the list.

PRACTICE

A) Try selecting all of the objects below using methods (1) and (2) from above. Press ESC to deselect the
objects.
✘ Mastered

TIP Remember to turn off the Select Objects command when you are done (by clicking it a second time o
pressing ESC).

B) Try selecting the objects using the Selection Pane (method 3 from above). You will probably find that this
approach is not easy if there are many shapes and objects in the worksheet.

TIP If you plan to use the Selection Pane frequently, you may want to name your objects. To
name an object, select the object then type a name in the Name Box.

Tip #7

REFERENCES

ARTICLE Excel Help: Select a shape or other object

8 Apply formatting to multiple shapes

There are two main ways to apply settings to multiple shapes. The first way is to format one object then use the For
Painter to apply the changes to other objects. The format painter is found in the Home tab in the Clipboard group.
Double-click the Format Painter icon, then click once on each object you want to apply the formatting to. When you
done, click Format Painter once to turn it off or press ESC.

The second approach is to first select all the objects you want to edit, and then make your changes. Doing this will
update all the objects at the same time.

✘ Mastered
PRACTICE

A) Use the Format Painter to format the two shapes on the right like the one on the left.
B) Select all of the objects, then change the fill color.

Tip #8

REFERENCES

ARTICLE Excel Help: Copy formatting using the Format Painter

9 Change the size of an object

You can use the mouse to select a shape and change its size, but you can also specify specific dimensions for your
shape. Right-click the shape and choose Size and Properties. You will see a panel where you can type the height and
width of your object in inches. You can also change the scale by specifying a percent (%) difference from the original
The height and width will change independently unless you check the Lock aspect ratio box.

✘ Mastered

PRACTICE

Change the size of this shape. Specify the height as 1.5" and the width as 50%. Then check the Lock aspect ratio box
and change the width to 25%.

Tip #9

REFERENCES

ARTICLE Excel Help: Change the size of a picture, shape, text box, or WordArt

10 Align or distribute multiple objects

Aligning objects makes a document appear less cluttered. People's brains are very good at detecting misalignment, s
instead of moving objects around with the mouse, use the built-in alignment commands to save time and make thing
exact.

Select the objects you want to move, then go to Format > Arrange > Align Objects. You can choose which way to ali
the objects (top, middle, bottom, left, center, right). You can also distribute them evenly (so there will be equal spac
between their edges).
Aligning objects makes a document appear less cluttered. People's brains are very good at detecting misalignment, s
instead of moving objects around with the mouse, use the built-in alignment commands to save time and make thing
exact.

Select the objects you want to move, then go to Format > Arrange > Align Objects. You can choose which way to ali
the objects (top, middle, bottom, left, center, right). You can also distribute them evenly (so there will be equal spac
between their edges).

✘ Mastered

PRACTICE

There are 5 objects below. Distribute them horizontally, then align their middles.

Tip #10

REFERENCES

ARTICLE Excel Help: Align or arrange objects

11 Group objects

Grouping objects combines them so they act as a single object. This is especially helpful when you want to move or r
size several objects and keep their relative positions. To group objects, select them, right-click, and choose Group >
Group.

PRACTICE

The set of objects on the left have not been grouped, and the set on the right have.

✘ Mastered
A) Select all of the objects at the same time (both stick men). Then, try re-sizing the entire set of objects.
What happens? Press CTRL+z to undo the change.

B) Group the set of objects that make up the stick man on the left. Then try re-sizing or moving that group of
objects.

Tip To edit a single object within a grouped object, you may not need to ungroup/edit/regroup. Instead,
select the group and then click on an object within. When the inner object is selected, the group
selection will become a dashed line.

Tip #11

REFERENCES

ARTICLE Excel Help: Group or ungroup objects

12 Connect shapes with lines

When making a flow chart, you can attach lines to shapes so that they stay joined
when you move the shapes. First, insert the shapes. Then add a line by going to Insert
> Illustrations > Shapes > Lines and selecting the line style you want to use. As you
hover the mouse over a shape, you will see small markers at the nodes where the line
Start
can be connected. Click on a node to anchor the line to that point, then drag the line
to connect it to the other shape.

Choice
The end node of a line will be a red circle if it is connected to a shape, or a white circle if it is not connected. If a line
already exists, you can select the line and then drag the end point and connect it to the node of an existing shape.

Success Fail
PRACTICE

A) Add a new line connecting the bottom node of the Choice shape to the top node of the Success shape. Try movin
the Choice shape. Does everything stay connected?

✘ Mastered
B) Drag the ends of the Elbow Connector line to connect the line to the right node of the Choice shape and the top
node of the Fail shape. Move the Fail shape. Does the line stay connected?

Tip #12

REFERENCES

ARTICLE Excel Help: Draw or delete a line, connector, or freeform shape

13 Edit the format of a cell comment

After you add a comment to a cell, you can modify the format of the comment box.
You can change the fill color, border style, and font style. You can even change the
shape of the comment or add a picture as a background. To edit the format of the
comment, right-click on the edge of the comment (when the four-arrow cursor
appears) and go to Format Comment.

PRACTICE

Change the Shape of a comment

A) First, add the "Edit Shape" command to the Quick Access Toolbar
1) Go to File > Options > Quick Access Toolbar
2) In the Choose command from box, choose All Commands.
3) Find "Edit Shape" in the list and click Add, then OK.

B) Try changing the comment in the cell to the right to a heart shape.
1) Select the comment and go to Edit Shape > Change Shape
✘ Mastered

2) Choose a shape from the drop-down list

C) Try changing the comment's background color, border, or font color.

Add a picture to a comment


D) Try adding a picture to the background of the comment on the right.
1) Select the comment and go to Format Comment > Colors
and Lines > Fill > Color > Fill Effects > Picture
2) Choose an image from you computer and click OK in both
dialog boxes.

Tip #13

REFERENCES

ARTICLE Excel Help: Add a comment

14 SmartArt basics

The SmartArt feature is a collection of professional-looking diagrams that may be easier to use than creating your ow
diagram from scratch. To add SmartArt, click Insert > Illustrations> SmartArt. After you select a diagram, Excel will
insert the diagram with some default text. You can edit the text in a text pane near the diagram or directly within the
diagram. If you do not see the text pane, go to Design > Text Pane. Your changes will appear in the diagram
immediately after you edit the text.

HINT Using the Text Pane, you can change the outline level of a piece of text by pushing TAB to
demote it and SHIFT+TAB to promote it.

PRACTICE

Experiment with the SmartArt diagram below.

1) Select the diagram


2) In the Text Pane, add another category called Shrubs. Remember: pressing SHIFT+TAB will
✘ Mastered
change it from a bullet point to its own category.
3) Try changing the layout of the diagram by going to Design > Change Layout
Tip #14

REFERENCES

VIDEO ► Excel Help: Spice up your text with SmartArt graphics

ARTICLE Excel Help: Create a SmartArt graphic

15 Link a textbox to a cell

You can link the value in a text box or shape to a cell in your workbook so
that when the value of the cell changes, the text box will update also.
Create a text box by going to Insert > Text Box. Then, select the text box
and place your cursor in the formula bar. Type an equal sign (=) in the
formula bar. Then enter the cell reference, or select the cell with the
mouse, and press Enter.

HINT This technique is commonly used to link a chart title to a cell within the
worksheet.

IN PRACTICE

Some templates on Vertex42.com use this technique to make it easy to customize visual lineups for
baseball, basketball, and soccer. See the links below.

TEMPLATES Baseball Roster Template


Basketball Roster Template
Soccer Roster Template
The Timeline Template by vertex42.com uses this technique to link the data labels in a chart to cells within
the worksheet.

TEMPLATE Timeline Template: Data labels linked to cell values

PRACTICE

Use what you have learned so far to create a 3-step process diagram
1) Align the 3 Shapes below
2) Format the Shapes to have a consistent style (Hint: Format Painter)
✘ Mastered

3) Link the text in the Shapes to the cells below: Analyze, Predict, Act
4) Adjust the alignment and size of the text within the Shapes
5) Change the text in the cells below. Does the text in the Shape change also?

Step 1: Analyze
Step 2: Predict
Step 3: Act

April 2013
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
April 2013
Su M Tu W Th F Sa
1 2 3 4 5 6
Tip #15 7 8 9 10 11 12 13
14 15 16 17 18 19 20
REFERENCES 21 22 23 24 25 26 27
28 29 30
ARTICLE Excel Help: Link a chart title or text box to a worksheet cell

TEMPLATE Soccer Roster: The Lineup tab uses this technique

16 Excel magic with Linked Pictures

Change the Date in the cell to the right. What happens? Try changing the Date: 4/25/2013
date again to make the calendar display a different month? What is going
on? How does this work?

Answer: The picture to the right is acting as a "live camera view" of a


range in a hidden worksheet. That calendar range is referencing the date
in the cell to the right. When you change the date, it updates the calendar
and the Linked Picture is also updated.

To check out the calendar in the hidden worksheet, right-click on a worksheet tab and go to Unhide and select the
calendar worksheet from the list and press OK.

Why would you ever want to do this?

Besides the fact that it is fun, here is an example: In the Daily Planner template shown below we wanted to display m
calendars at the top of the page. The column widths for the rest of the page are very different from the calendars (se
column H), so we found it easier to create the calendars in a different location and then use Linked Pictures to displa
and resize the calendars as needed at the top of the page.

TEMPLATE Daily Planner Template: Uses Linked Pictures to show mini calendars
✘ Mastered

PRACTICE

Create a Linked Picture


1
1) Select the cells to the right and press CTRL+c to Copy. 4
2) Select a cell somewhere else. 7
3) Go to Home > Paste > Other Paste Options > Linked Picture 10
13

4) Notice that the Linked Picture has no background. Right-click [somewhere else]
on the linked picture and go to Format > Picture > Fill > Solid
Fill and choose a color.

Tip #16

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
< Prev Next >

0%

Level


There are several ways to insert
tions > Pictures and browse to it.

copy and paste: Right-click on


here you want the picture to be,
our mouse.

Insert > Illustrations > Online


a picture you like, select it and

ave their permission! Otherwise,



n in the image below. This
e very useful formatting
our own.

ipArt collection (which you

It should look like…

It should look like…


It may look like…

retrieved using Format > Reset


re removing data from the
Compress Pictures command



use. That may be pretty obvious,
ag the shape to move


happen, right-click on the shape
n, specify whether the shape
cells they are in.

ed shape (and its


have the same

s you select the other objects.

lbar, or go to Home > Editing >


round the objects you want to

L as you select from the list.

SC to deselect the
(by clicking it a second time or by

probably find that this

e your objects. To


t one object then use the Format
e tab in the Clipboard group.
y the formatting to. When you are

our changes. Doing this will



pecific dimensions for your
re you can type the height and
%) difference from the original.
o box.

heck the Lock aspect ratio box


d at detecting misalignment, so
ds to save time and make things

u can choose which way to align


nly (so there will be equal space
d at detecting misalignment, so
ds to save time and make things

u can choose which way to align


nly (so there will be equal space


ul when you want to move or re-
ht-click, and choose Group >
ntire set of objects.

r moving that group of

group/edit/regroup. Instead,
ect is selected, the group

if it is not connected. If a line


e node of an existing shape.

the Success shape. Try moving


he Choice shape and the top



er to use than creating your own
u select a diagram, Excel will
e diagram or directly within the
appear in the diagram

by pushing TAB to

ng SHIFT+TAB will

al lineups for
a chart to cells within

April 2013
M Tu W Th F Sa
1 2 3 4 5 6
8 9 10 11 12 13
15 16 17 18 19 20
22 23 24 25 26 27
29 30
April 2013
M Tu W Th F Sa
1 2 3 4 5 6
8 9 10 11 12 13
15 16 17 18 19 20
22 23 24 25 26 27
29 30


4/25/2013

go to Unhide and select the

n below we wanted to display mini


ifferent from the calendars (see
n use Linked Pictures to display
2 3
5 6
8 9
11 12
14 15

[somewhere else]
Data Analysis and Tables < Start < Prev

Tips in this category Progress: 0%

Mastered
1 Introduction to Tables - 0
2 Sort your data - 0
3 Filter your data - 0
4 Use Sparklines for tiny charts in dashboards - 0
5 Highlight values that are not in a master list - 0
6 Copy a subset of data via Advanced Filters - 0
7 Randomize a data set or list - 0
8 Creating a Histogram in Excel - 0
9 Intro to PivotTables - 0
10 PivotTable Slicers - 0
11 Create a list of unique values with a PivotTable - 0

1 Introduction to Tables

The term "Table" is used a lot to talk about any data aranged in columns and rows. However, Excel actually has a Ta
feature that adds some additional functionality to your data. It makes formatting, filtering, and sorting data much ea
You just have to tell Excel to "Format the Data as a Table."

As you add more data rows under the table, they should be automatically included in
the table. If that doesn't work, you can add more data to your table by dragging down
the small triangle on the bottom-right of your table.

VIDEO ► Excel Help Videos: Use Excel tables to manage information

PRACTICE

A) Format the data at the right as a Table Date Type


1) Select the entire data table (including headers) Dec 30 Debit
and go to Home > Styles > Format as Table and
choose a table style. Dec 31 Credit
Jan 3 Debit
2) Go to Home > Styles > Format as Table and Jan 7 Debit
choose a table style
Jan 7 Debit
3) Press OK in the Format As a Table dialog box. Jan 8 Credit
Press OK in the Format As a Table dialog box.
Jan 11 Debit
Jan 12 Credit
B) Add values in the first row under the table. The table should
automatically expand to include the new data.

C) Try using the mouse to drag the arrow in the bottom right
corner of the table to the right and down.

D) Try using the filter arrows in the header rows to sort or filter
the data. Turn off the filter arrows by going to the Data tab and
clicking on the Filter button.

TIP To apply table-like formatting without using the Table feature functionality, simply apply the Table fo
and then remove the Table functionality by right-clicking on the Table and selecting Table > Convert t
Range.

When you select a cell inside a Table, a contextual Design tab will be
displayed in the ribbon. Familiarize yourself with the available options by
experimenting with some of the commands in the Table Tools Design tab.

E) Select a cell within the table to the right and use the contextual Design
tab to do the following:

1) Check the "Total Row" option Month


2) In the Total row under the Sales column, choose Jan
"Average" from the drop-down list.
Feb
3) Rename the Table by entering a new name in the Table Name Mar
field (where it currently says Table1013)
Apr
4) Check the other Table Style Options (like First column, Last May
column, etc.) and choose another Table style from the gallery
to see how the options affect the design. Jun
Jul
Aug

NOTE You can create your own custom table styles, but that is beyond the scope of this workbook.

TIP The Table feature in Excel provides a new way to reference the cells within the Table. The assumption
that a structured reference like DeptSales[SaleAmt] is easier to work with and understand than the
reference C2:C7. See the following article for more information.

ARTICLE Excel Help: Using structured references with Excel tables

Tip #1
✘ Mastered
✘ Mastered

REFERENCES

ARTICLE Excel Help: Use calculated columns in an Excel table

ARTICLE Excel Help: Create an Excel table

2 Sort your data

There are several different options when sorting data. Sorting is a feature
built into Tables and Pivot Tables, but you can also sort regular ranges,
using the buttons in the Data tab. Advanced sorting lets you sort by
multiple columns at the same time, and you can even sort by cell and font
color.

NOTE Some basic Sort and Filter commands are available via the Home tab, but for this tip, we'll use
the commands in the Data tab.

PRACTICE

In the previous tip you saw how you could sort data formatted as a Table. In this section, we'll sort a normal range of
Use the Runner Data table for the following practice problems.

A) Sort the table alphabetically by Runner Runner Data


1) Select the whole table, including the header row, Runner
but not the title
Jonathan
2) Go to Data > Sort and select "Runner" in the Sort Ramona
By drop-down box
Jaron
Andrea
HINT If your data set has headers, make sure the My Ariel
data has headers box is checked. Laura
Elmer
3) Set the sort order to A to Z, and press OK Andy

TIP Step A could have been completed by just selecting the entire table and
using the Data > Sort A to Z button, because Runner is the first column
of the data set.

B) Sort the list by Age and then by Min/mile.


1) Repeat Step A.1 above to open the Sort dialog box.
2) Select "Age" in the Sort By drop-down box
3) Click on the Add Level button to add a second sort level
4) Select "Min/mile" in the second Sort By drop-down box
5) Click OK

CAUTION Select the whole table (all columns) when you sort. Otherwise, the values in one column will be re-ord
while the others are not, corrupting your data. In some instances, Excel will suggest that you Expand
Selection if you forget.

C) The table uses conditional formatting to highlight the Min/mile values that are less than 8. As a challenge, try usin
Sort command to sort the table based on the color of the Min/mile column.

Tip #2
Mastered

REFERENCES

ARTICLE Excel Help: Sort data in a range or table

3 Filter your data

The Filter feature in Excel is great for analyzing data. You begin by first
selecting the data that you want to filter (including the header row) and
going to Data > Filter. To turn off filtering, click the Filter button again.

When filtering is turned on, each of the columns in the header


row will contain little drop-down arrows. You can use these
buttons to sort the data or select which data you want to see.
The rows containing the unselected data will be temporarily
hidden.

If a data column contains numbers, you can use Number


Filters, filtering based on the value (>,<,=). For text, Excel
provides Text Filters that allow you to look for words that start
or contain certain characters.

PRACTICE
A) Turn on the filter feature for the table. Runner
1) Select the entire table (including the header row) Jonathan
2) Click on the Data > Filter button Ramona
3) Do you see the drop-down arrows in the column headers? Jaron
Andrea
Ariel
Laura
Elmer
Andy
B) Filter the list to show only runners under the age of 21
1) Click on the down arrow next to Age
2) Unselect all the values 21 or greater
3) Alternatively, you could select Number Filters > Less Than and enter 21 and click OK

NOTE Notice that when filtering, the entire row is hidden (not just the data within the table). You
cannot have two tables right next to each other with different filters.

C) Turn off the Age filter


1) Click on the filter button next to Age and select Clear Filter from "Age".

D) Filter the list to show only runners with times greater than 7 minute miles.
1) Click on the down arrow in the Min/mile column header
2) Select Number Filters > Greater Than, enter 7 and click OK

E) Filter the list to show only runners with 6 minute miles and whose name begins with A.
1) First, for the Runner column, use Text Filter > Begins With and enter A
2) Add a filter to the Min/mile column to select only runners with 6 minute miles.

TIP Row labels will turn blue if filters are active. Columns with active filters
can be identified by the small filter icon in place of the down arrow.

TIP To clear all filters at the same time, select a cell within the data table
and go to Data > Sort & Filter > Clear. This will reset the filters to show
all data.

F) Turn off all filters in the table using the above tip

Tip #3

REFERENCES
ARTICLE Excel Help: Filter data in a range or table

4 Use Sparklines for tiny charts in dashboards

Sparklines are small, simple graphs that are easy to make, easy to understand, and small enough to fit inside a single
alongside your data. In his book, Beautiful Evidence, Edward Tufte defines sparklines as "data-intense, design-simple
word-sized graphics."

Sparklines are useful for summaries (dashboards) or anywhere else you may need a quick visual represenatation of d
The Sparkline options available in Excel are Line, Column and Win/Loss charts. The images below show examples of
of the 3 types of Sparklines.
Mastered

PRACTICE

Line Sparklines
Use Line sparklines to show trends over time. The example below shows the annual temperature fluctuations for th
different cities.

City Chart Try It


New York
Chicago
San Francisco

TIP When you compare sparklines to each other, it is important to use the same vertical axis
(meaning the same min and max values).

A) Create the sparklines from scratch.


1) Select the 3 cells under "Try It" above
2) Go to Insert > Line (in the Sparklines group)
3) In the Data Range field, select the range of values in the table to the right of the example

B) Adjust the sparklines so they use the same vertical axis scaling.
1) Select the 3 sparklines in the table above
2) Go to Design > Axis and set the Vertical Axis Minimum and Maximum to be the Same
for All Sparklines.

3) Try playing with some of the other options that are available in the Design tab, such
as showing the High Point and Low Point or changing the Style.

HINT To delete a sparkline, you cannot just select it and press the Delete key. Instead, select the
sparkline(s) and go to Design > Clear…

Column Sparklines
Column sparklines are mini column charts that are great for comparing discrete goups of data. The example below
the grade distribution for students' exams, with a different sparkline for each exam.

Exam FDCBA Try It


Shakespeare
19th Century Literature
20th Century Literature
Poetry
Take-home Essay
Final

A) Create Column sparklines from scratch


1) Select the 6 cells under "Try It" above
2) Go to Insert > Column (in the Sparklines group)
3) In the Data Range field, select the range of values in the table to the right of the example
Do the columns look reversed compared to the example?

B) Change the order of the columns from Right-to-Left


1) Select the 6 Column Sparklines you just created
2) Go to Design > Axis and select Plot Data Right-to-Left

C) Change the color of the sparkline


1) Select one of the Sparklines you just created
2) Go to Design > Sparkline Color and choose a different color.

HINT If you want to modify the design of just one of a group of Sparklines, you can first select the
Sparklines and go to Design > Ungroup.

Win/Loss Sparklines
Win/Loss sparklines are similar to Column sparklines except that they don't show magnitude - they simply show a ba
above, a bar below, or no bar and all bars are the same height regardless of value. Win/Loss charts are great for bina
data such as Yes/No, True/False, OK/Issue or even Win/Losses. The example below shows season wins for different
teams.

Team Name Win/Loss Try It


Hawks
Sharks
Bears
Tigers

HINT Win/Loss charts only look at whether the value is positive, negative or zero. Try changing the values t
right and see how the chart is affected.

A) Adjust the Win/Loss sparkline to make losses a different color


1) Click on the Sparklines
2) Go to Design > Show and check Negative Points.
3) Adjust the negative point color by going to Design > Marker Color > Negative Points.

B) Create the Win/Loss sparkline from scratch


Hint: The process is similar to what you did for the Line and Column Sparkline examples.

Tip #4

REFERENCES
ARTICLE Excel Help: Use sparklines to show data trends

VIDEO ► Excel Help: Sparklines - Use tiny charts to show data trends

5 Highlight values that are not in a master list


This is an advanced tip that requires you to know the basics of conditional formatting

SEE ALSO Formatting Tip #12: Intro to Conditional Formatting

In budget and financial spreadsheets, you may want to assign transactions or expenses to specific categories contain
master list. You Mastered
can use Conditional Formatting to identify and highlight categories that are not in the master list. Th
also a great way to find values in one table that are not in another table.

TIP Use drop-down lists via Data Validation to force users to pick from the master list.

SEE ALSO Formatting Tip #11: Create a drop-down list via Data Validation

PRACTICE

Using the sample data to the right, highlight values that are
not contained in the Master list.
Transactions
Date Payee
1) Select the cells in the Category column in the table to the 3/19/2013 Landlord
right. Do not select the column header label.
3/19/2013 Smiths
2) Go to Home > Conditional Formatting > New Rule 3/19/2013 Albertsons
3) Select Use a formula… 3/19/2013 Amazon
4) Enter the following formula (Note the relative vs. absolute 3/19/2013 USPS
references)
=ISERROR(MATCH(G379,$E$386:$E$388,0)) Master
5) Click on Format and select a background fill color Rent
Groceries
Misc

HINT The Condional Format is applied with the Formula returns TRUE. The ISERROR() function returns TRUE
MATCH() returns an error. The MATCH() function returns an error when the value is not in the Master

IN PRACTICE
We use versions of this tip in many of our templates to help users identify issues. For example, the Money Managem
Template listed below uses this technique to warn the user when budget categories are not in sync from one worksh
the next. This allows the user to customize the list of categories while alerting them if the worksheets are not in sync

TEMPLATE Money Management Template: Uses Conditional Formatting to highlight missing categories

Tip #5

6 Copy a subset of data via Advanced Filters

When analyzing data, it it sometimes nice to extract a subset of data so you can examine or modify it further. This ca
done using the Advanced Filters. The Advanced filters allow you to specify the different criteria to define the subset
data as well as a location to copy the data to. The examples below demonstrate how to use the Advanced filter.

TIP Another approach is to first filter your data. Then select the filtered data set and go to
Find & Select > Go To Special and select Visible cells only. Then you can Copy (CTRL+c) and Paste
(CTRL+v) just the visible cells.

PRACTICE
Mastered

Below is a basic practice problem to give you an idea of what Advanced Filters can do. If you need to know more, we
recommend the Excel Help link located at the bottom of this tip.

Copy just the rows where Category = Groceries

1) We have already defined the Criteria Range for Data Set


you. Note that "=Groceries" must be entered as
text, so we added an apostrophe before the "=" Date Payee
sign. 3/19/2013 Landlord
3/19/2013 Smiths
2) Highlight the entire data set (including the 3/19/2013 Albertsons
headers)
3/19/2013 Amazon
3) Go to Data > Sort & Filter group > Advanced 3/19/2013 USPS
4) In the Criteria Range field, select the headers and
the first row of the Criteria Range.
Criteria Range
5) Select Copy to Another Location and in the Copy Date Payee
to field, pick the Destination range to the right
(select an area large enough to hold the data)
Select Copy to Another Location and in the Copy
to field, pick the Destination range to the right
(select an area large enough to hold the data)

6) Press OK
Destination
If done correctly, Excel will copy one row of data
to the destination range.

TIP
Advanced filters are static and do not
automatically update when the Criteria change.
You have to rerun them each time.

7) Reset the practice problem by selecting the cells in the


Destination range and pressing the Delete key.

Copy rows where Category = Groceries AND Amount >=50

1) Update the Criteria Range by adding the criteria New Criteria Range
for Amount >= 50. It should look like the Criteria
range to the right. Date Payee

HINT For AND operations, place criteria that must


both be TRUE on the same row.

2) Rerun the advanced filter by repeating the steps above, using


the new Criteria range.

If done correctly, Excel will copy one row of data to the


destination range.

3) Reset the practice problem by selecting the cells in the


Destination range and pressing the Delete key.

Copy rows where Payee = USPS OR Payee = Amazon OR Value >500

1) Update the Criteria Range to look like the New Criteria Range
example on the right.
Date Payee
=USPS
2) Rerun the advanced filter using the new Criteria =Amazon
range.

If done correctly, Excel will copy one row of data


to the destination range.
HINT If you accidently select a blank row in the Criteria range, all the data will be copied. Give it a try.

TIP You can use this tip to make lists of unique values. Just select the Unique records only option when s
up your filter.

Using Go To Special to select Visible Cells Only

In a previous tip you learned how to filter your data in place. If Date Payee
you copy and paste that data somewhere else, the hidden
rows are still copied. You can use the following trick to copy 3/19/2013 Landlord
just the visible cells. 3/19/2013 Smiths
3/19/2013 Albertsons
3/19/2013 Amazon
SEE ALSO Data Analysis Tip #3: Filter your data 3/19/2013 USPS

1) Filter the table to the right to show only the rows with the Grocery category.
2) Select the table, including the header row
3) Go to Home > Find & Select > Go to Special and select Visible Cells Only
4) Press OK, then press CTRL+c to Copy
5) Select a location to paste the data and press CTRL+v to Paste

Tip #6

REFERENCES

ARTICLE Excel Help: Filter by using advanced criteria

ARTICLE Excel Help: Copy Visible Cells Only

7 Randomize a data set or list

You can randomize a set of data by first generating a random number for each row and then sorting the data set by t
column of random numbers. The RAND() function can be used to generate a random number between 0 and 1.

Mastered
PRACTICE

The table to the right is a list of players in a lawn darts tournament. Practice randomizing the list.
1) Enter the formula =RAND() into cells C2:C6 in the A
table. Player
1
2 John
2) Select cells A1:C6 and sort by column C (RAND) 3 Sam
4 Bob
5 Wayne
3) After randomizing, you can hide or delete the 6 Mike
random numbers.

TIP If you want to return the list to the original order without having to use Undo, include a
sequential number column in the original list so that you can Sort by that column to return the
list to its original order.

4) Return the Player list in the above example to the original


order by sorting by the Player # column.

IN PRACTICE

We use this tip to randomize names in our Gradebook Template. By randomizing, teachers can post scores with just
student ID number to maintain privacy. Download the Gradebook template and go to the Names worksheet to see t
in action.

TEMPLATE Gradebook Template: Randomize student names for privacy

Tip #7

8 Creating a Histogram in Excel

A Histogram is a very useful tool for data analysis. This isn't a workbook about applied statistics, but we will assume
you know what a histogram is. It would be great if a Histogram was a Chart type that you could select, but it isn't. Ins
you create a histogram using a Column chart. This tip explains how to create the bins (intervals) for the x-axis labels a
how to use the FREQUENCY() function to count how many data points fall into each bin.

PRACTICE

Histogram Example
Mastered
Mastered

The table to the right shows the call time for 10 different phone calls. We created a Histogram from this data
using the following steps:

1) In column A, list the data points. A


2) In column B, specify the Bins (intervals). Each 1 Call time
number represents an upper limit for the interval. 12
The first Bin will hold any value <=5 while the 2
second Bin will hold any value >5 and <=10. 3 17
4 17
5 19
3) Select the Frequency Range. Select as many cells 6 5
as you have Bins, plus one more. This extra Bin is 20
for any values >25. In this example, you'd select 7
C2:C7. 8 15
9 26
4) With these cells selected, enter the 10 8
FREQUENCY(data, bins) formula and replace data 24
and bins with the appropriate ranges. 11

HINT FREQUENCY() is an array formula. Instead of


just pressing enter, you must press
CTRL+SHIFT+ENTER.

5) Create a column chart using Bins for the


Horizontal Axis Labels and Frequency for the
Vertical Axis. Select C2:C7 and click Insert >
Charts > Column.

6) Select the chart and go to Design > Select Data


7) Click on Edit under Horizontal Axis Labels, select
B2:B7 , then press OK twice.

Recreate the Histogram

1) Select cells B2:C11 and press Delete.


2) Update the Bins to be 4, 8, 12, 16, 20, 24.
3) Recreate the FREQUENCY() formula as explained above Call Time Histogram
4
3.5
3
Frequency

2.5
2
Tip #8 1.5
1
0.5
REFERENCES 0
5 10 15 20 25
Call Time (minutes)
ARTICLE Vertex42.com: Creating a Histogram in Excel

ARTICLE Excel Help: How to use the Frequency function


ARTICLE Excel Help: Create a histogram in Excel

9 Intro to PivotTables

A PivotTable is a powerful and versatile tool for analyzing tabulated data. It allows you to quickly sum, count, averag
filter or sort dataMastered
while also cross-tabulating. The results are displayed in a summary table (the PivotTable) that can
easily manipulated and adjusted just by dragging and dropping fields. This allows you to quickly "pivot" the data as d
to gain better understanding and insights, all without cumbersome formulas.

PRACTICE

Create a simple PivotTable

1) Highlight the entire data table to the right. Image: PivotTable SideB
2) Go to Insert > Tables group > PivotTable
3) Under Choose where..., choose Existing
Worksheet and pick a cell below the data table
for the Location.

At this point, an empty PivotTable is inserted and a Sidebar should open on


the right. The sidebar allows you to assign fields to columns, rows, filters or
values and adjust other settings. You can undock the sidebar or drag it over
to the left side if necessary.
Example only

Pivot on State, Date and Amount

1) Click inside the empty PivotTable to open the sidebar.


2) Drag State to the Row Labels box. The pivot table will update
to show each of the states in the data set on separate rows.

3) Drag Date to the Column Labels box. You should see all the
dates in separate columns.
4) Drag Amount to the Values box. Values can be sums, averages, counts, stddev and
other tabulated values. The default is usually Sum or Count.
5) Look in the Values box. You should see Sum of Amount. Click on the down arrow on
the field label (in the box) then click on Value Field Settings. This will open up a
dialogue box with options for the value.

6) Change "Sum of Amount" to "Total" in the Custom Name field.


7) Click on Number Format and pick a currency format.

Group the Totals by Month

1) Click on one of the dates in the PivotTable.


2) Go to Options > Group > Group Field

NOTE In Excel 2013, the "Options" tab for PivotTables changed to "Analyze"

3) Select Month if it is not already selected, and press OK.

TIP Take a look at how the table was updated, all with just a few mouse
clicks. This is what makes PivotTables powerful.

Add Product as another row label

1) Click inside the PivotTable to open the sidebar.


2) Drag Product to the Row Labels box below State. To remove
Product, drag it out of the Row Labels box.
3) Now drag Product so it is above State in the Row Labels box.
Notice the change.
4) In the PivotTable (not the Sidebar), click on the down arrow
next to Row Labels (see the screenshot to the right). This
allows you to add filters. Filter Product so that only product
20 is shown.

Add average sales

1) Click inside the PivotTable to open the sidebar.


2) Drag Amount down to the Values box. This will create a second value field.
3) Go to Value Field Settings and modify the field to Average the data. Adjust the name
to Avg and update the Number Format to currency.

Additional Practice

This example walked you through just a few of the the things that PivotTables can do. Continue playing around
with this practice problem. Here are some things you can try:
1) Drag a field to the Report Filter box (in the sidebar)
2) Try sorting by different fields
3) Play with the grouping of data
4) Rearrange the order of row and column labels by highlighting one and dragging it
5) Add and Remove Subtotals and Totals from the Pivot Table
TIP Changing the fields in your PivotTable will change its dimensions. That may mean you'll want the Pivo
in its own worksheet so you don't worry about it overwriting text around it.

HINT If your raw data changes, you must Refresh your pivot tables. Click on the table and
go to Options > Refresh.

IN PRACTICE

For a real-world example, you could download the checkbook register template below and use a PivotTable to summ
your transactions based on Category or Payee.

TEMPLATE Check Book Register: You can use a PivotTable to transactions by Category

Tip #9

REFERENCES

ARTICLE Excel Help: Create or delete a PivotTable or PivotChart report

10 PivotTable Slicers

When you're working with PivotTables, you would normally create a filter by clicking the down arrow next to a row o
column label, or by adding a field to the Report Filter list. The new PivotTable Slicer feature in Excel provides a more
friendly way to quickly select the data you want to display.

PRACTICE
Mastered

Data Table
The data set on the right contains information about whether a Date State Customer
purchase has been billed.
1/19/12 Illinois 9823
1/22/12 Oregon 9017
1/22/12 Oregon 5478
Add a slicer to the PivotTable below to filter by Billed. 1/29/12 Illinois 6180
2/4/12 Oregon 8208
1) Select a cell in the PivotTable 2/11/12 Oregon 8223
2) Select Options > Insert Slicer 2/17/12 Colorado 7009
3) Choose Billed and press OK 2/19/12 Illinois 6461
2/23/12 New York 7440
This creates a small Slicer object that you can move around 2/24/12 Oregon 5482
your worksheet. Play around with the Slicer to understand how
it affects the PivotTable. 3/2/12 Colorado 7560
3/8/12 Colorado 7469
3/15/12 Illinois 5841

PivotTable
HINT In a Slicer box, to select more than one value, Amounts Date
hold down the CTRL key. To clear the filters,
click on the Clear Filter symbol in the top right State Jan Feb
corner of the Slicer box. Colorado $315
Illinois $906 $637
New York $428
Oregon $1,376 $1,628
Total Result $2,282 $3,008

IN PRACTICE

We occasionally use PivotTables in our templates to create easily customizable reports. For example, download the
Tracking Template and look at the Report tab. This template uses PivotTables with Slicers to create reports that can
easily adjusted by the user.

TEMPLATE Time Tracking Template: Uses PivotTables and Slicers to create configurable reports

Tip #10

REFERENCES

ARTICLE Excel Help: Use slicers to filter PivotTable data

VIDEO ► Excel Help: Use slicers to filter PivotTable data

11 Create a list of unique values with a PivotTable

You can use a PivotTable to create a list of unique values that you can refresh when your data changes. You can even
the sorting options to keep the list sorted.
Mastered
PRACTICE

Data Set
Create a unique list of Accounts using a PivotTable. Number Account
1102 Checking
1) Insert a blank PivotTable to the right of the Data 1111 Checking
Set.
1115 Checking
2) Add Account to Row Labels. Adjust the field 1121 Saving
name to Accounts.
1123 Saving
3) Right-click on the PivotTable and go to PivotTable 1124 Saving
Options > Totals & Filters. Under Grand Totals,
uncheck both options. This will remove the Total 1129 Other
line.

TIP If you change your data table, the PivotTable won't update until you go to Options > Refresh or Data
Refresh All.

IN PRACTICE

Download the Time Tracking template and look at the Projects tab. On this tab, we use two pivot charts to created s
lists of unique values. We use these lists to create drop-down lists on the TimeLog sheet.

TEMPLATE Time Tracking: the Projects tab uses PivotTables to show Projects and Tasks

SEE ALSO Formatting Tip #11: Create a drop-down list via Data Validation

Tip #11

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.

Mastered
< Prev Next >

0%

Level


wever, Excel actually has a Table
ng, and sorting data much easier.

Amount
$12
$37
$16
$45
$29
$43
$40
$29

ty, simply apply the Table format


d selecting Table > Convert to

Sales Revenue
55 $3,297
23 $1,379
25 $1,499
40 $2,398
30 $1,799
20 $1,199
15 $899
10 $600

e of this workbook.

in the Table. The assumption is


h and understand than the

t for this tip, we'll use

, we'll sort a normal range of data.

Runner Data
Age Min/mile
18 8
21 6
20 8
19 6
23 10
21 7
23 9
24 8
in one column will be re-ordered
will suggest that you Expand the

an 8. As a challenge, try using the


Age Min/mile
18 8
21 6
20 8
19 6
23 10
21 7
23 9
24 8

hin the table). You



l enough to fit inside a single cell
"data-intense, design-simple,

k visual represenatation of data.


es below show examples of each
mperature fluctuations for three

the same vertical axis

of the example

nstead, select the

f data. The example below shows


of the example

can first select the

tude - they simply show a bar


Loss charts are great for binary
ws season wins for different

ro. Try changing the values to the

ve Points.

ne examples.

o specific categories contained in a


are not in the master list. This is

aster list.

Category Amount
Rent 800.00
Groceries 52.34
Groceries 23.42
Hobby 14.99
Misc 25.00

RROR() function returns TRUE if


he value is not in the Master table.
ample, the Money Management
not in sync from one worksheet to
e worksheets are not in sync.

missing categories


e or modify it further. This can be
criteria to define the subset of
use the Advanced filter.

set and go to Home >


Copy (CTRL+c) and Paste

you need to know more, we

Category Amount
Rent 800.00
Groceries 52.34
Groceries 23.42
Hobby 14.99
Misc 25.00

Category Amount
=Groceries
Category Amount
=Groceries >=50

500

Category Amount

>500
be copied. Give it a try.

e records only option when setting

Category Amount
Rent 800.00
Groceries 52.34
Groceries 23.42
Hobby 14.99
Misc 25.00


hen sorting the data set by the
mber between 0 and 1.

g the list.
B C
Number RAND
10
12
23
34
56

ndo, include a
column to return the

ers can post scores with just a


e Names worksheet to see this tip


atistics, but we will assume that
u could select, but it isn't. Instead,
tervals) for the x-axis labels and
ogram from this data

B C
Bins Frequency
5 1
10 1
15 2
20 4
25 1
1

all Time Histogram

5 10 15 20 25
Call Time (minutes)

to quickly sum, count, average,
ble (the PivotTable) that can be
quickly "pivot" the data as desired

Image: PivotTable SideBar

Example only
ontinue playing around
ay mean you'll want the PivotTable
it.

nd use a PivotTable to summarize


down arrow next to a row or
ure in Excel provides a more user-

Billed Amount
yes $311
yes $489
no $887
yes $595
yes $555
yes $950
no $315
no $637
yes $428
no $123
no $423
yes $725
no $297

Mar Total Result


$1,148 $1,463
$297 $1,840
$428
$3,004
$1,445 $6,735

For example, download the Time


rs to create reports that can be

ble reports


r data changes. You can even use
Category
Daily Living
Checks
Fun
Rent
Emergencies
Retirement
Loans

o Options > Refresh or Data >

two pivot charts to created sorted


t.
Charts and Graphs < Start < Prev

Tips in this category Progress: 0%

Mastered
1 Intro to charts and graphs in Excel - 0
2 Bar graphs - 0
3 Column charts - 0
4 Pictographs - 0
5 Line graphs - 0
6 Pie charts and "Bar of Pie" charts - 0
7 XY graphs (Scatter Plots) - 0
8 Area charts - 0
9 Copy and paste Charts as images (Pictures) - 0
10 Use Tables to create charts - 0
11 Fitting equations to a chart - 0
12 Create a Combo chart with a secondary vertical axis - 0
13 Create a Timeline using drop lines and custom data labels - 0
14 Adding high/low reference lines to a chart - 0
15 Create a Waterfall chart using invisible stacked columns - 0
16 Create a Bullet Graph from a stacked column chart - 0

1 Intro to charts and graphs in Excel

The Microsoft Excel help site has a series of videos that provide an excellent introduction to creating charts in Excel 2
rest of the chart tips in this workbook, we will assume that you have viewed these videos. If you already have a basic
understanding of how to use and create charts in Excel, you can probably skip these videos.

VIDEO ► Excel Help Video Series: How to create basic charts in Excel 2010

VIDEO ► Excel Help: Create a chart from start to finish

TIP One of the major changes in Excel 2013 has to do with how you insert and work with charts. The tip
workbook will still apply, though some of the specific instructions may be different.

PRACTICE

To insert a chart, you will always start with a data table. Select the table to Month
the right, including the column headers, and go to Insert > Charts. Try
inserting a bar, column, area, line, pie, and scatter chart. Jan
To insert a chart, you will always start with a data table. Select the table to
the right, including the column headers, and go to Insert > Charts. Try
inserting a bar, column, area, line, pie, and scatter chart.
Feb
Mar

HINT The chart type that is best to use depends on what you are trying to
communicate. Creating good charts is both a science and an art.

In Excel 2013: If you want to preview the chart before inserting it, click the callout button. This will open a dialog box
can browse general chart types on the left and variations of that chart type across the top.

✘ Mastered
Tip #1

REFERENCES

ARTICLE Vertex42.com: Charts and Graphs in Excel - Examples of chart types and when to use them

2 Bar graphs

Use a bar graph to make visual comparisons between two or more discrete objects, events, locations, groups of peo
example, if you count the number of students in your class who are girls and the number who are boys, you could m
graph to compare the totals. One bar would represent the number of boys, and another bar would represent the nu

Students in Our Class


Students in Our Class
Girls Boys
Boys
Girls

0 2 4 6 8 10 12 14 16

TIP If you select a chart and then print (CTRL+p), you will get a print out of just the chart.

PRACTICE

Tip After you insert a chart, if it covers up the instructions below, just click and drag that
chart to move it out of the way.

A) Create a bar graph for the data to the right.


Highlight the range A2:B5 and click Insert > Charts > Bar >
Clustered Column (the first 2-D option). 1
2
Create a bar graph for the data to the right.
Highlight the range A2:B5 and click Insert > Charts > Bar >
Clustered Column (the first 2-D option).

3
B) Add a chart title (Excel 2010) 4
With the chart selected, go to Layout > Chart Title > Above
Chart. This will insert a title. 5

C) Link the chart title to cell A1.


Select the chart title, then click inside the formula bar. Press
"=", then select cell A1, and press Enter.

HINT You can manually enter the text for chart titles by selecting the chart title (or double-
clicking on it) and entering/editing the text.

Mastered

Tip #2

3 Column charts

A column chart is just a vertical bar chart. It is generally used to show data trends over time or across categories. Thi
shows the number of apples eaten by different people in a particular month. When the category labels are long nam
you can change the angle of the text as shown in the example below.

Apples Eaten This Month


15
Name
10 Jill
5 Jack
Susan
0
Adrian
Sam

ria

al
Jill

an

h
k
Jac

Set
ria

Jam

Sam
Sus

Ma
Ad

Seth
Maria
Jamal

PRACTICE

A) Create a column graph using the data to the right. Highlight the A
range A1:C13 and click Insert > Charts > Column > Clustered
Column (the first 2-D option). 1 Month
2 Jan
3 Feb
TIP If you highlight the column labels with the data, 4 Mar
Excel will automatically name the series. If you
don't highlight them, then the series names will 5 Apr
be generic. Try selecting only A2:A13 and see 6 May
what happens. 7 Jun
If you highlight the column labels with the data,
Excel will automatically name the series. If you
don't highlight them, then the series names will
be generic. Try selecting only A2:A13 and see
what happens.
8 Jul
9 Aug
B) Add or Change the chart title. Either add or change the chart 10 Sep
title to say "Fruit Eaten By Month."
11 Oct
12 Nov
HINT This chart show time trends and compares two 13 Dec
different categories of fruit.

TIP When you select a range of data and then insert a column, bar, or line chart, the left-
most column is assumed to be the list of category labels.

C) Create a stacked column graph using the same data.


Highlight the range A1:C13 and click Insert > Charts > Column>
Stacked Column (the second 2-D option).

HINT The stacked chart shows the total of all fruit eaten by month while still showing the
relative totals for Apples and Oranges. The problem with stacked charts is that it
becomes harder to compare Apples to Oranges.

C) Change the chart style. Select the chart and go to Design > Chart Styles and choose
different styles to see how the chart is affected. You can see more options by clicking on
the down arrow in the bottom right corner of the Styles section.

Mastered

Tip #3

4 Pictographs

A pictograph shows data using a series of pictures, where a picture represents a number. In the example below, one
picture of an apple represents 5 apples eaten. Pictographs can be a fun way to display information, and they are eas
Apples Eaten This Month
You first create a bar or column chart and then edit the fill options for the bars or columns.
16
14
12
10
8
6
4
2
0
Jill Jack Susan Adrian Sam Seth Maria Jamal

Apples Eaten This Mont


16
14
PRACTICE Apples Eaten This Mont
16
Convert this column chart to a pictograph, using the directions 14
below.
12
10
1) Open the Format pane. Right click on the chart's columns and
click Format Data Series. 8
6
2) Choose a picture. Select Fill > Picture or texture fill. For this
pictograph, click Clip Art (or Online in Excel 2013) and type 4
"apple" in the Clip Art search and press Go. Select a photo and 2
press OK.
0

ia
l
ck

th
Jil

ria
sa

ar
Sa

Se
Ja
Su

M
Ad
3) Stack the Apples. Select Stack and Scale with and then type 5 in
the units/picture box. This way, one apple will represent 5
apples eaten.

4) If your picture looks stretched or squished, you may need to


change the overall width and height of the chart.

Tip Pictures can say a lot more than numbers, but be careful to not misrepresent information or cause
people to make incorrect assumptions. For example, you wouldn't want to use a picture of oranges in
the apple chart, and if you are talking about a particular type of apple, the color of the apple that you
use for your picture might be important.

Tip Consider your audience, also. Pictographs might be fun for newspapers or magazines, but may not be
appropriate
Mastered for academic journal articles.

Tip #4

5 Line graphs

Use a line graph when you want to show continuous change over time. For example, you could use a line graph to sh
Temperature
change in temperature in Seattle
for the month (March
of March. 2012)
Including two lines on one graph lets you see comparisons, like in th
below which shows both the High and Low temperatures.
65
60
55 Date High (°F)
50 March 1 43
45 March 2 44
40 March 3 54
35 March 4 51
30 March 5 46
25
1 2 3 4 5 6 7 8 9 10
ch ch ch ch ch ch ch ch ch ch
ar ar ar ar ar ar ar ar ar ar
M M M M M M M M M M
45
40
35
30
25 March 6 44
1 2 3 4 5 6 7 8 9 10 March 7 48
ch ch ch ch ch ch ch ch ch ch
ar ar ar ar ar ar ar ar ar ar
M M M M M M M M M M March 8 60
March 9 49
High (°F) Low (°F)
March 10 45

PRACTICE

A) Recreate the chart above by highlighting the range A1:C11 and going to
Insert > Charts > Line > Stacked Line (second 2D option).

Create chart here A


1 Date
2 March 1
3 March 2
4 March 3
5 March 4
6 March 5
7 March 6
8 March 7
9 March 8
10 March 9
11 March 10

Tip People often associate meanings with different colors, such as red for hot and blue for cold. Be aware
of the colors you use.

B) Change the line colors


1) Right-click on the High(°F) line in your chart and click Format Data Series.
2) Select Line Color (or Fill > Line in Excel 2013)
3) Click on Solid Line and select a red color.
4) Follow steps 1-3 for the Low(°F) line and change the color to blue

C) Scale the axis


1) Right-click on the vertical axis (the temperature values) and click Format Axis.
2) Change the Minimum to 25.

D) Add or update the chart title to say "Temperatures in Seattle, March 2012".
CAUTION Unless you are using date or time values, line graphs will chart your values in the order you type them
of the X-axis value. If the X values are numbers (instead of dates or text), consider using a scatter grap

HINT You can create a line graph or a bar graph from the same data table. So what chart type should you u
cases, it might not matter, but a line graph is more appropriate for showing continuous change (like t
over time) and less appropriate when the category labels are discrete objects (like people's names in

Mastered

Tip #5

6 Pie charts and "Bar of Pie" charts

A pie chart is a circular graph where the pieces represent a percentage of a whole. For example, if you took a survey
students in your class and asked them each about their favorite pizza topping, each section would represent a differe
The topping with the most votes would have the biggest section.
Artichokes Olives
4% 4%
Anchovies
4%
Pineapple Cheese Topping
8% 23% Cheese
Bacon
8% Pepperoni
Sausage
Bacon
Pepperoni
Sausage 38% Pineapple
12% Anchovies
Artichokes
Olives

Tip Excel provides a "Bar of Pie" graph that breaks out some of the small pieces into a separate stacked b
the one below. Olives; 1
Artichokes; 1
Anchovies; 1
Pineapple; 2
Cheese; 6

Bacon; 2

Sausage; 3
Pepperoni; 10
Sausage; 3
Pepperoni; 10

HINT In the above example, the data points have been formatted to show the actual number of votes rathe
percentages. You can edit these types of options by right-clicking on the data labels and going to Form
Labels > Label Options.

PRACTICE

A) Re-create the chart above.


- Select the range A1:B9 and click Insert > Charts > Pie > Bar of Pie.

B) Add category labels.


1) Right-click on the pie area and select Add Data Labels. 1
2) Right click on the pie area again and select Format Data Labels. 2
3) Select Category Name (and uncheck Value) 3
4) Under Label Position, select Outside End or Best Fit. 4
5
C) Delete the legend and chart title. 6
- Right-click on the Legend and choose Delete. Do the same with 7
the title.
8
9
D) Customize the number of areas shown in the bar.
1) Right-click on the pie area and select Format Data Series.
2) In the Series Options tab, a box called Split Series By chooses which values
appear in the bar chart. In this case, choose Values. Then in the Values Less
Than box, type 3.

CAUTION In general, people have a hard time comparing similar areas. They are much better at comparing the
lines or bars that are right next to each other. So, if precise comparisons are important, it might be be
bar or column graph instead of a pie chart.

Mastered

Tip #6

7 XY graphs (Scatter Plots)

An XY graph (scatter plot) shows different ordered pairs on an XY axis (Cartesian coordinate system). It can be used t
in data and graph complex mathematical equations.
Y
4
2; 3
3
1; 2
2
Y
4
2; 3
3 X Y
1; 2 1 2
2
-4 3
1 -2 -3
0 X 3 -3
-5 0 5
-1
-2
3; -3 4; -3
-3
-4

In the practice below, you will see that the instructions for Excel 2010 and Excel 2013 are quite different. In Excel 201
selecting a chart, commands for adding and removing chart elements are found in the contextual Layout tab. In Exce
options are available by clicking on the "+" button next to the chart or by going to Design > Add Chart Element.

Excel 2010: The Layout tab Excel 2013: The new "+" button for Ch

PRACTICE

A) Create the Scatter chart


1) Start by selecting the range A1:B5 and going to Insert > Charts >
Scatter
1
2) Turn off the Legend (if it is shown) by selecting it and pressing 2
Delete.
3
3) Turn off the Chart Title by selecting it and pressing Delete. 4
5
6
For Excel 2010 For Excel 2013

B) Add axis titles. B) Add axis titles.


1) Go to Layout > Axis Titles > Primary Horizontal Axis Title > 1) Select the chart, then the "+" butt
Title Below Axis the Axis Titles box.
2) Go to Layout > Axis Titles > Primary Verical Axis Title > 2) Right-click on the Y-axis title and g
Horizontal Title Axis Title.
3) Name the axes "X" and "Y" 3) Click on the Size and Properties ico
change the Text Direction to Horizon
C) Rearrange the axis titles. 4) Name the axes "X" and "Y"
Click and drag to move the X to the right side of the chart and
the Y to the top of the chart. You may need to resize the inner C) Same as for Excel 2010
plot area.

D) Add data labels.


D) Add data labels. 1) Select the chart, then go to Design
1) Select the chart and go to Layout > Data Labels > Above. Element > Data Labels > More Data
This will add the Y data label.
2) Go to Layout > Data Labels > More Data Label Options 2) Under Label Options, check both t
and select the X value. and the Y Value boxes.

E) Add vertical gridlines and adjust the spacing E) Add vertical gridlines and adjust the
1) Go to Layout > Gridlines > Primary Vertical Gridlines and 1) Select the chart, then the "+" butt
choose Major & Minor Gridlines. on the arrow next to the Gridlines ch
select all 4 boxes.
2) Right-click on the horizontal axis and choose Format Axis.
2) Right-click on the horizontal axis (
3) Set the Major unit fixed value to 5 and the Minor unit choose Format Axis.
fixed value to 1. 3) Set the Major Unit to 5 and the M
1. Do the same for the Y-axis.

IN PRACTICE

Spirograph

The spirograph spreadsheet on vertex42.com is an example of the types of complex


graphs that can be created using an XY scatter plot. A scatter plot can show straight or
smoothed lines connecting the individual points.

Template Spirograph: Created using an XY scatter plot


Tip #7 Mastered

8 Area charts

Stacked area charts and stacked column charts show changing proportions over time. The height of each area, as we
height of all the areas, may change.

For example, let's say that a teacher offered the same pizza topping survey to each of her classes over a period of 10
than making a series of pie charts to display the results, she could use a single area chart like the one below.

Votes for Favorite Pizza Toppings


25
Votes for Favorite Pizza Toppings
2007 2008
20 BBQ Cheese 8 5
Bacon
15
Sausage
Pepperoni 4 6
Pepperoni Sausage 2 0
10
Cheese Bacon 1 3
5 BBQ 3 4
0
2007 2008 2009 2010

HINT Organize your data so each column (or row) of data could be its own pie chart.

TIP Depending on how you organize the table, sometimes you'll need to switch the axes of the chart. To d
the chart, then in the ribbon click Design > Switch Row/Column.

PRACTICE

Re-create the area chart shown above.

1) Select the entire table to the right, including the 2001 2002
header row, and go to Insert > Charts > Area >
Stacked Area. Cheese 6 7
Pepperoni 11 8
Sausage 3 2
2) Switch the axes of the chart by going to Design > Bacon 2 1
Switch Row/Column.
BBQ 0 1

3) Move the legend. Try moving the Legend around the graph to
the top or bottom. Right click on the Legend and select Format
Legend, or go to Layout > Legend.
Move the legend. Try moving the Legend around the graph to
the top or bottom. Right click on the Legend and select Format
Legend, or go to Layout > Legend.

4) Add and/or edit the chart title.

Mastered
Tip #8

9 Copy and paste Charts as images (Pictures)

It's often helpful to save a chart or graph as an image (or "picture"). You may want to take a snapshot of a chart at so
time to compare it to the live chart. Or, you may want to paste the chart into some other document.

When you use the normal Copy and Paste commands (CTRL+c and CTRL+v) to paste a chart directly into a Word or P
document, the chart is pasted as an object containing all of the underlying data. This can greatly increase the size of
document and may potentially put confidential information at risk. Unless you absolutely need the live data in the d
consider copying only the image.

TIP This tip also works for pasting ranges (tables) as pictures.

Hint The resolution of the image is set by the size of the original chart. If you need a high resolution image
size of the chart before creating the image.

PRACTICE

There are two main ways to create images from charts or tables. The first is to copy the chart or table like normal, an
Paste Special to Paste as a Picture. That method won't work outside of Microsoft Office. So, the second method is to
Picture.

Temperature in Seattle (March 2012) Date


65 March 1
60 March 2
55 March 3
50 March 4
45
March 5
40
March 6
35
March 7
30
25 March 8
1 2 3 4 5 6 7 8 9 10
March 9
ch ch ch ch ch ch ch ch ch ch
ar ar ar ar ar ar ar ar ar ar
M M M M M M M M M M

High (°F) Low (°F)


35
30
25
1 2 3 4 5 6 7 8 9 10
ch ch ch ch ch ch ch ch ch ch
ar ar ar ar ar ar ar ar ar ar March 10
M M M M M M M M M M

High (°F) Low (°F)

Method 1: Copy the chart and Paste as a Picture

1) Select the chart and press CTRL+c to Copy


2) Select a destination (another worksheet or another cell)
3) Go to Home > Paste > Picture, as shown in the screenshot

NOTE If you select Paste Special, you can select what type of image to paste
(PNG, JPEG, GIF, or Enhanced Metafile)

TIP When pasting as a picture, the Enhanced Metafile option is usually your
best option, especially if you are wanting the chart to look good on a high
quality printer.

Method 2: Copy as a Picture

1) Select the chart


2) Go to Home > Copy as Picture as shown in the image to the right
3) Select "As shown on screen" and "Picture"
4) Select a destination
5) Paste the image using CTRL+v

Tip #9 Mastered

REFERENCES

Link Instructions for copying charts as images prior to Excel 2007

10 Use Tables to create charts

Try creating your chart from data formatted as a Table. When you add data to the Table, it will be added to the char
is one of the benefits of using the Table feature.

SEE ALSO Data Analysis Tip #1: Introduction to Tables


PRACTICE

The chart below was created from the table on the right. Expand the table by
clicking the triangle in its bottom-right corner and dragging it to include all
the rows of data. Notice how the graph automatically expands to include the
new data.

Blood Pressure in April Date SBP


140 4/11 120
120 4/12 128
4/13 118
100
4/14 120
80
4/15 130
60 4/16 118
4/10 4/12 4/14 4/16
4/17 120
SBP DBP
4/18 128

HINT Try adding a row of data below the table. Notice how the
table and graph expand to include the data.

Mastered
Tip #10

11 Fitting equations to a chart

Scatter plots in Excel allow you to automatically add curve-fitting lines to your data (called "Trendlines" in Excel). Yo
from several types of equations to see which line is the closest match to your data. This technique is used frequently
and engineers who may be analyzing data to create a predictive model. This tip will not discuss curve-fitting in gener
show you how to add a simple Trendline in Excel.

PRACTICE

30
Use the scatter plot to the right to experiment with adding a
Trendline to fit an equation to the data.
25

20

15
30

25

1) Select one of the data points in the chart.


20
2) Go to Layout > Trendline and pick one of the options that
you think might fit best. In Excel 2010, turn on a Trendline via
the "+" button next to the chart. 15

10
Display the equation on the chart
5
1) After you have created a Trendline, right-click on the
Trendline and select Format Trendline.
2) Check the Display Equation on Chart option. 0
0 1 2 3 4 5 6

X
Extend your chart to include more data
1
1) Select one of the data points in the chart. You should see colored boxes 2
highlighting the cell ranges used for the Chart Series. 3
2) Drag the bottom corner of the colored boxes down to include the bottom 4
row. Is the curve you chose still a good fit? 5
6
7

CAUTION There is much more to curve-fitting and creating predictive models than just choosing a best-fit
equation, but at least you can see how easy it is to fit a curve to data with Excel.

Mastered
Tip #11

12 Create a Combo chart with a secondary vertical axis

A Combination Chart is a chart that combines more than one chart type (like a Bar Graph and a Line Graph). To creat
combination chart, you can start by creating a clustered column chart and then selecting one of the data series and g
Design > Change Chart Type.

Combination charts are often used to show two related data sets that have very different Y-axis scales.

For example, the chart below (known as a "Pareto Chart") uses a bar graph to show the number of defects for differ
ordered from largest to smallest. A second data series is displayed as a line graph showing the cumulative total as a
The line graph uses a secondary axis (the axis on the right side) because the percentages range from 0% to 100%, wh
for the number of defects ranges from 0 to 50.

Causes of the Defects


Causes
60 100%
90%
Cause 1
50 80%
40 70%
60%
30 50%
40%
20 30%
Causes of the Defects
60 100%
90%
50 80% Cause 2
40 70% Cause 3
60%
30 50% Cause 4
40% Cause 5
20 30%
20%
Cause 6
10
10% Cause 7
0 0% Cause 8
1 2 3 4 5 6 7 8 9
se se se se se se se se se
Cau Cau Cau Cau Cau Cau Cau Cau Cau Cause 9

Defects Cumulative %

PRACTICE

Re-create the chart above.

1) Select the range A1:C10 and go to Insert > Charts > Column A
> Clustered Column.
1 Causes
2) Right-click on the Cumulative % series and select Format 2 Cause 1
Data Series. 3 Cause 2
3) In the Series Options tab, select Secondary Axis and press 4 Cause 3
Close 5 Cause 4
6 Cause 5
4) Select the Cumulative % series, go to Design > Change Chart
Type. 7 Cause 6
8 Cause 7
9 Cause 8
10 Cause 9
11
5) In Excel 2010, select a Line Chart type. In Excel 2013, choose
Combo and then for the Cumulative % series, choose "Line" in
the Chart Type drop-down box.

REFERENCES

TEMPLATE Pareto Chart Template: Example of using a secondary axis

✘ Mastered
Tip #12

13 Create a Timeline using drop lines and custom data labels


Creating a timeline in Excel is useful for demonstrating a few different charting techniques. The first is how to create
"leader lines"). The second is how to work with custom data point labels. These techniques are described in an articl
Vertex42.com, but you can also use the practice are below to work through a basic example.

IN PRACTICE

The Timeline Template on Vertex42.com provides a relatively simple way to create a timeline in Excel. The image be
screenshot of an actual Chart object created with the template. The chart is an XY Scatter chart that uses error bars
lines. The event labels are customized data point labels. The images are customized data point markers.

Template Timeline Template: Note the use of error bars for leader lines

PRACTICE

Use the data table on the right to create a simple timeline.

A) Create the timeline as a Line Chart A


1) Select the Height column (B1:B6) 1 Date
2) Go to Insert > Line chart > Line with Markers 2 3/1/2013
3) Select the chart and go to Design > Select Data and under 3 7/15/2013
Horizontal Axis Labels, select Edit
4 9/5/2014
4) For the Axis labels range, select the Data values (A2:A6) 5 10/2/2015
5) Right-click on the line and go to Format Data Series > Line Color 6 11/5/2016
and select No Line
6) Go to Layout (or Design > Add Chart Element) > Lines and select Drop Lines
7) Cleanup: Remove the legend, horizontal gridlines, vertical axis, and title
8) Switch the Height values for the first two events (B2=100, B3=50)

B) Add the event labels by linking each data label to a cell


1) Select the chart and go to Layout (or Design > Add Chart Element) > Data
Labels and select Right
2) Select the first data label. You will see that all data labels are selected. Click
on the first data label a second time. You should now see that only the first
data label is selected.

3) With just the one data label selected, press the "=" key and then select the
event label from the data table (cell C2) and press Enter.
4) Continue to add the custom data labels for the rest of the events.

HINT You do not need to link a data label to a cell. With a single data label selected, you can click inside the
Formula Bar and enter text.

TIP You can move an individual data label around and you also have some limited formatting options. You
can't resize the data label text box, but you can adjust the font size, and if you want to force a new
line, you can use the ALT+ENTER trick.

NOTE The main benefit of using a Line Chart for the timeline is the control that you have over the display of
the horizontal axis when using a Date Axis.

C) Adjust the X-Axis scale


1) Right-click on the Horizontal Axis and go to Format Axis > Axis Options
2) For the Major unit, enter a value of 6 Months.
3) For the Base Unit, select Months.
4) Enter 1/1/2013 fo the Minimum value and 1/1/2018 for the Maximum value.
5) In the Format Axis window, go to Number and try selecting a different Date format.

:-( The problems with using a Line Chart are (1) a Date Axis only works for dates as of 1/1/1900, (2) you
can't add horizontal error bars to show duration, and (3) the event dates must be listed in order. An
XY Scatter chart may be a better solution.

Use a Scatter chart with Error Bars to show duration

Instead of starting over from scratch to create a timeline with an XY Chart, let's start from the Line Chart created abo
use the chart you created, or the chart shown below.
Date Height
3/1/2013 80
80
75 7/15/2013 50
9/5/2014 25
50 50 10/2/2015 75
11/5/2016 50
25

13 13 14 14 15 1 5 16 16 17 17 18
an- Jul- an- Jul- an- Jul- an- Jul- an- Jul- an-
J J J J J J
D) Change the chart type to an X Y Scatter chart
1) Select the chart and go to Design > Change Chart Type and choose the X Y Scatter with Markers
2) Right-click on the X-axis and go to Format Axis. Set the Major Unit to 365.25, Minimum to 1/1/2013,
and Maximum to 1/1/2017.

E) Add leader lines using Y Error Bars.


1) Select the chart and go to Layout (or Design > Add Chart Element) > Error Bars and select Error Bars
with Percentage.
2) Select the Y Error bars by going to Format and selecting "Series … Y Error Bars" from the drop-down list
in the Current Selection group. Then select Format Selection.
3) Go to Vertical Error Bars and select Minus, No Cap, and set the Percentage to 100
4) Update the line color of the error bar if you want to.

F) Add lines representing the event duration, using X Error Bars


1) Select the X Error bars by going to Format and selecting "Series … X Error Bars" from the drop-down lis
in the Current Selection group. Then select Format Selection.
2) Go to Horizontal Error Bars and select Plus, No Cap, Custom, and click on Specify Value
3) For the Positive Error Value, select the range of duration values from the data table
4) Repeat step 1 and change the Line Color to a solid color and set the Line Style to a width of 4pt.
5) Move the data labels out of the way by going to Layout (or Design > Add Chart Element) > Data Labels
Above.
Your timeline chart should end up looking something similar to the one below.

80
75

50 50

25

1/1/2013 1/1/2014 1/1/2015 1/1/2016 1/1/2017


Tip #13
✘ Mastered
REFERENCES

TEMPLATE Vertex42.com: How to Create a Timeline in Excel

TEMPLATE Vertex42.com: How to Create a Bubble Chart Timeline in Excel in Excel 2013+

TEMPLATE Vertex42.com: How to Create a Vertical Timeline in Excel 2013+

14 Adding high/low reference lines to a chart

It's common to want to show reference lines within your chart. For example, the blood pressure chart below shows a
target SBP and DBP levels as horizontal lines. These reference lines make it easier to see at a glance whether the dat
above or below the targets. This tip will show you a very easy way to add a reference line, using a special copy/paste

Date
Blood Pressure in April 4/11
140 4/12
4/13
130
4/14
120
4/15
110 4/16
100 4/17
90 4/18
80
70
4/11
60
4/10 4/11 4/12 4/13 4/14 4/15 4/16 4/17 4/18 4/19 4/18

SBP DBP Target SBP Target DBP

PRACTICE

Suppose you have already made a Scatter chart of your blood pressure history using the data in the upper table. Now
two lines representing your target blood pressure.

HINT If you want to use a Line or Column chart, be sure your X-axis uses date or time values.

A
Blood Pressure in April
140
130
Blood Pressure in April 1 Date
2 4/11
140
3 4/12
130 4 4/13
120 5 4/14
110 6 4/15
100
7 4/16
8 4/17
90
9 4/18
80 10
70 11
60 12 4/11
4/10 4/11 4/12 4/13 4/14 4/15 4/16 4/17 4/18 4/19
13 4/18
SBP DBP 14

To add a horizontal line, you first need a table that lists the start and end points of your line(s). The blue table above
up for you. You can add the lines to your chart by right-clicking on the chart and going through the Select Data proce
use the following trick.

A) Copy the second table.


Highlight the range A11:C13 and press CTRL+c to Copy

B) Paste it into the chart.


1) Select the chart and click Home > Paste > Paste Special.
2) Select New series (otherwise your points will be tacked on
the end of the existing lines). Also check Series names in first
row.

C) Remove the data point markers


1) Right-click on one of the new lines and go to Format Data Series.
2) Go to Marker Options (or Fill > Marker > Marker Options in Excel 2013) and select None.

HINT For Line charts or Column charts: After you paste the table data into the chart, you'll need to change
of the new lines. Right-click on the series and select Change Series Chart Type and then pick Scatter w
lines.

TIP You can use this technique to combine two graphs of the same type by copying one graph, selecting t
graph and pasting the first graph into it.

Tip #14 ✘ Mastered

REFERENCES
This tip used data from the Blood Pressure Chart template listed below. A Control Chart is another common type of c
reference lines.

TEMPLATE Vertex42.com: Blood Pressure Chart

TEMPLATE Vertex42.com: Control Chart

15 Create a Waterfall chart using invisible stacked columns

With stacked column or bar charts, you can create the illusion of floating columns or bars by stacking one set of data
invisible or "transparent" column. This procedure makes it simple to create a Waterfall chart that shows which facto
from your total profit.

The example Waterfall chart below shows the factors that have led to a student's final grade on a written report. The
possible points is represented by the column on the left. The next 3 columns show the amounts subtracted from the
The next blue column shows the total points after these first 3 factors have been subtracted ... and so on.

When creating a Waterfall chart, your data table will need an extra column whose value equals the next row's total.
equations in the Invisible column below.

Grade Determination
100
Total Possible
75
Thesis Statement
50 Clear Understanding
25 Consistent View
Concept Total
0
t l Use of Quotes
le en in
g
ie
w ta es ar ng de
s s ib m nd V T o uot m e l li ra Grammar
o e a t t Q a m p G
lP at rs
t en ep of Gr
S
na
l
ta s St de i st nc e Fi Spelling
T o i n ns C o s
es rU Co
U
Th ea Final Grade
Cl

PRACTICE

The chart at the right is a stacked column chart that uses the data in the table above. You will first make one of the s
and then change the color of individual columns.

A) Turn the bottom invisible. Grade Determination


Right-click on blue column series and select 100
Format Data Series > Fill > No Fill.
75

50

25
Grade Determination
Right-click on blue column series and select 100
Format Data Series > Fill > No Fill.
75

TIP You can tell which series is selected by looking 50


at the data table to see which range is active.
25

0
le nt ng w tal es ar n
B) Change the color of the tall columns. s sib me ndi Vie To uot m m elli
1) Select just one of the tall columns, by clicking Po ate sta nt pt f Q ra Sp
t al s St der iste nce e o G
Fi
n
on the column twice (slowly). To esi Un ons Co Us
Th l e a r C
2) Right-click on the selected column and go to C
Format Data Point > Fill and choose a different fill
color.

3) Repeat steps 1 and 2 for the other two


columns
✘ Mastered

Tip #15

16 Create a Bullet Graph from a stacked column chart

Bullet Graphs are a type of chart that let you see how close you are to a goal. They were developed by Stephen Few
Show Me the Numbers, 2004) to take the place of Gauge Charts commonly design in dashboard reports. Creating bu
Excel can be tricky, but their usefulness makes them worth the effort. In the example below, you can easily see that
surpassed the target sales for September,September Sales
and Sally almost reached her goal.
250

200
Current
150 Great
Good
100 Low
Target
50

0
Bob Sally Pat

PRACTICE

Bullet Graph Data Table


A) Create the stacked bar graph for the background scale Levels Bob
1) Select the data table to the right, including the headers Low 50
2) Go to Design > Switch Row/Column if the Good 25
columns are not stacked.
Great 25
Current 65
Target 90
B) Change the chart type of the "Current" series
1) In the chart (not the legend), right-click on the "Current" series and go to Format Data Series.
2) In Series Options, select Secondary Axis, and click Close. This will remove the Current series from the
Stacked Column chart and treat it as a separate Column Chart.
3) Right-click on the "Current" series again and increase the Gap Width until the column is about half the
width of the Stacked columns (so that you can see the columns behind it).
4) Click on the secondary axis (the vertical axis on the right side of the chart) and press Delete. This will
make the Current series use the original axis again.

C) Change the chart type of the "Target" series


1) In the chart, select the "Target" series and go to Design > Change Chart Type
2) Select the Line with Markers chart type, or in Excel 2013, go to Combo and change the chart type for
the Target series to Line with Markers in the drop-down box.
3) Right-click on the "Target" series and go to Format Data Series.
4) Remove the line by going to Line Color (or Fill > Line in Excel 2013), then select No Line.
5) Change the Marker type to a horizontal dash (Marker Options > Built-in, in Excel 2013) and increase the
size of the marker.
6) Change the Marker Fill color to black, and the Marker Line color (or Border, in Excel 2013)
to No Line
✘ Mastered

Tip #16

REFERENCES

ARTICLE Peltiertech.com: How to Make Vertical Bullet Graphs in Excel

Vertex42.com
© 2013-2018 Vertex42 LLC. All rights reserved.
< Prev

0%

Level


reating charts in Excel 2010. For the
ou already have a basic

ork with charts. The tips in this


rent.

Cookies Drinks
2100 3000
2400 3150
2950 3200

is will open a dialog box where you

to use them


ocations, groups of people, etc. For
o are boys, you could make a bar
would represent the number of girls.

tudents in Our Class


9
14

A B
Student Eye Color
Green 4
Blue 5
Brown 8
Other 6


r across categories. This example
ory labels are long names or titles,

Apples
13
11
7
10
6
14
10
9

B C
Apples Oranges
13 3
10 8
6 9
4 17
3 25
4 18
7 18
10 14
15 12
22 9
15 6
12 2


he example below, one complete
ation, and they are easy to create.

s Eaten This Month


s Eaten This Month
m

ia

al
an

th
ria

m
ar
Sa

Se
us

Ja
M
Ad

nformation or cause
e a picture of oranges in
or of the apple that you

gazines, but may not be


uld use a line graph to show the
e comparisons, like in the example

Low (°F)
34
39
44
44
34
32
29
33
41
43

B C
High (°F) Low (°F)
43 34
44 39
54 44
51 44
46 34
44 32
48 29
60 33
49 41
45 43

blue for cold. Be aware


he order you type them, regardless
ider using a scatter graph instead.

chart type should you use? In some


ontinuous change (like temperature
(like people's names in Tip 4).


ple, if you took a survey of the
ould represent a different topping.

Votes
6
10
3
2
2
1
1
1

to a separate stacked bar graph, like


l number of votes rather than
abels and going to Format Data

A B
Topping Votes
Cheese 6
Pepperoni 10
Sausage 3
Bacon 2
Pineapple 2
Anchovies 1
Artichokes 1
Olives 1

better at comparing the length of two


mportant, it might be better to use a


ystem). It can be used to find trends
te different. In Excel 2010, after
tual Layout tab. In Excel 2013, these
dd Chart Element.

e new "+" button for Charts

A B
X Y
1 2
-4 3
-2 -3
3 -3
chart, then the "+" button, and check
s box.
on the Y-axis title and go to Format

e Size and Properties icon, and


ext Direction to Horizontal.
axes "X" and "Y"

chart, then go to Design > Add Chart


ata Labels > More Data Label Options.

el Options, check both the X Value


ue boxes.

gridlines and adjust the spacing


chart, then the "+" button, then click
next to the Gridlines checkbox, and
oxes.

on the horizontal axis (X-axis) and


at Axis.
ajor Unit to 5 and the Minor Unit to
me for the Y-axis.

ight of each area, as well as the total

sses over a period of 10 years. Rather


the one below.

2009 2010
7 4
10 9
1 2
1 0
1 1

e axes of the chart. To do that, select

2003 2004
5 8
9 12
2 0
3 0
0 1

napshot of a chart at some point in
ument.

irectly into a Word or Powerpoint


atly increase the size of your
ed the live data in the document,

a high resolution image, englarge the

or table like normal, and then use


he second method is to Copy as a

High (°F) Low (°F)


43 34
44 39
54 44
51 44
46 34
44 32
48 29
60 33
49 41
45 43


ill be added to the chart as well. This
DBP
80
84
76
80
78
76
80
84


rendlines" in Excel). You can choose
nique is used frequently by scientists
ss curve-fitting in general, but will
3 4 5 6 7

Y
3
4
7
12
15
25
29

hoosing a best-fit
el.


d a Line Graph). To create a
of the data series and going to

axis scales.

ber of defects for different causes,


e cumulative total as a percentage.
ge from 0% to 100%, while the scale

Defects Cumulative %
50 46%
30 74%
15 88%
5 93%
3 95%
2 97%
1 98%
1 99%
1 100%

B C
Defects Cumulative %
50 46%
30 74%
15 88%
5 93%
3 95%
2 97%
1 98%
1 99%
1 100%


he first is how to create drop lines (or
re described in an article on

in Excel. The image below is


art that uses error bars for the leader
nt markers.

B C
Height Event
50 Event # 1
100 Event # 2
25 Event # 3
75 Event # 4
100 Event # 5

you can click inside the

formatting options. You


want to force a new

have over the display of

as of 1/1/1900, (2) you


be listed in order. An

e Line Chart created above. You can


Event Duration
Event # 1 50
Event # 2 120
Event # 3 200
Event # 4 50
Event # 5 90

tter with Markers


Minimum to 1/1/2013,

and select Error Bars

from the drop-down list

from the drop-down list

o a width of 4pt.
Element) > Data Labels >

ure chart below shows a person's
glance whether the data is falling
ng a special copy/paste technique.

SBP DBP
120 80
128 84
118 76
120 80
130 78
118 76
120 80
128 84

Target SBP Target DBP


120 80
120 80

in the upper table. Now you'll add in

me values.

B C
SBP DBP
120 80
128 84
118 76
120 80
130 78
118 76
120 80
128 84

Target SBP Target DBP


120 80
120 80

). The blue table above has been set


h the Select Data process, or you can

elect None.

, you'll need to change the chart type


and then pick Scatter with straight

g one graph, selecting the second


other common type of chart that uses


stacking one set of data on top of an
that shows which factors take away

on a written report. The total


nts subtracted from the total points.
.. and so on.

als the next row's total. See the

Invisible Points
0 100
90 10
87 3
82 5
0 82
77 5
75 2
73 2
0 73

l first make one of the series invisible

e Determination
e Determination

ng w al s r g e
V ie Tot ote ma llin rad
t t u m e G
en ep f Q Gra S p al
st onc e o Fi
n
C Us


eloped by Stephen Few (author of
rd reports. Creating bullet graphs in
you can easily see that Pat has

Sally Pat
50 50
25 25
25 25
85 120
90 90

at Data Series.
urrent series from the

olumn is about half the

ress Delete. This will

nge the chart type for

l 2013) and increase the


Mini Calendar
This calendar is used as an example of a Linked Picture

Date 4/25/2013

April 2013
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

This calendar is used to illustrate the WORKDAYS function

February 2013 Holidays


Su M Tu W Th F Sa 41319
1 2 0
3 4 5 6 7 8 9 0
10 11 12 13 14 15 16 0
17 18 19 20 21 22 23 0
24 25 26 27 28 0
0

This calendar is used for the advanced conditional formatting example

September 2022 Highlight


Su M Tu W Th F Sa 9/2/2022
1 2 3 9/8/2022
4 5 6 7 8 9 10 8/31/2022
11 12 13 14 15 16 17 9/10/2022
18 19 20 21 22 23 24
25 26 27 28 29 30
Single End-User License Agreement (EULA)
© 2013-2018 Vertex42 LLC. All rights reserved.

For the Vertex42 Spreadsheet Tips Workbook, including the associated electronic file(s), printed
materials, and other electronic documentation (the "Software").

This worksheet summarizes a portion of the EULA and is provided for your convenience. The
official Single End-User License Agreement for this Software can be found online at:
https://www.vertex42.com/licensing/EULA_singleuser.html

Your Rights

This Software is protected by copyright laws and international copyright treaties, as well as other
intellectual property laws and treaties. This Software is licensed, not sold. You must treat the
Software like any other copyrighted material, such as a book.

This EULA grants you, the Software end-user, the following rights:

1. You may download and copy the Software to any computers that are used exclusively by you
or your immediate family. If you must place the Software on a shared computer, you must ensure
that the Software cannot be used by anyone but you or your immediate family.

2. You may permanently transfer all your rights under this EULA, provided that you (a) retain no
copies, (b) transfer all of the Sofware and (c) the recipient agrees to abide by all the terms of this
EULA. An example would be a purchasing department or manager purchasing the Software on
behalf of an employee, then transferring the Software to the employee.

Limitations

You may not remove or alter any logo, trademark, copyright, disclaimer, brand, terms of use,
attribution, or other proprietary notices or marks within the Software.

This Software and any file, document, or other work including or derived from this Sofware
may NOT be sold, distributed, published to an online gallery, hosted on a website, or placed
on a public server.

Other

Please see the official EULA on Vertex42.com by going to:


https://www.vertex42.com/licensing/EULA_singleuser.html

You might also like