Panduan STID1103 MS Excel
Panduan STID1103 MS Excel
Excel 2013, Excel 2010, Excel 2007, Excel 2003 Excel XP, Excel 2000
https://edu.gcfglobal.org/en/topics/excel/
MS Excel Formulas
https://edu.gcfglobal.org/en/excelformulas/
MS Excel Tips
https://edu.gcfglobal.org/en/excel-tips/
Bil Topik ✓
Getting Started with Excel
1
Learn your way around the Excel environment.
Understanding OneDrive
2
Learn all about working with your Microsoft account and OneDrive.
Creating and Opening Workbooks
3
Learn how to create and open Excel workbooks.
Saving and Sharing Workbooks
4
Learn how to save and share Excel workbooks.
Cell Basics
5 Learn how to insert and delete cells and cell content, drag and drop cells, use the
fill handle, and use the cut, copy, and paste functions.
Modifying Columns, Rows, and Cells
6
Learn how to modify rows, columns, and cells in Excel.
Formatting Cells
7
Learn all about formatting text in Excel.
Understanding Number Formats
8
Learn all about formatting numbers in Excel.
Working with Multiple Worksheets
9 Learn how to add, delete, copy, and move worksheets, as well as group and
ungroup worksheets.
Using Find & Replace
10
Learn how to use Excel's Find and Replace features to search for specific data.
Checking Spelling
11
Learn how to use Excel's spell check feature.
Page Layout and Printing
12 Learn how to use Excel commands that let you control the way your content will
appear on a printed page.
Intro to Formulas
13
Learn how to use cell references to create a simple formula in Excel.
Creating More Complex Formulas
14
Learn how to create a complex formula in Excel.
Relative and Absolute Cell References
15 Learn all about absolute and relative cell references and how they're used in
Excel.
Functions
16 Learn the different parts of a function and how to create arguments to calculate
values and cell references.
Basic Tips for Working with Data
17 Learn these basic tips for working with data to help you organize it and find what
you need.
1 Myz
STID1103 - Aplikasi Komputer dalam Pengurusan
Formulas
2 Myz
STID1103 - Aplikasi Komputer dalam Pengurusan
4 Myz
STID1103 - Aplikasi Komputer dalam Pengurusan
5 Myz
5/19/2020 Excel: What-if Analysis
Excel
Getting Started with Excel
Introduction
Excel is a spreadsheet program that allows you to store, organize, and analyze
information. While you may think Excel is only used by certain people to process
complicated data, anyone can learn how to take advantage of the program's powerful
features. Whether you're keeping a budget, organizing a training log, or creating an
invoice, Excel makes it easy to work with di erent types of data.
▶ From the Excel Start Screen, locate and select Blank workbook to access
the Excel interface.
Click the buttons in the interactive below to become familiar with the parts
of the Excel interface.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 2/258
5/19/2020 Excel: What-if Analysis
The Ribbon
Excel uses a tabbed Ribbon system instead of traditional menus. The Ribbon contains
multiple tabs, each with several groups of commands. You will use these tabs to
perform the most common tasks in Excel.
▶ Some groups will have an arrow you can click for more options.
▶ You can adjust how the Ribbon is displayed with the Ribbon Display
Options.
The Ribbon is designed to respond to your current task, but you can choose to minimize
it if you find that it takes up too much screen space. Click the Ribbon Display Options
arrow in the upper-right corner of the Ribbon to display the drop-down menu.
▶ Show Tabs: This option hides all command groups when they're not in use,
but tabs will remain visible. To show the Ribbon, simply click a tab.
▶ Show Tabs and Commands: This option maximizes the Ribbon. All of the
tabs and commands will be visible. This option is selected by default when
you open Excel for the first time.
2 Select the command you want to add from the drop-down menu. To
choose from additional commands, select More Commands.
2 The results will give you a few relevant options. To use one, click it like you
would a command on the Ribbon.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 5/258
5/19/2020 Excel: What-if Analysis
Worksheet views
Excel has a variety of viewing options that change how your workbook is displayed.
These views can be useful for various tasks, especially if you're planning to print the
spreadsheet. To change worksheet views, locate the commands in the bottom-right
corner of the Excel window and select Normal view, Page Layout view, or Page Break
view.
▶ Page Layout view displays how your worksheets will appear when printed.
You can also add headers and footers in this view.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 6/258
5/19/2020 Excel: What-if Analysis
▶ Page Break view allows you to change the location of page breaks, which is
especially helpful when printing a lot of data from Excel.
Backstage view
Backstage view gives you various options for saving, opening a file, printing, and
sharing your workbooks.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 7/258
5/19/2020 Excel: What-if Analysis
Click the buttons in the interactive below to learn more about using
Backstage view.
Challenge!
1 Open Excel.
4 Using the Customize Quick Access Toolbar, click to add New, Quick Print,
and Spelling.
5 In the Tell me bar, type the word Color. Hover over Fill Color and choose
yellow. This will fill a cell with the color yellow.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 8/258
5/19/2020 Excel: What-if Analysis
8 Change the Ribbon Display Options back to Show Tabs and Commands.
Introduction
Many of the features in Microso O ice are geared toward saving and sharing files
online. OneDrive is Microso ’s online storage space that you can use to save, edit, and
share your documents and other files. You can access OneDrive from your computer,
smartphone, or any of the devices you use.
To get started with OneDrive, all you need to do is set up a free Microso account if you
don’t already have one.
If you don't already have a Microso account, you can go to the Creating a
Microso Account lesson in our Microso Account tutorial.
Once you have a Microso account, you'll be able to sign in to O ice. Just click Sign in in
the upper-right corner of the Excel window.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 9/258
5/19/2020 Excel: What-if Analysis
▶ Access your files anywhere: When you save your files to OneDrive, you’ll
be able to access them from any computer, tablet, or smartphone that has
an Internet connection. You'll also be able to create new documents from
OneDrive.
▶ Back up your files: Saving files to OneDrive gives them an extra layer of
protection. Even if something happens to your computer, OneDrive will
keep your files safe and accessible.
▶ Share files: It’s easy to share your OneDrive files with friends and
coworkers. You can choose whether they can edit or simply read files. This
option is great for collaboration because multiple people can edit a
document at the same time (this is also known as co-authoring).
For example, when you click Save As, you can select either OneDrive or This PC as the
save location.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 10/258
5/19/2020 Excel: What-if Analysis
Introduction
Excel files are called workbooks. Whenever you start a new project in Excel, you'll need
to create a new workbook. There are several ways to start working with a workbook in
Excel. You can choose to create a new workbook—either with a blank workbook or a
predesigned template—or open an existing workbook.
Watch the video below to learn more about creating and opening
workbooks in Excel.
About OneDrive
Whenever you're opening or saving a workbook, you'll have the option of using your
OneDrive, which is the online file storage service included with your Microso account.
To enable this option, you'll need to sign in to O ice. To learn more, visit our lesson on
Understanding OneDrive.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 11/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 12/258
5/19/2020 Excel: What-if Analysis
2 Select Computer, then click Browse. You can also choose OneDrive to
open files stored on your OneDrive.
3 The Open dialog box will appear. Locate and select your workbook, then
click Open.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 13/258
5/19/2020 Excel: What-if Analysis
If you've opened the desired workbook recently, you can browse your
Recent Workbooks rather than search for the file.
To pin a workbook:
If you frequently work with the same workbook, you can pin it to Backstage view for
faster access.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 14/258
5/19/2020 Excel: What-if Analysis
2 Hover your mouse over the workbook you want to pin. A pushpin icon will
appear next to the workbook. Click the pushpin icon.
Using templates
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 15/258
5/19/2020 Excel: What-if Analysis
2 Select New. Several templates will appear below the Blank workbook
option.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 16/258
5/19/2020 Excel: What-if Analysis
You can also browse templates by category or use the search bar to find
something more specific.
It's important to note that not all templates are created by Microso . Many
are created by third-party providers and even individual users, so some
templates may work better than others.
Compatibility Mode
Sometimes you may need to work with workbooks that were created in earlier versions
of Microso Excel, like Excel 2010 or Excel 2007. When you open these types of
workbooks, they will appear in Compatibility Mode.
In the image below, you can see that the workbook is in Compatibility Mode, which is
indicated at the top of the window to the right of the file name. This will disable some
Excel features, which will be grayed out on the Ribbon.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 17/258
5/19/2020 Excel: What-if Analysis
To exit Compatibility Mode, you'll need to convert the workbook to the current version
type. However, if you're collaborating with others who only have access to an earlier
version of Excel, it's best to leave the workbook in Compatibility Mode so the format will
not change.
To convert a workbook:
If you want access to the newer features, you can convert the spreadsheet to the current
file format.
Note that converting a file may cause some changes to the original layout
of the workbook.
3 The Save As dialog box will appear. Select the location where you want to
save the workbook, enter a file name for the workbook, and click Save.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 18/258
5/19/2020 Excel: What-if Analysis
Challenge!
1 Open our practice workbook.
Introduction
Whenever you create a new workbook in Excel, you'll need to know how to save it in
order to access and edit it later. As with previous versions of Excel, you can save files
locally to your computer. You can also save a workbook to the cloud using OneDrive, as
well as export and share workbooks with others directly from Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 19/258
5/19/2020 Excel: What-if Analysis
Watch the video below to learn more about saving and sharing workbooks
in Excel.
About OneDrive
Whenever you're opening or saving a workbook, you'll have the option of using your
OneDrive, which is the online file storage service included with your Microso account.
To enable this option, you'll need to sign in to O ice. To learn more, visit our lesson on
Understanding OneDrive.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 20/258
5/19/2020 Excel: What-if Analysis
Excel o ers two ways to save a file: Save and Save As. These options work in similar
ways, with a few important di erences:
▶ Save: When you create or edit a workbook, you'll use the Save command to
save your changes. You'll use this command most of the time. When you
save a file, you'll only need to choose a file name and location the first time.
Then you can just click the Save command to save it with the same name
and location.
▶ Save As: You'll use this command to create a copy of a workbook while
keeping the original. When you use Save As, you'll need to choose a
di erent name and/or location for the copied version.
To save a workbook:
It's important to save your workbook whenever you start a new project or make
changes to an existing one. Saving early and o en can prevent your work from being
lost. You'll also need to pay close attention to where you save the workbook so it will be
easy to find later.
1 Locate and select the Save command on the Quick Access Toolbar.
2 If you're saving the file for the first time, the Save As pane will appear in
Backstage view.
3 You'll then need to choose where to save the file and give it a file name. To
save the workbook to your computer, select Computer, then click Browse.
You can also click OneDrive to save the file to your OneDrive.
4 The Save As dialog box will appear. Select the location where you want to
save the workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 21/258
5/19/2020 Excel: What-if Analysis
6 The workbook will be saved. You can click the Save command again to save
your changes as you modify the workbook.
You can also access the Save command by pressing Ctrl+S on your
keyboard.
To do this, click the Save As command in Backstage view. Just like when saving a file for
the first time, you'll need to choose where to save the file and give it a new file name.
2 Click Options.
3 The Excel Options dialog box will appear. Select Save, check the box next
to Save to Computer by default, then click OK. The default save location
will be changed.
AutoRecover
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 23/258
5/19/2020 Excel: What-if Analysis
Excel automatically saves your workbooks to a temporary folder while you are working
on them. If you forget to save your changes or if Excel crashes, you can restore the file
using AutoRecover.
To use AutoRecover:
1 Open Excel. If autosaved versions of a file are found, the Document
Recovery pane will appear.
If you don't see the file you need, you can browse all autosaved files from
Backstage view. Just select the File tab, click Manage Workbook, then
choose Recover Unsaved Workbooks.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 24/258
5/19/2020 Excel: What-if Analysis
Exporting workbooks
By default, Excel workbooks are saved in the .xlsx file type. However, there may be times
when you need to use another file type, like a PDF or Excel 97-2003 workbook. It's
easy to export your workbook from Excel to a variety of file types.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 25/258
5/19/2020 Excel: What-if Analysis
3 The Save As dialog box will appear. Select the location where you want to
export the workbook, enter a file name, then click Publish.
By default, Excel will only export the active worksheet. If you have multiple
worksheets and want to save all of them in the same PDF file, click Options
in the Save As dialog box. The Options dialog box will appear. Select Entire
workbook, then click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 26/258
5/19/2020 Excel: What-if Analysis
Whenever you export a workbook as a PDF, you'll also need to consider how
your workbook data will appear on each page of the PDF, just like printing
a workbook. Visit our Page Layout and Printing lesson to learn more about
what to consider before exporting a workbook as a PDF.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 27/258
5/19/2020 Excel: What-if Analysis
4 The Save As dialog box will appear. Select the location where you want to
export the workbook, enter a file name, then click Save.
You can also use the Save as type: drop-down menu in the Save As dialog
box to save workbooks in a variety of file types.
Sharing workbooks
Excel makes it easy to share and collaborate on workbooks using OneDrive. In the past,
if you wanted to share a file with someone, you could send it as an email attachment.
While convenient, this system also creates multiple versions of the same file, which can
be di icult to organize.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 28/258
5/19/2020 Excel: What-if Analysis
When you share a workbook from Excel, you're actually giving others access to the exact
same file. This lets you and the people you share with edit the same workbook without
having to keep track of multiple versions.
To share a workbook:
1 Click the File tab to access Backstage view, then click Share.
2 Excel will return to Normal view and open the Share panel on the right side
of the window. From here, you can invite people to share your document,
see a list of who has access to the document, and set whether they can edit
or only view the document.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 29/258
5/19/2020 Excel: What-if Analysis
Challenge!
1 Open our practice workbook.
2 Using the Save As option, create a copy of the workbook and name it
Saving Practice Challenge. You can save the copy to a folder on your
computer or to your OneDrive.
Introduction
Whenever you work with Excel, you'll enter information—or content—into cells. Cells
are the basic building blocks of a worksheet. You'll need to learn the basics of cells and
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 30/258
5/19/2020 Excel: What-if Analysis
Watch the video below to learn more about the basics of working with cells.
Understanding cells
Every worksheet is made up of thousands of rectangles, which are called cells. A cell is
the intersection of a row and a column. In other words, it's where a row and column
meet.
Columns are identified by letters (A, B, C), while rows are identified by numbers (1, 2,
3). Each cell has its own name—or cell address—based on its column and row. In the
example below, the selected cell intersects column C and row 5, so the cell address is
C5.
Note that the cell address also appears in the Name box in the top-le corner, and that a
cell's column and row headings are highlighted when the cell is selected.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 31/258
5/19/2020 Excel: What-if Analysis
You can also select multiple cells at the same time. A group of cells is known as a cell
range. Rather than a single cell address, you will refer to a cell range using the cell
addresses of the first and last cells in the cell range, separated by a colon. For example,
a cell range that included cells A1, A2, A3, A4, and A5 would be written as A1:A5. Take a
look at the di erent cell ranges below:
To select a cell:
To input or edit cell content, you'll first need to select the cell.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 32/258
5/19/2020 Excel: What-if Analysis
1 Click a cell to select it. In our example, we'll select cell D9.
2 A border will appear around the selected cell, and the column heading and
row heading will be highlighted. The cell will remain selected until you
click another cell in the worksheet.
You can also select cells using the arrow keys on your keyboard.
1 Click and drag the mouse until all of the adjoining cells you want to select
are highlighted. In our example, we'll select the cell range B5:C18.
2 Release the mouse to select the desired cell range. The cells will remain
selected until you click another cell in the worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 33/258
5/19/2020 Excel: What-if Analysis
Cell content
Any information you enter into a spreadsheet will be stored in a cell. Each cell can
contain di erent types of content, including text, formatting, formulas, and functions.
▶ Text: Cells can contain text, such as letters, numbers, and dates.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 34/258
5/19/2020 Excel: What-if Analysis
▶ Formulas and functions: Cells can contain formulas and functions that
calculate cell values. In our example, SUM(B2:B8) adds the value of each
cell in the cell range B2:B8 and displays the total in cell B9.
To insert content:
1 Click a cell to select it. In our example, we'll select cell F9.
2 Type something into the selected cell, then press Enter on your keyboard.
The content will appear in the cell and the formula bar. You can also input
and edit cell content in the formula bar.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 35/258
5/19/2020 Excel: What-if Analysis
1 Select the cell(s) with content you want to delete. In our example, we'll
select the cell range A10:H10.
2 Select the Clear command on the Home tab, then click Clear Contents.
You can also use the Delete key on your keyboard to delete content from
multiple cells at once. The Backspace key will only delete content from
one cell at a time.
To delete cells:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 36/258
5/19/2020 Excel: What-if Analysis
There is an important di erence between deleting the content of a cell and deleting the
cell itself. If you delete the entire cell, the cells below it will shi to fill in the gaps and
replace the deleted cells.
1 Select the cell(s) you want to delete. In our example, we'll select A10:H10.
2 Select the Delete command from the Home tab on the Ribbon.
1 Select the cell(s) you want to copy. In our example, we'll select F9.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 37/258
5/19/2020 Excel: What-if Analysis
2 Click the Copy command on the Home tab, or press Ctrl+C on your
keyboard.
3 Select the cell(s) where you want to paste the content. In our example,
we'll select F12:F17. The copied cell(s) will have a dashed box around
them.
4 Click the Paste command on the Home tab, or press Ctrl+V on your
keyboard.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 38/258
5/19/2020 Excel: What-if Analysis
Instead of choosing commands from the Ribbon, you can access commands quickly by
right-clicking. Simply select the cell(s) you want to format, then right-click the mouse.
A drop-down menu will appear, where you'll find several commands that are also
located on the Ribbon.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 39/258
5/19/2020 Excel: What-if Analysis
1 Select the cell(s) you want to cut. In our example, we'll select G5:G6.
2 Right-click the mouse and select the Cut command. You can also use the
command on the Home tab, or press Ctrl+X on your keyboard.
3 Select the cells where you want to paste the content. In our example, we'll
select F10:F11. The cut cells will now have a dashed box around them.
4 Right-click the mouse and select the Paste command. You can also use the
command on the Home tab, or press Ctrl+V on your keyboard.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 40/258
5/19/2020 Excel: What-if Analysis
5 The cut content will be removed from the original cells and pasted into the
selected cells.
1 Select the cell(s) you want to move. In our example, we'll select H4:H12.
2 Hover the mouse over the border of the selected cell(s) until the mouse
changes to a pointer with four arrows.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 41/258
5/19/2020 Excel: What-if Analysis
3 Click and drag the cells to the desired location. In our example, we'll move
them to G4:G12.
4 Release the mouse. The cells will be dropped in the selected location.
If you're copying cell content to adjacent cells in the same row or column, the fill handle
is a good alternative to the copy and paste commands.
1 Select the cell(s) containing the content you want to use, then hover the
mouse over the lower-right corner of the cell so the fill handle appears.
2 Click and drag the fill handle until all of the cells you want to fill are
selected. In our example, we'll select G13:G17.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 43/258
5/19/2020 Excel: What-if Analysis
1 Select the cell range that contains the series you want to continue. In our
example, we'll select E4:G4.
3 Release the mouse. If Excel understood the series, it will be continued in the
selected cells. In our example, Excel added Part 4, Part 5, and Part 6 to
H4:J4.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 44/258
5/19/2020 Excel: What-if Analysis
You can also double-click the fill handle instead of clicking and dragging. This can be
useful with larger spreadsheets, where clicking and dragging may be awkward.
Watch the video below to see an example of double-clicking the fill handle.
Challenge!
1 Open our practice workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 45/258
5/19/2020 Excel: What-if Analysis
4 Delete column G.
5 Using either cut and paste or drag and drop, move the contents of row 18
to row 14.
Introduction
By default, every row and column of a new workbook is set to the same height and
width. Excel allows you to modify column width and row height in di erent ways,
including wrapping text and merging cells.
Watch the video below to learn more about modifying columns, rows, and
cells.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 46/258
5/19/2020 Excel: What-if Analysis
1 Position the mouse over the column line in the column heading so the
cursor becomes a double arrow.
2 Click and drag the mouse to increase or decrease the column width.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 47/258
5/19/2020 Excel: What-if Analysis
With numerical data, the cell will display pound signs (#######) if the
column is too narrow. Simply increase the column width to make the data
visible.
1 Position the mouse over the column line in the column heading so the
cursor becomes a double arrow.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 48/258
5/19/2020 Excel: What-if Analysis
You can also AutoFit the width for several columns at the same time. Simply
select the columns you want to AutoFit, then select the AutoFit Column
Width command from the Format drop-down menu on the Home tab. This
method can also be used for row height.
2 Click and drag the mouse to increase or decrease the row height.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 49/258
5/19/2020 Excel: What-if Analysis
3 Release the mouse. The height of the selected row will be changed.
1 Locate and click the Select All button just below the name box to select
every cell in the worksheet.
2 Position the mouse over a row line so the cursor becomes a double arrow.
3 Click and drag the mouse to increase or decrease the row height, then
release the mouse when you are satisfied. The row height will be changed
for the entire worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 50/258
5/19/2020 Excel: What-if Analysis
To insert rows:
1 Select the row heading below where you want the new row to appear. In
this example, we want to insert a row between rows 4 and 5, so we'll select
row 5.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 51/258
5/19/2020 Excel: What-if Analysis
When inserting new rows, columns, or cells, you will see a paintbrush icon
next to the inserted cells. This button allows you to choose how Excel
formats these cells. By default, Excel formats inserted rows with the same
formatting as the cells in the row above. To access additional options, hover
your mouse over the icon, then click the drop-down arrow.
To insert columns:
1 Select the column heading to the right of where you want the new column
to appear. For example, if you want to insert a column between columns D
and E, select column E.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 52/258
5/19/2020 Excel: What-if Analysis
When inserting rows and columns, make sure to select the entire row or
column by clicking the heading. If you select only a cell in the row or
column, the Insert command will only insert a new cell.
1 Select the row you want to delete. In our example, we'll select row 9.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 53/258
5/19/2020 Excel: What-if Analysis
3 The selected row will be deleted, and those around it will shi . In our
example, row 10 has moved up, so it's now row 9.
1 Select the desired column heading for the column you want to move.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 54/258
5/19/2020 Excel: What-if Analysis
2 Click the Cut command on the Home tab, or press Ctrl+X on your keyboard.
3 Select the column heading to the right of where you want to move the
column. For example, if you want to move a column between columns E
and F, select column F.
4 Click the Insert command on the Home tab, then select Insert Cut Cells
from the drop-down menu.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 55/258
5/19/2020 Excel: What-if Analysis
5 The column will be moved to the selected location, and the columns
around it will shi .
You can also access the Cut and Insert commands by right-clicking the
mouse and selecting the desired commands from the drop-down menu.
1 Select the columns you want to hide, right-click the mouse, then select
Hide from the formatting menu. In our example, we'll hide columns C, D,
and E.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 56/258
5/19/2020 Excel: What-if Analysis
2 The columns will be hidden. The green column line indicates the location
of the hidden columns.
3 To unhide the columns, select the columns on both sides of the hidden
columns. In our example, we'll select columns B and F. Then right-click the
mouse and select Unhide from the formatting menu.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 57/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 58/258
5/19/2020 Excel: What-if Analysis
2 Click the Merge & Center command on the Home tab. In our example, we'll
select the cell range A1:F1.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 59/258
5/19/2020 Excel: What-if Analysis
3 The selected cells will be merged, and the text will be centered.
▶ Merge & Center: This merges the selected cells into one cell and centers
the text.
▶ Merge Across: This merges the selected cells into larger cells while keeping
each row separate.
▶ Merge Cells: This merges the selected cells into one cell but does not
center the text.
Be careful when using this feature. If you merge multiple cells that all
contain data, Excel will keep only the contents of the upper-le cell and
discard everything else.
Merging can be useful for organizing your data, but it can also create problems later on.
For example, it can be di icult to move, copy, and paste content from merged cells. A
good alternative to merging is to Center Across Selection, which creates a similar e ect
without actually combining cells.
Watch the video below to learn why you should use Center Across Selection
instead of merging cells.
2 Click the small arrow in the lower-right corner of the Alignment group on
the Home tab.
3 A dialog box will appear. Locate and select the Horizontal drop-down
menu, select Center Across Selection, then click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 61/258
5/19/2020 Excel: What-if Analysis
4 The content will be centered across the selected cell range. As you can see,
this creates the same visual result as merging and centering, but it
preserves each cell within A1:F1.
Challenge!
1 Open our practice workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 62/258
5/19/2020 Excel: What-if Analysis
9 When you're finished, your workbook should look something like this:
Introduction
All cell content uses the same formatting by default, which can make it di icult to read
a workbook with a lot of information. Basic formatting can customize the look and feel
of your workbook, allowing you to draw attention to specific sections and making your
content easier to view and understand.
Watch the video below to learn more about formatting cells in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 63/258
5/19/2020 Excel: What-if Analysis
2 On the Home tab, click the drop-down arrow next to the Font Size
command, then select the desired font size. In our example, we will choose
24 to make the text larger.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 64/258
5/19/2020 Excel: What-if Analysis
You can also use the Increase Font Size and Decrease Font Size
commands or enter a custom font size using your keyboard.
2 On the Home tab, click the drop-down arrow next to the Font command,
then select the desired font. In our example, we'll choose Century Gothic.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 65/258
5/19/2020 Excel: What-if Analysis
2 On the Home tab, click the drop-down arrow next to the Font Color
command, then select the desired font color. In our example, we'll choose
Green.
Select More Colors at the bottom of the menu to access additional color
options. We've changed the font color to a bright pink.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 66/258
5/19/2020 Excel: What-if Analysis
2 Click the Bold (B), Italic (I), or Underline (U) command on the Home tab. In
our example, we'll make the selected cells bold.
You can also press Ctrl+B on your keyboard to make selected text bold,
Ctrl+I to apply italics, and Ctrl+U to apply an underline.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 67/258
5/19/2020 Excel: What-if Analysis
2 On the Home tab, click the drop-down arrow next to the Fill Color
command, then select the fill color you want to use. In our example, we'll
choose a dark gray.
3 The selected fill color will appear in the selected cells. We've also changed
the font color to white to make it more readable with this dark fill color.
To add a border:
1 Select the cell(s) you want to modify.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 68/258
5/19/2020 Excel: What-if Analysis
2 On the Home tab, click the drop-down arrow next to the Borders
command, then select the border style you want to use. In our example,
we'll choose to display All Borders.
You can draw borders and change the line style and color of borders with
the Draw Borders tools at the bottom of the Borders drop-down menu.
Cell styles
Instead of formatting cells manually, you can use Excel's predesigned cell styles. Cell
styles are a quick way to include professional formatting for di erent parts of your
workbook, like titles and headers.
In our example, we'll apply a new cell style to our existing title and header cells.
2 Click the Cell Styles command on the Home tab, then choose the desired
style from the drop-down menu.
Applying a cell style will replace any existing cell formatting except for text
alignment. You may not want to use cell styles if you've already added a lot
of formatting to your workbook.
Text alignment
By default, any text entered into your worksheet will be aligned to the bottom-le of a
cell, while any numbers will be aligned to the bottom-right. Changing the alignment of
your cell content allows you to choose how the content is displayed in any cell, which
can make your cell content easier to read.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 70/258
5/19/2020 Excel: What-if Analysis
Click the arrows in the slideshow below to learn more about the di erent
text alignment options.
2 Select one of the three horizontal alignment commands on the Home tab.
In our example, we'll choose Center Align.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 71/258
5/19/2020 Excel: What-if Analysis
2 Select one of the three vertical alignment commands on the Home tab. In
our example, we'll choose Middle Align.
You can apply both vertical and horizontal alignment settings to any cell.
Watch the video below to learn two di erent ways to use the Format
Painter.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 72/258
5/19/2020 Excel: What-if Analysis
Challenge!
1 Open our practice workbook.
4 Change the font size of row 1 to 36 and the font size for the rest of the rows
to 18.
7 Change the font of the rest of the rows to a di erent font of your choice.
9 Select all of the text in the worksheet, then change the horizontal
alignment to center align and the vertical alignment to middle align.
10 When you're finished, your worksheet should look something like this:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 73/258
5/19/2020 Excel: What-if Analysis
Watch the video below to learn more about number formats in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 74/258
5/19/2020 Excel: What-if Analysis
Number formats not only make your spreadsheet easier to read, but they also make it
easier to use. When you apply a number format, you're telling your spreadsheet exactly
what types of values are stored in a cell. For example, the date format tells the
spreadsheet that you're entering specific calendar dates. This allows the spreadsheet
to better understand your data, which can help ensure that your data remains consistent
and that your formulas are calculated correctly.
If you don't need to use a specific number format, the spreadsheet will
usually apply the general number format by default. However, the general
format may apply some small formatting changes to your data.
▶ Go to the Home tab, click the Number Format drop-down menu in the
Number group, and select the desired format.
You can also select the desired cells and press Ctrl+1 on your keyboard to
access additional number-formatting options.
In this example, we've applied the Currency number format, which adds currency
symbols ($) and displays two decimal places for any numerical values.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 75/258
5/19/2020 Excel: What-if Analysis
If you select any cells with number formatting, you can see the actual value of the cell in
the formula bar. The spreadsheet will use this value for formulas and other calculations.
Now that you know more about how number formats work, we'll look at a few number
formats in action.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 76/258
5/19/2020 Excel: What-if Analysis
Percentage formats
One of the most helpful number formats is the percentage (%) format. It displays values
as percentages, like 20% or 55%. This is especially helpful when calculating things like
the cost of sales tax or a tip. When you type a percent sign (%) a er a number, the
percentage number format will be be applied to that cell automatically.
As you may remember from math class, a percentage can also be written as a decimal.
So 15% is the same thing as 0.15, 7.5% is 0.075, 20% is 0.20, 55% is 0.55, and so on. You
can review this lesson from our Math tutorials to learn more about converting
percentages to decimals.
There are many times when percentage formatting will be useful. For example, in the
images below notice how the sales tax rate is formatted di erently for each
spreadsheet (5, 5%, and 0.05):
As you can see, the calculation in the spreadsheet on the le didn't work correctly.
Without the percentage number format, our spreadsheet thinks we want to multiply
$22.50 by 5, not 5%. And while the spreadsheet on the right still works without
percentage formatting, the spreadsheet in the middle is easier to read.
Date formats
Whenever you're working with dates, you'll want to use a date format to tell the
spreadsheet that you're referring to specific calendar dates, like July 15, 2014. Date
formats also allow you to work with a powerful set of date functions that use time and
date information to calculate an answer.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 77/258
5/19/2020 Excel: What-if Analysis
Spreadsheets don't understand information the same way a person would. For instance,
if you type October into a cell, the spreadsheet won't know you're entering a date so it
will treat it like any other text. Instead, when you enter a date, you'll need to use a
specific format your spreadsheet understands, like month/day/year (or
day/month/year depending on which country you're in). In the example below, we'll
type 10/12/2014 for October 12, 2014. Our spreadsheet will then automatically apply
the date number format for the cell.
Now that we have our date correctly formatted, we can do di erent things with this
data. For example, we could use the fill handle to continue the dates through the
column, so a di erent day appears in each cell:
If the date formatting isn't applied automatically, it means the spreadsheet did not
understand the data you entered. In the example below, we've typed March 15th. The
spreadsheet did not understand that we were referring to a date, so this cell is still using
the general number format.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 78/258
5/19/2020 Excel: What-if Analysis
On the other hand, if we type March 15 (without the "th"), the spreadsheet will
recognize it as a date. Because it doesn't include a year, the spreadsheet will
automatically add the current year so the date will have all of the necessary information.
We could also type the date several other ways, like 3/15, 3/15/2014, or March 15 2014,
and the spreadsheet would still recognize it as a date.
Try entering the dates below into a spreadsheet and see if the date format is applied
automatically:
▶ 10/12
▶ October
▶ October 12
▶ October 2016
▶ 10/12/2016
▶ 2016
▶ October 12th
If you want to add the current date to a cell, you can use the Ctrl+; shortcut,
as shown in the video below.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 79/258
5/19/2020 Excel: What-if Analysis
The Format Cells dialog box will appear. From here, you can choose the desired date
formatting option.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 80/258
5/19/2020 Excel: What-if Analysis
As you can see in the formula bar, a custom date format not only changes the actual date
in our cell but also the way it's displayed.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 81/258
5/19/2020 Excel: What-if Analysis
▶ If you want your data to appear exactly as entered, you'll need to use the
text number format. This format is especially good for numbers you don't
want to perform calculations with, like phone numbers, zip codes, or
numbers that begin with 0, like 02415. For best results, you may want to
apply the text number format before entering data into these cells.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 82/258
5/19/2020 Excel: What-if Analysis
The Increase Decimal and Decrease Decimal commands allow you to control how
many decimal places are displayed in a cell. These commands don't change the value of
the cell; instead, they display the value to a set number of decimal places.
Decreasing the decimal will display the value rounded to that decimal place, but the
actual value in the cell will still be displayed in the formula bar.
The Increase Decimal and Decrease Decimal commands don't work with
some number formats, like Date and Fraction.
Challenge!
1 Open our practice workbook.
3 Click cell D2 and verify that it is using a Date number format. Try changing it
to a di erent date format (for example, Long Date).
4 In cell D2, use the Format Cells dialog box to choose the 14-Mar-12 date
format.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 83/258
5/19/2020 Excel: What-if Analysis
Introduction
Every workbook contains at least one worksheet by default. When working with a large
amount of data, you can create multiple worksheets to help organize your workbook
and make it easier to find content. You can also group worksheets to quickly add
information to multiple worksheets at the same time.
Watch the video below to learn more about using multiple worksheets.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 84/258
5/19/2020 Excel: What-if Analysis
By default, any new workbook you create in Excel will contain one
worksheet, called Sheet1. To change the default number of worksheets,
navigate to Backstage view, click Options, then choose the desired
number of worksheets to include in each new workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 85/258
5/19/2020 Excel: What-if Analysis
To copy a worksheet:
If you need to duplicate the content of one worksheet to another, Excel allows you to
copy an existing worksheet.
1 Right-click the worksheet you want to copy, then select Move or Copy from
the worksheet menu.
2 The Move or Copy dialog box will appear. Choose where the sheet will
appear in the Before sheet: field. In our example, we'll choose (move to
end) to place the worksheet to the right of the existing worksheet.
4 The worksheet will be copied. It will have the same title as the original
worksheet, as well as a version number. In our example, we copied the
November worksheet, so our new worksheet is named November (2). All
content from the November worksheet has also been copied to the new
worksheet.
You can also copy a worksheet to an entirely di erent workbook. You can
select any workbook that is currently open from the To book: drop-down
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 86/258
5/19/2020 Excel: What-if Analysis
menu.
To rename a worksheet:
1 Right-click the worksheet you want to rename, then select Rename from
the worksheet menu.
To move a worksheet:
1 Click and drag the worksheet you want to move until a small black arrow
appears above the desired location.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 87/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 88/258
5/19/2020 Excel: What-if Analysis
To delete a worksheet:
1 Right-click the worksheet you want to delete, then select Delete from the
worksheet menu.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 89/258
5/19/2020 Excel: What-if Analysis
may require scrolling through all of the tabs to find the one you want. Instead, you can
simply right-click the scroll arrows in the lower-le corner, as shown below.
A dialog box will appear with a list of all of the sheets in your workbook. You can then
double-click the sheet you want to jump to.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 90/258
5/19/2020 Excel: What-if Analysis
To group worksheets:
1 Select the first worksheet you want to include in the worksheet group.
2 Press and hold the Ctrl key on your keyboard. Select the next worksheet
you want in the group.
3 Continue to select worksheets until all of the worksheets you want to group
are selected, then release the Ctrl key. The worksheets are now grouped.
While worksheets are grouped, you can navigate to any worksheet within
the group. Any changes made to one worksheet will appear on every
worksheet in the group. However, if you select a worksheet that is not in
the group, all of your worksheets will become ungrouped.
To ungroup worksheets:
1 Right-click a worksheet in the group, then select Ungroup Sheets from the
worksheet menu.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 91/258
5/19/2020 Excel: What-if Analysis
2 The worksheets will be ungrouped. You can also click any worksheet not
included in the group to ungroup all worksheets.
Challenge!
1 Open our practice workbook.
3 Move the Expenses Summary worksheet to the far right, then move the Q1
Summary worksheet so it is between March and April.
5 Change the color of the January tab to blue and the color of the February
tab to red.
7 When you're finished, your workbook should look something like this:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 92/258
5/19/2020 Excel: What-if Analysis
Introduction
When working with a lot of data in Excel, it can be di icult and time consuming to locate
specific information. You can easily search your workbook using the Find feature, which
also allows you to modify content using the Replace feature.
Watch the video below to learn more about using Find and Replace.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 93/258
5/19/2020 Excel: What-if Analysis
1 From the Home tab, click the Find and Select command, then select Find
from the drop-down menu.
2 The Find and Replace dialog box will appear. Enter the content you want
to find. In our example, we'll type the department's name.
3 Click Find Next. If the content is found, the cell containing that content will
be selected.
4 Click Find Next to find more instances or Find All to see every instance of
the search term.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 94/258
5/19/2020 Excel: What-if Analysis
5 When you are finished, click Close to exit the Find and Replace dialog box.
You can also access the Find command by pressing Ctrl+F on your
keyboard.
Click Options to see advanced search criteria in the Find and Replace dialog
box.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 95/258
5/19/2020 Excel: What-if Analysis
1 From the Home tab, click the Find & Select command, then select
Replace... from the drop-down menu.
2 The Find and Replace dialog box will appear. Type the text you want to find
in the Find what: field.
3 Type the text you want to replace it with in the Replace with: field, then
click Find Next.
4 If the content is found, the cell containing this content will be selected.
6 If you want to replace it, select one of the replace options. Choosing
Replace will replace individual instances, while Replace All will replace
every instance of the text throughout the workbook. In our example, we'll
choose this option to save time.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 96/258
5/19/2020 Excel: What-if Analysis
9 When you're finished, click Close to exit the Find and Replace dialog box.
Generally, it's best to avoid using Replace All because it doesn't give you
the option of skipping anything you don't want to change. You should only
use this option if you're absolutely sure it won't replace anything you didn't
intend it to.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 97/258
5/19/2020 Excel: What-if Analysis
Challenge!
1 Open our practice workbook.
3 Crystal Lewis got married and changed her last name to Taylor. Use Find
and Replace to change Crystal's last name from Lewis to Taylor. Be careful
to only change Crystal's last name!
4 Find and replace Bio with Biology. Be careful not to change the Biomedical
Engineering major!
5 Use Find and Replace All to replace the Physics major to Physical Science.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 98/258
5/19/2020 Excel: What-if Analysis
Introduction
Before sharing a workbook, you'll want to make sure it doesn't include any spelling
errors. Fortunately, Excel includes a spell check tool you can use to make sure
everything in your workbook is spelled correctly.
If you've used the spell check feature in Microso Word, just be aware that the spell
check tool in Excel, while helpful, is not as powerful. For example, it won't check for
grammar issues or check spelling as you type.
2 The Spelling dialog box will appear. For each spelling error in your
worksheet, it will try to o er suggestions for the correct spelling. Choose a
suggestion, then click Change to correct the error.
3 A dialog box will appear a er reviewing all spelling errors. Click OK to close
spell check.
If there are no appropriate suggestions, you can also enter the correct
spelling manually.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 99/258
5/19/2020 Excel: What-if Analysis
▶ Ignore Once: This will skip the word without changing it.
▶ Ignore All: This will skip the word without changing it and also skip all
other instances of the word in your worksheet.
▶ Add: This adds the word to the dictionary so it will never appear as an error
again. Make sure the word is spelled correctly before choosing this option.
Challenge!
1 Open our practice workbook.
3 Run the spell check to correct any spelling errors in the workbook.
7 Bonus Step! There is one error spell check didn't catch. Can you spot it?
Hint: It's in one of the item descriptions.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 100/258
5/19/2020 Excel: What-if Analysis
Introduction
There may be times when you want to print a workbook to view and share your data
o line. Once you've chosen your page layout settings, it's easy to preview and print a
workbook from Excel using the Print pane.
Watch the video below to learn more about page layout and printing.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 101/258
5/19/2020 Excel: What-if Analysis
Click the buttons in the interactive below to learn more about using the
Print pane.
To print a workbook:
1 Navigate to the Print pane, then select the desired printer.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 102/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 103/258
5/19/2020 Excel: What-if Analysis
4 Click Print.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 104/258
5/19/2020 Excel: What-if Analysis
3 Select Print Active Sheets from the Print Range drop-down menu.
2 Select Print Entire Workbook from the Print Range drop-down menu.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 105/258
5/19/2020 Excel: What-if Analysis
To print a selection:
In our example, we'll print the records for the top 40 salespeople on the Central
worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 106/258
5/19/2020 Excel: What-if Analysis
If you prefer, you can also set the print area in advance so you'll be able to
visualize which cells will be printed as you work in Excel. Simply select the
cells you want to print, click the Page Layout tab, select the Print Area
command, then choose Set Print Area. Keep in mind that if you ever need
to print the entire workbook, you'll need to clear the print area.
Adjusting content
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 107/258
5/19/2020 Excel: What-if Analysis
On occasion, you may need to make small adjustments from the Print pane to fit your
workbook content neatly onto a printed page. The Print pane includes several tools to
help fit and scale your content, including scaling and page margins.
2 Select the desired orientation from the Page Orientation drop-down menu.
In our example, we'll select Landscape Orientation.
If some of your content is being cut o by the printer, you can use scaling to fit your
workbook to the page automatically.
1 Navigate to the Print pane. In our example, we can see in the Preview pane
that our content will be cut o when printed.
2 Select the desired option from the Scaling drop-down menu. In our
example, we'll select Fit All Columns on One Page.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 109/258
5/19/2020 Excel: What-if Analysis
Keep in mind that worksheets will become more di icult to read as they are scaled
down, so you may not want to use this option when printing a worksheet with a lot of
information. In our example, we'll change the scaling setting back to No Scaling.
1 Click the Page Layout tab on the Ribbon, then select the Print Titles
command.
2 The Page Setup dialog box will appear. From here, you can choose rows or
columns to repeat on each page. In our example, we'll repeat a row first.
3 Click the Collapse Dialog button next to the Rows to repeat at top: field.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 110/258
5/19/2020 Excel: What-if Analysis
4 The cursor will become a small selection arrow, and the Page Setup dialog
box will be collapsed. Select the row(s) you want to repeat at the top of
each printed page. In our example, we'll select row 1.
5 Row 1 will be added to the Rows to repeat at top: field. Click the Collapse
Dialog button again.
6 The Page Setup dialog box will expand. To repeat a column as well, use the
same process shown in steps 4 and 5. In our example, we've selected to
repeat row 1 and column A.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 111/258
5/19/2020 Excel: What-if Analysis
8 In our example, row 1 appears at the top of every page, and column A
appears at the le of every page.
2 Vertical and horizontal blue dotted lines denote the page breaks. Click and
drag one of these lines to adjust the page break.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 112/258
5/19/2020 Excel: What-if Analysis
3 In our example, we've set the horizontal page break between rows 21 and
22.
4 In our example, all of the pages now show the same number of rows due to
the change in the page break.
2 Select the desired margin size from the Page Margins drop-down menu. In
our example, we'll select Narrow.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 113/258
5/19/2020 Excel: What-if Analysis
You can adjust the margins manually by clicking the Show Margins button
in the lower-right corner, then dragging the margin markers in the Preview
pane.
Challenge!
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 114/258
5/19/2020 Excel: What-if Analysis
3 In the Page Layout tab, use the Print Titles feature to repeat row 1 at the
top and column A at the le .
4 Using the Page Break Preview command, move the break between rows 47
and 48 up so it's between rows 40 and 41.
9 When you're finished, your print preview should look like this:
Introduction
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 115/258
5/19/2020 Excel: What-if Analysis
One of the most powerful features in Excel is the ability to calculate numerical
information using formulas. Just like a calculator, Excel can add, subtract, multiply, and
divide. In this lesson, we'll show you how to use cell references to create simple
formulas.
Watch the video below to learn more about creating formulas in Excel.
Mathematical operators
Excel uses standard operators for formulas: a plus sign for addition (+), minus sign for
subtraction (-), asterisk for multiplication (*), forward slash for division (/), and caret
(^) for exponents.
All formulas in Excel must begin with an equals sign (=). This is because the cell
contains, or is equal to, the formula and the value it calculates.
While you can create simple formulas in Excel using numbers (for example, =2+2 or
=5*5), most of the time you will use cell addresses to create a formula. This is known as
making a cell reference. Using cell references will ensure that your formulas are always
accurate because you can change the value of referenced cells without having to rewrite
the formula.
In the formula below, cell A3 adds the values of cells A1 and A2 by making cell
references:
When you press Enter, the formula calculates and displays the answer in cell A3:
If the values in the referenced cells change, the formula automatically recalculates:
By combining a mathematical operator with cell references, you can create a variety of
simple formulas in Excel. Formulas can also include a combination of cell references and
numbers, as in the examples below:
To create a formula:
In our example below, we'll use a simple formula and cell references to calculate a
budget.
1 Select the cell that will contain the formula. In our example, we'll select cell
D12.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 117/258
5/19/2020 Excel: What-if Analysis
2 Type the equals sign (=). Notice how it appears in both the cell and the
formula bar.
3 Type the cell address of the cell you want to reference first in the formula:
cell D10 in our example. A blue border will appear around the referenced
cell.
4 Type the mathematical operator you want to use. In our example, we'll
type the addition sign (+).
5 Type the cell address of the cell you want to reference second in the
formula: cell D11 in our example. A red border will appear around the
referenced cell.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 118/258
5/19/2020 Excel: What-if Analysis
6 Press Enter on your keyboard. The formula will be calculated, and the
value will be displayed in the cell. If you select the cell again, notice that the
cell displays the result, while the formula bar displays the formula.
Excel will not always tell you if your formula contains an error, so it's up to
you to check all of your formulas. To learn how to do this, you can read the
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 119/258
5/19/2020 Excel: What-if Analysis
1 Select the cell that will contain the formula. In our example, we'll select cell
D4.
3 Select the cell you want to reference first in the formula: cell B4 in our
example. The cell address will appear in the formula.
4 Type the mathematical operator you want to use. In our example, we'll
type the multiplication sign (*).
5 Select the cell you want to reference second in the formula: cell C4 in our
example. The cell address will appear in the formula.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 120/258
5/19/2020 Excel: What-if Analysis
6 Press Enter on your keyboard. The formula will be calculated, and the
value will be displayed in the cell.
1 Select the cell containing the formula you want to copy. Click and drag the
fill handle over the cells you want to fill.
2 A er you release the mouse, the formula will be copied to the selected cells.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 121/258
5/19/2020 Excel: What-if Analysis
To edit a formula:
Sometimes you may want to modify an existing formula. In the example below, we've
entered an incorrect cell address in our formula, so we'll need to correct it.
1 Select the cell containing the formula you want to edit. In our example,
we'll select cell D12.
2 Click the formula bar to edit the formula. You can also double-click the cell
to view and edit the formula directly within the cell.
3 A border will appear around any referenced cells. In our example, we'll
change the first part of the formula to reference cell D10 instead of cell D9.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 122/258
5/19/2020 Excel: What-if Analysis
4 When you're finished, press Enter on your keyboard or select the Enter
command in the formula bar.
5 The formula will be updated, and the new value will be displayed in the
cell.
If you change your mind, you can press the Esc key on your keyboard or
click the Cancel command in the formula bar to avoid accidentally making
changes to your formula.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 123/258
5/19/2020 Excel: What-if Analysis
To show all of the formulas in a spreadsheet, you can hold the Ctrl key and
press ` (grave accent). The grave accent key is usually located in the top-le
corner of the keyboard. You can press Ctrl+` again to switch back to the
normal view.
Challenge!
1 Open our practice workbook.
4 Use the fill handle to copy the formula in cell D4 to cells D5:D7.
5 Change the price per unit for the fried plantains in cell C6 to $2.25. Notice
that the line total automatically changes as well.
6 Edit the formula for the total in cell D8 so it also adds cell D7.
Introduction
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 124/258
5/19/2020 Excel: What-if Analysis
You may have experience working with formulas that contain only one operator, like
7+9. More complex formulas can contain several mathematical operators, like 5+2*8.
When there's more than one operation in a formula, the order of operations tells Excel
which operation to calculate first. To write formulas that will give you the correct
answer, you'll need to understand the order of operations.
A mnemonic that can help you remember the order is PEMDAS, or Please
Excuse My Dear Aunt Sally.
Click the arrows in the slideshow below to learn how the order of
operations is used to calculate formulas in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 125/258
5/19/2020 Excel: What-if Analysis
While this formula may look complicated, we can use the order of operations step by step to find the
right answer.
Excel follows the order of operations and first adds the values inside the parentheses:
(45.80+68.70+159.60) = 274.10. It then multiplies that value by the tax rate:
274.10*0.075. The result will show that the sales tax is $20.56.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 126/258
5/19/2020 Excel: What-if Analysis
1 Select the cell that will contain the formula. In our example, we'll select cell
C5.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 127/258
5/19/2020 Excel: What-if Analysis
You can add parentheses to any equation to make it easier to read. While it
won't change the result of the formula in this example, we could enclose
the multiplication operations within parentheses to clarify that they will be
calculated before the addition.
Excel will not always tell you if your formula contains an error, so it's up to
you to check all of your formulas. To learn how to do this, you can read the
Double-Check Your Formulas lesson from our Excel Formulas tutorial.
Challenge!
For this challenge, you will work with another invoice like the one in our example. In the
invoice, you will find the amount of tax for the order, the order's total, and the order's
total if you were given a 10% discount.
3 In cell D7, create a formula that calculates the tax for the invoice. Use a
sales tax rate of 7.5%.
4 In cell D8, create a formula that finds the total for the order. In other words,
this formula should add cells D3:D7.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 128/258
5/19/2020 Excel: What-if Analysis
Introduction
There are two types of cell references: relative and absolute. Relative and absolute
references behave di erently when copied and filled to other cells. Relative references
change when a formula is copied to another cell. Absolute references, on the other
hand, remain constant no matter where they are copied.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 129/258
5/19/2020 Excel: What-if Analysis
Relative references
By default, all cell references are relative references. When copied across multiple cells,
they change based on the relative position of rows and columns. For example, if you
copy the formula =A1+B1 from row 1 to row 2, the formula will become =A2+B2. Relative
references are especially convenient whenever you need to repeat the same calculation
across multiple rows or columns.
1 Select the cell that will contain the formula. In our example, we'll select cell
D4.
2 Enter the formula to calculate the desired value. In our example, we'll type
=B4*C4.
3 Press Enter on your keyboard. The formula will be calculated, and the
result will be displayed in the cell.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 130/258
5/19/2020 Excel: What-if Analysis
4 Locate the fill handle in the bottom-right corner of the desired cell. In our
example, we'll locate the fill handle for cell D4.
5 Click and drag the fill handle over the cells you want to fill. In our example,
we'll select cells D5:D13.
6 Release the mouse. The formula will be copied to the selected cells with
relative references, displaying the result in each cell.
You can double-click the filled cells to check their formulas for accuracy.
The relative cell references should be di erent for each cell, depending on
their rows.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 131/258
5/19/2020 Excel: What-if Analysis
Absolute references
There may be a time when you don't want a cell reference to change when copied to
other cells. Unlike relative references, absolute references do not change when copied
or filled. You can use an absolute reference to keep a row and/or column constant.
You will generally use the $A$2 format when creating formulas that contain
absolute references. The other two formats are used much less frequently.
When writing a formula, you can press the F4 key on your keyboard to switch between
relative and absolute cell references, as shown in the video below. This is an easy way to
quickly insert an absolute reference.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 132/258
5/19/2020 Excel: What-if Analysis
1 Select the cell that will contain the formula. In our example, we'll select cell
D4.
2 Enter the formula to calculate the desired value. In our example, we'll type
=(B4*C4)*$E$2, making $E$2 an absolute reference.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 133/258
5/19/2020 Excel: What-if Analysis
3 Press Enter on your keyboard. The formula will calculate, and the result will
display in the cell.
4 Locate the fill handle in the bottom-right corner of the desired cell. In our
example, we'll locate the fill handle for cell D4.
5 Click and drag the fill handle over the cells you want to fill (cells D5:D13 in
our example).
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 134/258
5/19/2020 Excel: What-if Analysis
6 Release the mouse. The formula will be copied to the selected cells with an
absolute reference, and the values will be calculated in each cell.
You can double-click the filled cells to check their formulas for accuracy.
The absolute reference should be the same for each cell, while the other
references are relative to the cell's row.
Be sure to include the dollar sign ($) whenever you're making an absolute
reference across multiple cells. The dollar signs were omitted in the
example below. This caused Excel to interpret it as a relative reference,
producing an incorrect result when copied to other cells.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 135/258
5/19/2020 Excel: What-if Analysis
1 Locate the cell you want to reference, and note its worksheet. In our
example, we want to reference cell E14 on the Menu Order worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 136/258
5/19/2020 Excel: What-if Analysis
3 Locate and select the cell where you want the value to appear. In our
example, we'll select cell C4.
4 Type the equals sign (=), the sheet name followed by an exclamation
point (!), and the cell address. In our example, we'll type ='Menu
Order'!E14.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 137/258
5/19/2020 Excel: What-if Analysis
5 Press Enter on your keyboard. The value of the referenced cell will appear.
Now, if the value of cell E14 changes on the Menu Order worksheet, it will be
updated automatically on the Catering Invoice worksheet.
If you rename your worksheet at a later point, the cell reference will be
updated automatically to reflect the new worksheet name.
If you enter a worksheet name incorrectly, the #REF! error will appear in the
cell. In our example below, we've mistyped the name of the worksheet. To
edit, ignore, or investigate the error, click the Error button beside the cell
and choose an option from the menu.
Challenge!
1 Open our practice workbook.
3 In cell D4, enter a formula that multiplies the unit price in B4, the quantity
in C4, and the tax rate in E2. Make sure to use an absolute cell reference for
the tax rate because it will be the same in every cell.
4 Use the fill handle to copy the formula you just created to cells D5:D12.
5 Change the tax rate in cell E2 to 6.5%. Notice that all of your cells have
updated. When you're finished, your workbook should look like this:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 138/258
5/19/2020 Excel: What-if Analysis
7 Delete the value in cell C5 and replace it with a reference to the total cost of
the paper goods. Hint: The cost of the paper goods is in cell E13 on the
Paper Goods worksheet.
8 Use the same steps from above to calculate the sales tax for each item on
the Menu Order worksheet. The total cost in cell E14 should update. Then,
in cell C4 of the Catering Invoice worksheet, create a cell reference to the
total you just calculated. Note: If you used our practice workbook to follow
along during the lesson, you may have already completed this step.
Introduction
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 139/258
5/19/2020 Excel: What-if Analysis
Watch the video below to learn more about working with functions.
Excel: Functions
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 140/258
5/19/2020 Excel: What-if Analysis
For example, the function =AVERAGE(B1:B9) would calculate the average of the values
in the cell range B1:B9. This function contains only one argument.
Creating a function
There are a variety of functions available in Excel. Here are some of the most common
functions you'll use:
▶ SUM: This function adds all of the values of the cells in the argument.
▶ COUNT: This function counts the number of cells with numerical data in the
argument. This function is useful for quickly counting items in a cell range.
▶ MAX: This function determines the highest cell value included in the
argument.
▶ MIN: This function determines the lowest cell value included in the
argument.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 141/258
5/19/2020 Excel: What-if Analysis
1 Select the cell that will contain the function. In our example, we'll select cell
D13.
2 In the Editing group on the Home tab, click the arrow next to the AutoSum
command. Next, choose the desired function from the drop-down menu.
In our example, we'll select Sum.
3 Excel will place the function in the cell and automatically select a cell
range for the argument. In our example, cells D3:D12 were selected
automatically; their values will be added to calculate the total cost. If Excel
selects the wrong cell range, you can manually enter the desired cells into
the argument.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 142/258
5/19/2020 Excel: What-if Analysis
4 Press Enter on your keyboard. The function will be calculated, and the
result will appear in the cell. In our example, the sum of D3:D12 is $765.29.
The AutoSum command can also be accessed from the Formulas tab on
the Ribbon.
You can also use the Alt+= keyboard shortcut instead of the AutoSum command. To use
this shortcut, hold down the Alt key and then press the equals sign.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 143/258
5/19/2020 Excel: What-if Analysis
1 Select the cell that will contain the function. In our example, we'll select cell
C10.
2 Type the equals sign (=), then enter the desired function name. You can
also select the desired function from the list of suggested functions that
appears below the cell as you type. In our example, we'll type =AVERAGE.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 144/258
5/19/2020 Excel: What-if Analysis
3 Enter the cell range for the argument inside parentheses. In our example,
we'll type (C3:C9). This formula will add the values of cells C3:C9, then
divide that value by the total number of values in the range.
4 Press Enter on your keyboard. The function will be calculated, and the
result will appear in the cell. In our example, the average number of units
sold by each troop is 849.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 145/258
5/19/2020 Excel: What-if Analysis
Excel will not always tell you if your formula contains an error, so it's up to
you to check all of your formulas. To learn how to do this, read the Double-
Check Your Formulas lesson from our Excel Formulas tutorial.
To access the Function Library, select the Formulas tab on the Ribbon. Look for the
Function Library group.
Click the buttons in the interactive below to learn more about the di erent
types of functions in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 146/258
5/19/2020 Excel: What-if Analysis
1 Select the cell that will contain the function. In our example, we'll select cell
B17.
2 Click the Formulas tab on the Ribbon to access the Function Library.
3 From the Function Library group, select the desired function category. In
our example, we'll choose More Functions, then hover the mouse over
Statistical.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 147/258
5/19/2020 Excel: What-if Analysis
4 Select the desired function from the drop-down menu. In our example,
we'll select the COUNTA function, which will count the number of cells in
the Items column that are not empty.
5 The Function Arguments dialog box will appear. Select the Value1 field,
then enter or select the desired cells. In our example, we'll enter the cell
range A3:A12. You can continue to add arguments in the Value2 field, but in
this case we only want to count the number of cells in the cell range A3:A12.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 148/258
5/19/2020 Excel: What-if Analysis
7 The function will be calculated, and the result will appear in the cell. In our
example, the result shows that 10 items were ordered.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 149/258
5/19/2020 Excel: What-if Analysis
In the example below, we want to find a function that will calculate the number of
business days it took to receive items a er they were ordered. We'll use the dates in
columns E and F to calculate the delivery time in column G.
1 Select the cell that will contain the function. In our example, we'll select cell
G3.
2 Click the Formulas tab on the Ribbon, then click the Insert Function
command.
4 Type a few keywords describing the calculation you want the function to
perform, then click Go. In our example, we'll type count days, but you can
also search by selecting a category from the drop-down list.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 150/258
5/19/2020 Excel: What-if Analysis
5 Review the results to find the desired function, then click OK. In our
example, we'll choose NETWORKDAYS, which will count the number of
business days between the ordered date and received date.
6 The Function Arguments dialog box will appear. From here, you'll be able
to enter or select the cells that will make up the arguments in the function.
In our example, we'll enter E3 in the Start_date field and F3 in the
End_date field.
8 The function will be calculated, and the result will appear in the cell. In our
example, the result shows that it took four business days to receive the
order.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 151/258
5/19/2020 Excel: What-if Analysis
Like formulas, functions can be copied to adjacent cells. Simply select the
cell that contains the function, then click and drag the fill handle over the
cells you want to fill. The function will be copied, and values for those cells
will be calculated relative to their rows or columns.
To learn more:
If you're comfortable with basic functions, you may want to try a more advanced one
like VLOOKUP. Review our lesson on How to Use Excel's VLOOKUP Function for more
information.
To learn even more about working with functions, visit our Excel Formulas tutorial.
Challenge!
1 Open our practice workbook.
3 In cell F3, insert a function to calculate the average of the four scores in
cells B3:E3.
4 Use the fill handle to copy your function in cell F3 to cells F4:F17.
5 In cell B18, use AutoSum to insert a function that calculates the lowest
score in cells B3:B17.
6 In cell B19, use the Function Library to insert a function that calculates the
median of the scores in cells B3:B17. Hint: You can find the median
function by going to More Functions > Statistical.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 152/258
5/19/2020 Excel: What-if Analysis
7 In cell B20, create a function to calculate the highest score in cells B3:B17.
8 Select cells B18:B20, then use the fill handle to copy all three functions you
just created to cells C18:F20.
Introduction
Excel workbooks are designed to store a lot of information. Whether you're working with
20 cells or 20,000, Excel has several features to help you organize your data and find
what you need. You can see some of the most useful features below. And be sure to
review the other lessons in this tutorial to get step-by-step instructions for each of these
features.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 153/258
5/19/2020 Excel: What-if Analysis
Sorting data
You can quickly reorganize a worksheet by sorting your data. Content can be sorted
alphabetically, numerically, and in several other ways. For example, you can organize a
list of contact information by last name.
Filtering data
Filters can be used to narrow down the data in your worksheet, allowing you to view
only the information you need. In this example, we're filtering the worksheet to show
only rows that contain the words Laptop or Projector in column B.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 154/258
5/19/2020 Excel: What-if Analysis
Summarizing data
The Subtotal command allows you to quickly summarize data. In our example, we've
created a subtotal for each T-shirt size, which makes it easy to see how many we'll need
in each size.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 155/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 156/258
5/19/2020 Excel: What-if Analysis
Introduction
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 157/258
5/19/2020 Excel: What-if Analysis
Whenever you're working with a lot of data, it can be di icult to compare information in
your workbook. Fortunately, Excel includes several tools that make it easier to view
content from di erent parts of your workbook at the same time, including the ability to
freeze panes and split your worksheet.
Watch the video below to learn more about freezing panes in Excel.
To freeze rows:
You may want to see certain rows or columns all the time in your worksheet, especially
header cells. By freezing rows or columns in place, you'll be able to scroll through your
content while continuing to view the frozen cells.
1 Select the row below the row(s) you want to freeze. In our example, we
want to freeze rows 1 and 2, so we'll select row 3.
2 On the View tab, select the Freeze Panes command, then choose Freeze
Panes from the drop-down menu.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 158/258
5/19/2020 Excel: What-if Analysis
3 The rows will be frozen in place, as indicated by the gray line. You can
scroll down the worksheet while continuing to view the frozen rows at the
top. In our example, we've scrolled down to row 18.
To freeze columns:
1 Select the column to the right of the column(s) you want to freeze. In our
example, we want to freeze column A, so we'll select column B.
2 On the View tab, select the Freeze Panes command, then choose Freeze
Panes from the drop-down menu.
3 The column will be frozen in place, as indicated by the gray line. You can
scroll across the worksheet while continuing to view the frozen column on
the le . In our example, we've scrolled across to column E.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 159/258
5/19/2020 Excel: What-if Analysis
If you only need to freeze the top row (row 1) or first column (column A) in
the worksheet, you can simply select Freeze Top Row or Freeze First
Column from the drop-down menu.
To unfreeze panes:
If you want to select a di erent view option, you may first need to reset the spreadsheet
by unfreezing panes. To unfreeze rows or columns, click the Freeze Panes command,
then select Unfreeze Panes from the drop-down menu.
Excel allows you to open multiple windows for a single workbook at the same time. In
our example, we'll use this feature to compare two di erent worksheets from the same
workbook.
1 Click the View tab on the Ribbon, then select the New Window command.
3 You can now compare di erent worksheets from the same workbook across
windows. In our example, we'll select the 2013 Sales Detailed View
worksheet to compare 2012 and 2013 sales.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 161/258
5/19/2020 Excel: What-if Analysis
If you have several windows open at the same time, you can use the
Arrange All command to rearrange them quickly.
To split a worksheet:
Sometimes you may want to compare di erent sections of the same workbook without
creating a new window. The Split command allows you to divide the worksheet into
multiple panes that scroll separately.
1 Select the cell where you want to split the worksheet. In our example, we'll
select cell D6.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 162/258
5/19/2020 Excel: What-if Analysis
2 Click the View tab on the Ribbon, then select the Split command.
3 The workbook will be split into di erent panes. You can scroll through each
pane separately using the scroll bars, allowing you to compare di erent
sections of the workbook.
4 A er creating a split, you can click and drag the vertical and horizontal
dividers to change the size of each section.
Challenge!
Within our example file, there is A LOT of sales data. For this challenge, we want to be
able to compare data for di erent years side by side. To do this:
3 Freeze First Column and use the horizontal scroll bar to look at sales from
2015.
5 Select cell G17 and click Split to split the worksheet into multiple panes.
Hint: This should split the worksheet between rows 16 and 17 and columns
F and G.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 163/258
5/19/2020 Excel: What-if Analysis
6 Use the horizontal scroll bar in the bottom-right of the window to move the
worksheet so Column N, which contains data for January 2015, is next to
Column F.
7 Open a new window for your workbook and select the 2012-2013 Sales
tab.
8 Move your windows so they are side by side. Now you're able to compare
data for similar months from several di erent years. Your screen should
look something like this:
Introduction
As you add more content to a worksheet, organizing this information becomes
especially important. You can quickly reorganize a worksheet by sorting your data. For
example, you can organize a list of contact information by last name. Content can be
sorted alphabetically, numerically, and in several other ways.
Watch the video below to learn more about sorting data in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 164/258
5/19/2020 Excel: What-if Analysis
Types of sorting
When sorting data, it's important to first decide if you want the sort to apply to the
entire worksheet or just a cell range.
▶ Sort sheet organizes all of the data in your worksheet by one column.
Related information across each row is kept together when the sort is
applied. In the example below, the Contact Name column (column A) has
been sorted to display the names in alphabetical order.
▶ Sort range sorts the data in a range of cells, which can be helpful when
working with a sheet that contains several tables. Sorting a range will not
a ect other content in the worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 165/258
5/19/2020 Excel: What-if Analysis
To sort a sheet:
In our example, we'll sort a T-shirt order form alphabetically by Last Name (column C).
1 Select a cell in the column you want to sort. In our example, we'll select cell
C2.
2 Select the Data tab on the Ribbon, then click the A-Z command to sort A to
Z, or the Z-A command to sort Z to A. In our example, we'll sort A to Z.
3 The worksheet will be sorted by the selected column. In our example, the
worksheet is now sorted by last name.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 166/258
5/19/2020 Excel: What-if Analysis
To sort a range:
In our example, we'll select a separate table in our T-shirt order form to sort the number
of shirts that were ordered on di erent dates.
1 Select the cell range you want to sort. In our example, we'll select cell
range G2:H6.
2 Select the Data tab on the Ribbon, then click the Sort command.
3 The Sort dialog box will appear. Choose the column you want to sort. In our
example, we want to sort the data by the number of T-shirt orders, so we'll
select Orders.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 167/258
5/19/2020 Excel: What-if Analysis
6 The cell range will be sorted by the selected column. In our example, the
Orders column will be sorted from highest to lowest. Notice that the other
content in the worksheet was not a ected by the sort.
If your data isn't sorting properly, double-check your cell values to make
sure they are entered into the worksheet correctly. Even a small typo could
cause problems when sorting a large worksheet. In the example below, we
forgot to include a hyphen in cell A18, causing our sort to be slightly
inaccurate.
Custom sorting
Sometimes you may find that the default sorting options can't sort data in the order you
need. Fortunately, Excel allows you to create a custom list to define your own sorting
order.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 168/258
5/19/2020 Excel: What-if Analysis
1 Select a cell in the column you want to sort. In our example, we'll select cell
D2.
3 The Sort dialog box will appear. Select the column you want to sort, then
choose Custom List... from the Order field. In our example, we will choose
to sort by T-Shirt Size.
4 The Custom Lists dialog box will appear. Select NEW LIST from the Custom
Lists: box.
5 Type the items in the desired custom order in the List entries: box. In our
example, we want to sort our data by T-shirt size from smallest to largest,
so we'll type Small, Medium, Large, and X-Large, pressing Enter on the
keyboard a er each item.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 169/258
5/19/2020 Excel: What-if Analysis
6 Click Add to save the new sort order. The new list will be added to the
Custom lists: box. Make sure the new list is selected, then click OK.
7 The Custom Lists dialog box will close. Click OK in the Sort dialog box to
perform the custom sort.
8 The worksheet will be sorted by the custom order. In our example, the
worksheet is now organized by T-shirt size from smallest to largest.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 170/258
5/19/2020 Excel: What-if Analysis
Sorting levels
If you need more control over how your data is sorted, you can add multiple levels to
any sort. This allows you to sort your data by more than one column.
To add a level:
In our example below, we'll sort the worksheet by T-Shirt Size (Column D), then by
Homeroom # (column A).
1 Select a cell in the column you want to sort. In our example, we'll select cell
A2.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 171/258
5/19/2020 Excel: What-if Analysis
3 The Sort dialog box will appear. Select the first column you want to sort. In
this example, we will sort by T-Shirt Size (column D) with the custom list
we previously created for the Order field.
5 Select the next column you want to sort, then click OK. In our example,
we'll sort by Homeroom # (column A).
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 172/258
5/19/2020 Excel: What-if Analysis
If you need to change the order of a multilevel sort, it's easy to control
which column is sorted first. Simply select the desired column, then click
the Move Up or Move Down arrow to adjust its priority.
Challenge!
1 Open our practice workbook.
3 For the main table, create a custom sort that sorts by Grade from Smallest
to Largest and then by Camper Name from A to Z.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 173/258
5/19/2020 Excel: What-if Analysis
Introduction
If your worksheet contains a lot of content, it can be di icult to find information quickly.
Filters can be used to narrow down the data in your worksheet, allowing you to view
only the information you need.
Watch the video below to learn more about filtering data in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 174/258
5/19/2020 Excel: What-if Analysis
To filter data:
In our example, we'll apply a filter to an equipment log worksheet to display only the
laptops and projectors that are available for checkout.
3 A drop-down arrow will appear in the header cell for each column.
4 Click the drop-down arrow for the column you want to filter. In our
example, we will filter column B to view only certain types of equipment.
6 Uncheck the box next to Select All to quickly deselect all data.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 175/258
5/19/2020 Excel: What-if Analysis
7 Check the boxes next to the data you want to filter, then click OK. In this
example, we will check Laptop and Projector to view only these types of
equipment.
8 The data will be filtered, temporarily hiding any content that doesn't match
the criteria. In our example, only laptops and projectors are visible.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 176/258
5/19/2020 Excel: What-if Analysis
Filtering options can also be accessed from the Sort & Filter command on
the Home tab.
1 Click the drop-down arrow for the column you want to filter. In this
example, we will add a filter to column D to view information by date.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 177/258
5/19/2020 Excel: What-if Analysis
3 Check or uncheck the boxes depending on the data you want to filter, then
click OK. In our example, we'll uncheck everything except for August.
4 The new filter will be applied. In our example, the worksheet is now filtered
to show only laptops and projectors that were checked out in August.
To clear a filter:
A er applying a filter, you may want to remove—or clear—it from your worksheet so
you'll be able to filter content in di erent ways.
1 Click the drop-down arrow for the filter you want to clear. In our example,
we'll clear the filter in column D.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 178/258
5/19/2020 Excel: What-if Analysis
3 Choose Clear Filter From [COLUMN NAME] from the Filter menu. In our
example, we'll select Clear Filter From "Checked Out".
4 The filter will be cleared from the column. The previously hidden data will
be displayed.
To remove all filters from your worksheet, click the Filter command on the
Data tab.
Advanced filtering
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 179/258
5/19/2020 Excel: What-if Analysis
If you need a filter for something specific, basic filtering may not give you enough
options. Fortunately, Excel includes several advanced filtering tools, including search,
text, date, and number filtering, which can narrow your results to help find exactly
what you need.
1 Select the Data tab, then click the Filter command. A drop-down arrow
will appear in the header cell for each column. Note: If you've already
added filters to your worksheet, you can skip this step.
2 Click the drop-down arrow for the column you want to filter. In our
example, we'll filter column C.
3 The Filter menu will appear. Enter a search term into the search box.
Search results will appear automatically below the Text Filters field as you
type. In our example, we'll type saris to find all Saris brand equipment.
When you're done, click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 180/258
5/19/2020 Excel: What-if Analysis
1 Select the Data tab, then click the Filter command. A drop-down arrow
will appear in the header cell for each column. Note: If you've already
added filters to your worksheet, you can skip this step.
2 Click the drop-down arrow for the column you want to filter. In our
example, we'll filter column C.
3 The Filter menu will appear. Hover the mouse over Text Filters, then select
the desired text filter from the drop-down menu. In our example, we'll
choose Does Not Contain... to view data that does not contain specific text.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 181/258
5/19/2020 Excel: What-if Analysis
4 The Custom AutoFilter dialog box will appear. Enter the desired text to the
right of the filter, then click OK. In our example, we'll type laptop to exclude
any items containing this word.
5 The data will be filtered by the selected text filter. In our example, our
worksheet now displays items that do not contain the word laptop.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 182/258
5/19/2020 Excel: What-if Analysis
numbers.
1 Select the Data tab on the Ribbon, then click the Filter command. A drop-
down arrow will appear in the header cell for each column. Note: If you've
already added filters to your worksheet, you can skip this step.
2 Click the drop-down arrow for the column you want to filter. In our
example, we'll filter column A to view only a certain range of ID numbers.
3 The Filter menu will appear. Hover the mouse over Number Filters, then
select the desired number filter from the drop-down menu. In our example,
we'll choose Between to view ID numbers between a specific number
range.
4 The Custom AutoFilter dialog box will appear. Enter the desired number(s)
to the right of each filter, then click OK. In our example, we want to filter for
ID numbers greater than or equal to 3000 but less than or equal to 6000,
which will display ID numbers in the 3000-6000 range.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 183/258
5/19/2020 Excel: What-if Analysis
5 The data will be filtered by the selected number filter. In our example, only
items with an ID number between 3000 and 6000 are visible.
1 Select the Data tab, then click the Filter command. A drop-down arrow
will appear in the header cell for each column. Note: If you've already
added filters to your worksheet, you can skip this step.
2 Click the drop-down arrow for the column you want to filter. In our
example, we'll filter column D to view only a certain range of dates.
3 The Filter menu will appear. Hover the mouse over Date Filters, then
select the desired date filter from the drop-down menu. In our example,
we'll select Between... to view equipment that has been checked out
between July 15 and August 15.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 184/258
5/19/2020 Excel: What-if Analysis
4 The Custom AutoFilter dialog box will appear. Enter the desired date(s) to
the right of each filter, then click OK. In our example, we want to filter for
dates a er or equal to July 15, 2015, and before or equal to August 15,
2015, which will display a range between these dates.
5 The worksheet will be filtered by the selected date filter. In our example, we
can now see which items have been checked out between July 15 and
August 15.
Challenge!
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 185/258
5/19/2020 Excel: What-if Analysis
4 Use the Search feature to filter item descriptions that contain the word
Sansei. A er you do this, you should have six entries showing.
6 Using a number filter, show loan amounts greater than or equal to $100.
Introduction
Worksheets with a lot of content can sometimes feel overwhelming and can even
become di icult to read. Fortunately, Excel can organize data into groups, allowing you
to easily show and hide di erent sections of your worksheet. You can also summarize
di erent groups using the Subtotal command and create an outline for your worksheet.
Watch the video below to learn more about groups and subtotals in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 186/258
5/19/2020 Excel: What-if Analysis
2 Select the Data tab on the Ribbon, then click the Group command.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 187/258
5/19/2020 Excel: What-if Analysis
To ungroup data, select the grouped rows or columns, then click the
Ungroup command.
2 The group will be hidden. To show a hidden group, click the plus sign, also
known as the Show Detail button.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 188/258
5/19/2020 Excel: What-if Analysis
Creating subtotals
The Subtotal command allows you to automatically create groups and use common
functions like SUM, COUNT, and AVERAGE to help summarize your data. For example,
the Subtotal command could help to calculate the cost of o ice supplies by type from a
large inventory order. It will create a hierarchy of groups, known as an outline, to help
organize your worksheet.
Your data must be correctly sorted before using the Subtotal command, so
you may want to review our lesson on Sorting Data to learn more.
To create a subtotal:
In our example, we'll use the Subtotal command with a T-shirt order form to determine
how many T-shirts were ordered in each size (Small, Medium, Large, and X-Large). This
will create an outline for our worksheet with a group for each T-shirt size and then
count the total number of shirts in each group.
1 First, sort your worksheet by the data you want to subtotal. In this example,
we'll create a subtotal for each T-shirt size, so our worksheet has been
sorted by T-shirt size from smallest to largest.
3 The Subtotal dialog box will appear. Click the drop-down arrow for the At
each change in: field to select the column you want to subtotal. In our
example, we'll select T-Shirt Size.
4 Click the drop-down arrow for the Use function: field to select the function
you want to use. In our example, we'll select COUNT to count the number of
shirts ordered in each size.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 189/258
5/19/2020 Excel: What-if Analysis
5 In the Add subtotal to: field, select the column where you want the
calculated subtotal to appear. In our example, we'll select T-Shirt Size.
When you're satisfied with your selections, click OK.
6 The worksheet will be outlined into groups, and the subtotal will be listed
below each group. In our example, the data is now grouped by T-shirt size,
and the number of shirts ordered in that size appears below each group.
we'll switch among all three levels in our outline. While this example contains only three
levels, Excel can accommodate up to eight.
1 Click the lowest level to display the least detail. In our example, we'll select
level 1, which contains only the Grand Count, or total number of T-shirts
ordered.
2 Click the next level to expand the detail. In our example, we'll select level
2, which contains each subtotal row but hides all other data from the
worksheet.
3 Click the highest level to view and expand all of your worksheet data. In
our example, we'll select level 3.
You can also use the Show Detail and Hide Detail buttons to show and hide
the groups within the outline.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 191/258
5/19/2020 Excel: What-if Analysis
To remove subtotals:
Sometimes you may not want to keep subtotals in your worksheet, especially if you
want to reorganize data in di erent ways. If you no longer want to use subtotaling, you'll
need remove it from your worksheet.
3 All worksheet data will be ungrouped, and the subtotals will be removed.
To remove all groups without deleting the subtotals, click the Ungroup
command drop-down arrow, then choose Clear Outline.
Challenge!
1 Open our practice workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 192/258
5/19/2020 Excel: What-if Analysis
4 Use the Subtotal command to group at each change in Grade. Use the SUM
function and add subtotals to Amount Raised.
5 Select level 2 so you only see the subtotals and grand total.
Introduction
Once you've entered information into your worksheet, you may want to format your
data as a table. Just like regular formatting, tables can improve the look and feel of
your workbook, and they'll also help organize your content and make your data easier
to use. Excel includes several tools and predefined table styles, allowing you to create
tables quickly and easily.
Watch the video below to learn more about working with tables.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 193/258
5/19/2020 Excel: What-if Analysis
Excel: Tables
2 From the Home tab, click the Format as Table command in the Styles
group.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 194/258
5/19/2020 Excel: What-if Analysis
4 A dialog box will appear, confirming the selected cell range for the table.
5 If your table has headers, check the box next to My table has headers, then
click OK.
Tables include filtering by default. You can filter your data at any time using
the drop-down arrows in the header cells. To learn more, review our lesson
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 195/258
5/19/2020 Excel: What-if Analysis
on Filtering Data.
Modifying tables
It's easy to modify the look and feel of any table a er adding it to a worksheet. Excel
includes several options for customizing tables, including adding rows or columns and
changing the table style.
▶ Enter new content into any adjacent row or column. The row or column
will be roped into the table automatically.
▶ Click and drag the bottom-right corner of the table to create additional
rows or columns.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 196/258
5/19/2020 Excel: What-if Analysis
2 Locate the Table Styles group, then click the More drop-down arrow to see
all available table styles.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 197/258
5/19/2020 Excel: What-if Analysis
1 Select any cell in your table, then click the Design tab.
2 Check or uncheck the desired options in the Table Style Options group. In
our example, we'll check Total Row to automatically include a total for our
table.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 198/258
5/19/2020 Excel: What-if Analysis
3 The table style will be modified. In our example, a new row has been added
to the table with a formula that automatically calculates the total value of
the cells in column D.
Depending on the type of content you have—and the table style you've
chosen—these options can a ect your table's appearance in various ways.
You may need to experiment with a few options to find the exact style you
want.
To remove a table:
It's possible to remove a table from your workbook without losing any of your data.
However, this can cause issues with certain types of formatting, including colors, fonts,
and banded rows. Before using this option, be prepared to reformat your cells if
necessary.
1 Select any cell in your table, then click the Design tab.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 199/258
5/19/2020 Excel: What-if Analysis
4 The range will no longer be a table, but the cells will retain their data and
formatting.
To restart your formatting from scratch, click the Clear command on the
Home tab. Next, choose Clear Formats from the menu.
Challenge!
1 Open our practice workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 200/258
5/19/2020 Excel: What-if Analysis
3 Select cells A2:D9 and format as a table. Choose one of the light styles.
4 Insert a row between rows 4 and 5. In the row you just created, type
Empanadas: Banana and Nutella, with a unit price of $3.25 and a quantity
of 12.
Introduction
It can be di icult to interpret Excel workbooks that contain a lot of data. Charts allow
you to illustrate your workbook data graphically, which makes it easy to visualize
comparisons and trends.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 201/258
5/19/2020 Excel: What-if Analysis
Excel: Charts
Understanding charts
Excel has several types of charts, allowing you to choose the one that best fits your
data. To use charts e ectively, you'll need to understand how di erent charts are used.
Click the arrows in the slideshow below to learn more about the types of
charts in Excel.
Excel has a variety of chart types, each with its own advantages. Click the arrows to see some of the
di erent types of charts available in Excel.
In addition to chart types, you'll need to understand how to read a chart. Charts contain
several elements, or parts, that can help you interpret data.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 202/258
5/19/2020 Excel: What-if Analysis
Click the buttons in the interactive below to learn about the di erent parts
of a chart.
To insert a chart:
1 Select the cells you want to chart, including the column titles and row
labels. These cells will be the source data for the chart. In our example,
we'll select cells A1:F6.
2 From the Insert tab, click the desired Chart command. In our example,
we'll select Column.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 203/258
5/19/2020 Excel: What-if Analysis
If you're not sure which type of chart to use, the Recommended Charts
command will suggest several charts based on the source data.
▶ If you don't want to add chart elements individually, you can use one of
Excel's predefined layouts. Simply click the Quick Layout command, then
choose the desired layout from the drop-down menu.
▶ Excel also includes several chart styles, which allow you to quickly modify
the look and feel of your chart. To change the chart style, select the desired
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 205/258
5/19/2020 Excel: What-if Analysis
style from the Chart styles group. You can also click the drop-down arrow
on the right to see more styles.
You can also use the chart formatting shortcut buttons to quickly add chart
elements, change the chart style, and filter chart data.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 206/258
5/19/2020 Excel: What-if Analysis
3 The rows and columns will be switched. In our example, the data is now
grouped by month, with columns for each genre.
1 From the Design tab, click the Change Chart Type command.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 207/258
5/19/2020 Excel: What-if Analysis
2 The Change Chart Type dialog box will appear. Select a new chart type and
layout, then click OK. In our example, we'll choose a Line chart.
3 The selected chart type will appear. In our example, the line chart makes it
easier to see trends in sales data over time.
To move a chart:
Whenever you insert a new chart, it will appear as an object on the same worksheet that
contains its source data. You can easily move the chart to a new worksheet to help keep
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 208/258
5/19/2020 Excel: What-if Analysis
2 Click the Design tab, then select the Move Chart command.
3 The Move Chart dialog box will appear. Select the desired location for the
chart. In our example, we'll choose to move it to a New sheet, which will
create a new worksheet.
4 Click OK.
5 The chart will appear in the selected location. In our example, the chart
now appears on a new worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 209/258
5/19/2020 Excel: What-if Analysis
If you frequently add more data to your spreadsheet, it may become tedious to update
the data range. Luckily, there is an easier way. Simply format your source data as a table,
then create a chart based on that table. When you add more data below the table, it
will automatically be included in both the table and the chart, keeping everything
consistent and up to date.
Watch the video below to learn how to use tables to keep charts up to date.
Challenge!
1 Open our practice workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 210/258
5/19/2020 Excel: What-if Analysis
8 Use the Quick Layout command to change the layout of the chart.
9 When you're finished, your workbook should look something like this:
Introduction
Let's say you have a worksheet with thousands of rows of data. It would be extremely
di icult to see patterns and trends just from examining the raw information. Similar to
charts and sparklines, conditional formatting provides a way to visualize data and
make worksheets easier to understand.
Watch the video below to learn more about conditional formatting in Excel.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 211/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 212/258
5/19/2020 Excel: What-if Analysis
2 From the Home tab, click the Conditional Formatting command. A drop-
down menu will appear.
3 Hover the mouse over the desired conditional formatting type, then select
the desired rule from the menu that appears. In our example, we want to
highlight cells that are greater than $4000.
4 A dialog box will appear. Enter the desired value(s) into the blank field. In
our example, we'll enter 4000 as our value.
5 Select a formatting style from the drop-down menu. In our example, we'll
choose Green Fill with Dark Green Text, then click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 213/258
5/19/2020 Excel: What-if Analysis
▶ Data Bars are horizontal bars added to each cell, much like a bar graph.
▶ Color Scales change the color of each cell based on its value. Each color
scale uses a two- or three-color gradient. For example, in the Green-
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 214/258
5/19/2020 Excel: What-if Analysis
Yellow-Red color scale, the highest values are green, the average values
are yellow, and the lowest values are red.
▶ Icon Sets add a specific icon to each cell based on its value.
3 Hover the mouse over the desired preset, then choose a preset style from
the menu that appears.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 215/258
5/19/2020 Excel: What-if Analysis
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 216/258
5/19/2020 Excel: What-if Analysis
2 Hover the mouse over Clear Rules, then choose which rules you want to
clear. In our example, we'll select Clear Rules from Entire Sheet to remove
all conditional formatting from the worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 217/258
5/19/2020 Excel: What-if Analysis
Challenge!
1 Open our practice workbook.
4 Let's say you're the teacher and want to easily see all of the grades that are
below passing. Apply Conditional Formatting so it Highlights Cells
containing values Less Than 70 with a light red fill.
5 Now you want to see how the grades compare to each other. Under the
Conditional Formatting tab, select the Icon Set called 3 Symbols
(Circled). Hint: The names of the icon sets will appear when you hover over
them.
7 Using the Manage Rules feature, remove the light red fill, but keep the icon
set.
Introduction
There may be times when you're working on a workbook and find that you need the
help of others. Excel o ers two powerful features that allow you to work with others on
the same spreadsheet: comments and co-authoring.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 218/258
5/19/2020 Excel: What-if Analysis
Watch the video below to learn more about comments and co-authoring.
The Track Changes feature can also be helpful to review changes before
making them permanent. It's still available in O ice 365, but it's now
hidden by default. You can learn more about Track Changes in our Excel
2016 lesson here.
2 Click the OneDrive option associated with your account in order to upload
the workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 219/258
5/19/2020 Excel: What-if Analysis
3 The Share pane will appear on the right side of the screen. Type the email
address of the person you'd like to share the workbook with.
4 Select Can edit from the drop-down menu to allow this person to edit the
workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 220/258
5/19/2020 Excel: What-if Analysis
Comments
One way to collaborate on a workbook is through commenting. Sometimes you may
want to provide feedback or ask a question without editing the contents of a cell. You
can do this by adding a comment.
To add a comment:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 221/258
5/19/2020 Excel: What-if Analysis
1 Select the cell where you want the comment to appear. In our example,
we'll select cell D17.
3 A comment box will appear. Type your comment, then click anywhere
outside the box to close the comment.
4 The comment will be added to the cell, represented by a red triangle in the
top-right corner.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 222/258
5/19/2020 Excel: What-if Analysis
To edit a comment:
1 Select the cell containing the comment you want to edit.
3 The comment box will appear. Edit the comment as desired, then click
anywhere outside the box to close the comment.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 223/258
5/19/2020 Excel: What-if Analysis
2 All comments in the worksheet will appear. Click the Show All Comments
command again to hide them.
You can also choose to show and hide individual comments by selecting the
desired cell and clicking the Show/Hide Comment command.
To delete a comment:
1 Select the cell containing the comment you want to delete. In our example,
we'll select cell E13.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 224/258
5/19/2020 Excel: What-if Analysis
2 From the Review tab, click the Delete command in the Comments group.
Co-authoring
Another collaboration tool is co-authoring, which allows others to view and edit your
workbook in real time. This makes it easier and quicker to collaborate on a workbook
with your team. A er sharing a workbook with others, they'll be able to co-author it.
When you co-author a workbook, you can see others at work because each will have
their own unique color. If you want to see who's currently editing a workbook, you can
hover over the activity to see their name.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 225/258
5/19/2020 Excel: What-if Analysis
2 A Version History pane will appear on the right side of the screen. Double-
click the version you'd like to restore.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 226/258
5/19/2020 Excel: What-if Analysis
3 Once you've decided this is the version you want, click Restore.
Challenge!
1 Open our practice workbook.
5 When you're finished, your workbook should look something like this:
6 Optional: Share the document with someone you know, and experiment
with some of the various co-authoring features.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 227/258
5/19/2020 Excel: What-if Analysis
Introduction
Before sharing a workbook, you'll want to make sure it doesn't include any spelling
errors or information you want to keep private. Fortunately, Excel includes several tools
to help finalize and protect your workbook, including the Document Inspector and
Protect Workbook feature.
Watch the video below to learn more about inspecting and protecting
workbooks.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 228/258
5/19/2020 Excel: What-if Analysis
2 From the Info pane, click Check for Issues, then select Inspect Document
from the drop-down menu.
3 You may be prompted to save your file before running the Document
Inspector.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 229/258
5/19/2020 Excel: What-if Analysis
5 The inspection results will appear. In our example, we can see that our
workbook contains comments and some personal information, so we'll
click Remove All on both items to remove this information from the
workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 230/258
5/19/2020 Excel: What-if Analysis
3 In the drop-down menu, choose the option that best suits your needs. In
our example, we'll select Mark as Final. Marking your workbook as final is a
good way to discourage others from editing the workbook, while the other
options give you even more control if needed.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 231/258
5/19/2020 Excel: What-if Analysis
Marking a workbook as final will not prevent others from editing it. If you
want to prevent people from editing it, you can use the Restrict Access
option instead.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 232/258
5/19/2020 Excel: What-if Analysis
Challenge!
1 Open our practice workbook.
2 Use the Document Inspector to check the workbook and remove anything
it finds.
4 When you're finished, your workbook should look something like this:
Introduction
When you have a lot of data, it can sometimes be di icult to analyze all of the
information in your worksheet. PivotTables can help make your worksheets more
manageable by summarizing data and allowing you to manipulate it in di erent ways.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 233/258
5/19/2020 Excel: What-if Analysis
Fortunately, a PivotTable can instantly calculate and summarize the data in a way that
will make it much easier to read. When we're done, the PivotTable will look something
like this:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 234/258
5/19/2020 Excel: What-if Analysis
Once you've created a PivotTable, you can use it to answer di erent questions by
rearranging—or pivoting—the data. For example, let's say we wanted to answer What is
the total amount sold in each month? We could modify our PivotTable to look like this:
To create a PivotTable:
1 Select the table or cells (including column headers) you want to include in
your PivotTable.
3 The Create PivotTable dialog box will appear. Choose your settings, then
click OK. In our example, we'll use Table1 as our source data and place the
PivotTable in a new worksheet.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 235/258
5/19/2020 Excel: What-if Analysis
5 Once you create a PivotTable, you'll need to decide which fields to add.
Each field is simply a column header from the source data. In the
PivotTable Fields list, check the box for each field you want to add. In our
example, we want to know the total amount sold by each salesperson, so
we'll check the Salesperson and Order Amount fields.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 236/258
5/19/2020 Excel: What-if Analysis
6 The selected fields will be added to one of the four areas below. In our
example, the Salesperson field has been added to the Rows area, while
Order Amount has been added to Values. You can also drag and drop
fields directly into the desired area.
7 The PivotTable will calculate and summarize the selected fields. In our
example, the PivotTable shows the amount sold by each salesperson.
Just like with normal spreadsheets, you can sort the data in a PivotTable
using the Sort & Filter command on the Home tab. You can also apply any
type of number formatting you want. For example, you may want to
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 237/258
5/19/2020 Excel: What-if Analysis
If you change any of the data in your source worksheet, the PivotTable will
not update automatically. To manually update it, select the PivotTable
and then go to Analyze > Refresh.
Pivoting data
One of the best things about PivotTables is that they can quickly pivot—or reorganize—
your data, allowing you to examine your worksheet in several ways. Pivoting data can
help you answer di erent questions and even experiment with your data to discover
new trends and patterns.
To add columns:
So far, our PivotTable has only shown one column of data at a time. To show multiple
columns, you'll need to add a field to the Columns area.
1 Drag a field from the Field List into the Columns area. In our example, we'll
use the Month field.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 238/258
5/19/2020 Excel: What-if Analysis
2 The PivotTable will include multiple columns. In our example, there is now
a column for each person's monthly sales, in addition to the grand total.
1 Drag the field you want to remove out of its current area. You can also
uncheck the appropriate box in the Field List. In this example, we've
removed the Month and Salesperson fields.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 239/258
5/19/2020 Excel: What-if Analysis
2 Drag a new field into the desired area. In our example, we'll place the
Region field under Rows.
3 The PivotTable will adjust—or pivot—to show the new data. In our example,
it now shows the amount sold by each region.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 240/258
5/19/2020 Excel: What-if Analysis
To learn more:
Once you're comfortable with PivotTables, review our Doing More with PivotTables
lesson for additional ways to customize and manipulate data.
Challenge!
1 Open our practice workbook.
3 We want to answer the question What is the total amount sold in each
region? To do this, select Region and Order Amount. When you're finished,
your workbook should look like this:
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 241/258
5/19/2020 Excel: What-if Analysis
6 Change the number format of cells B5:E13 to Currency. Note: You might
have to make columns C and D wider to see the values.
Introduction
As you learned in our previous lesson, PivotTables can be used to summarize and
analyze almost any type of data. To manipulate your PivotTable—and gain even more
insight into your data—Excel o ers three additional tools: filters, slicers, and
PivotCharts.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 242/258
5/19/2020 Excel: What-if Analysis
Filters
Sometimes you may want focus on a certain section of your data. Filters can be used to
narrow down the data in your PivotTable so you can view only the information you
need.
To add a filter:
In the example below, we'll filter out certain salespeople to determine how their
individual sales are impacting each region.
1 Drag a field from the Field List to the Filters area. In this example, we'll use
the Salesperson field.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 243/258
5/19/2020 Excel: What-if Analysis
2 The filter will appear above the PivotTable. Click the drop-down arrow,
then check the box next to Select Multiple Items.
3 Uncheck the box next to any item you don't want to include in the
PivotTable. In our example, we'll uncheck the boxes for a few salespeople,
then click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 244/258
5/19/2020 Excel: What-if Analysis
Slicers
Slicers make filtering data in PivotTables even easier. Slicers are basically just filters but
are easier and faster to use, allowing you to instantly pivot your data. If you frequently
filter your PivotTables, you may want to consider using slicers instead of filters.
To add a slicer:
1 Select any cell in the PivotTable.
3 A dialog box will appear. Check the box next to the desired field. In our
example, we'll select Salesperson, then click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 245/258
5/19/2020 Excel: What-if Analysis
4 The slicer will appear next to the PivotTable. Each selected item will be
highlighted in blue. In the example below, the slicer contains all eight
salespeople, but only five of them are currently selected.
5 Just like filters, only selected items are used in the PivotTable. When you
select or deselect an item, the PivotTable will instantly reflect the change.
Try selecting di erent items to see how they a ect the PivotTable. Press
and hold the Ctrl key on your keyboard to select multiple items at once.
You can also click the Filter icon in the top-right corner of the slicer to
select all items at once.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 246/258
5/19/2020 Excel: What-if Analysis
PivotCharts
PivotCharts are like regular charts, except they display data from a PivotTable. Just like
regular charts, you'll be able to select a chart type, layout, and style that will best
represent the data.
To create a PivotChart:
In the example below, our PivotTable is showing a portion of each region's sales figures.
We'll use a PivotChart so we can see the information more clearly.
3 The Insert Chart dialog box will appear. Select the desired chart type and
layout, then click OK.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 247/258
5/19/2020 Excel: What-if Analysis
Try using filters or slicers to narrow down the data in your PivotChart. To
view di erent subsets of information, change the columns or rows in your
PivotTable. In the example below, we've changed the PivotTable to view the
monthly sales for each salesperson.
Challenge!
1 Open our practice workbook.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 248/258
5/19/2020 Excel: What-if Analysis
5 Use the slicer to only show the South and East regions.
7 In the PivotChart Fields pane to the right, add Month to the Legend
(Series) area. Note: You can also click the PivotTable and add Month to the
Columns area for the same results.
8 When you're finished, your workbook should look something like this:
Introduction
Excel includes powerful tools to perform complex mathematical calculations, including
what-if analysis. This feature can help you experiment and answer questions with
your data, even when the data is incomplete. In this lesson, you will learn how to use a
what-if analysis tool called Goal Seek.
Watch the video below to learn more about what-if analysis and Goal Seek.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 249/258
5/19/2020 Excel: What-if Analysis
Goal Seek
Whenever you create a formula or function in Excel, you put various parts together to
calculate a result. Goal Seek works in the opposite way: It lets you start with the
desired result, and it calculates the input value that will give you that result. We'll use a
few examples to show how to use Goal Seek.
In the image below, you can see that the grades on the first four assignments are 58, 70,
72, and 60. Even though we don't know what the fi h grade will be, we can write a
formula—or function—that calculates the final grade. In this case, each assignment is
weighted equally, so all we have to do is average all five grades by typing
=AVERAGE(B2:B6). Once we use Goal Seek, cell B6 will show us the minimum grade
we'll need to make on that assignment.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 250/258
5/19/2020 Excel: What-if Analysis
1 Select the cell with the value you want to change. Whenever you use Goal
Seek, you'll need to select a cell that already contains a formula or
function. In our example, we'll select cell B7 because it contains the
formula =AVERAGE(B2:B6).
2 From the Data tab, click the What-If Analysis command, then select Goal
Seek from the drop-down menu.
3 A dialog box will appear with three fields. The first field, Set cell:, will
contain the desired result. In our example, cell B7 is already selected.
The second field, To value:, is the desired result. In our example, we'll enter
70 because we need to earn at least that to pass the class.
The third field, By changing cell:, is the cell where Goal Seek will place its
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 251/258
5/19/2020 Excel: What-if Analysis
5 The dialog box will tell you if Goal Seek was able to find a solution. Click OK.
6 The result will appear in the specified cell. In our example, Goal Seek
calculated that we will need to score at least a 90 on the final assignment to
earn a passing grade.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 252/258
5/19/2020 Excel: What-if Analysis
1 Select the cell with the value you want to change. In our example, we'll
select cell B5.
2 From the Data tab, click the What-If Analysis command, then select Goal
Seek from the drop-down menu.
3 A dialog box will appear with three fields. The first field, Set cell:, will
contain the desired result. In our example, cell B5 is already selected.
The second field, To value:, is the desired result. In our example, we'll enter
500 because we only want to spend $500.
The third field, By changing cell:, is the cell where Goal Seek will place its
answer. In our example, we'll select cell B4 because we want to know how
many guests we can invite without spending more than $500.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 253/258
5/19/2020 Excel: What-if Analysis
5 The dialog box will tell you if Goal Seek was able to find a solution. Click OK.
6 The result will appear in the specified cell. In our example, Goal Seek
calculated the answer to be approximately 18.62. In this case, our final
answer needs to be a whole number, so we'll need to round the answer up
or down. Because rounding up would cause us to exceed our budget, we'll
round down to 18 guests.
As you can see in the example above, some situations will require the
answer to be a whole number. If Goal Seek gives you a decimal, you'll need
to round up or down, depending on the situation.
▶ Scenarios let you substitute values for multiple cells (up to 32) at the same
time. You can create as many scenarios as you want and then compare
them without changing the values manually. In the example below, we're
using scenarios to compare di erent venues for an upcoming event.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 254/258
5/19/2020 Excel: What-if Analysis
▶ Data tables allow you to take one or two variables in a formula and replace
them with as many di erent values as you want, then view the results in a
table. This option is especially powerful because it shows multiple results
at the same time, unlike scenarios or Goal Seek. In the example below, we
can view 24 possible results for a car loan.
For more information on data tables, read this article from Microso .
Challenge!
1 Open our practice workbook.
3 In cell B8, create a function that calculates the average of the sales in
B2:B7.
4 The workbook shows Dave's monthly sales amounts for the first half of the
year. If he reaches a $200,000 mid-year average, he will receive a 5% bonus.
https://edu.gcfglobal.org/en/excel/whatif-analysis/1/ 255/258
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Excel Formulas
About This Tutorial
Formulas work almost exactly the same way in most spreadsheet programs, so you can
work along with this tutorial even if you don't have Excel. These skills will work in
Google Sheets, LibreO ice, OpenO ice, and many other spreadsheet programs.
However, keep in mind that we'll be using Excel 2016 and 2013 throughout this tutorial,
so you may notice some slight di erences if you're using a di erent program.
If you've never created a formula before, that's OK! This tutorial starts with the absolute
basics of creating formulas and gradually works up to to some more advanced formulas.
But before you begin, you'll want to have a basic understanding of how to navigate your
spreadsheet program. You can review one of our other spreadsheet tutorials to learn
more:
▶ Excel
▶ Excel 2016
▶ Excel 2013
▶ Excel 2010
▶ Excel 2007
▶ Google Sheets
If you already have a basic understanding of how spreadsheets work, you're ready to
dive in and get started. Throughout this tutorial, you'll find a mix of written lessons,
videos, and interactives that will explain the basics of formulas and guide you through
real-life scenarios where you'll use formulas to solve problems!
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 1/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Introduction
One of the most powerful features in Excel is the ability to calculate numerical
information using formulas. Just like a calculator, Excel can add, subtract, multiply, and
divide. In this lesson, we'll show you how to use cell references to create simple
formulas.
Mathematical operators
Excel uses standard operators for formulas, such as a plus sign for addition (+), a minus
sign for subtraction (-), an asterisk for multiplication (*), a forward slash for division (/),
and a caret (^) for exponents.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 2/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
All formulas in Excel must begin with an equals sign (=). This is because the cell
contains, or is equal to, the formula and the value it calculates.
By combining a mathematical operator with cell references, you can create a variety of
simple formulas in Excel. Formulas can also include a combination of cell references and
numbers, as in the examples below:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 3/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
To create a formula:
In our example below, we'll use a simple formula and cell references to calculate a
budget.
1 Select the cell that will contain the formula. In our example, we'll select cell
B3.
2 Type the equals sign (=). Notice how it appears in both the cell and the
formula bar.
3 Type the cell address of the cell you want to reference first in the formula:
cell B1 in our example. A blue border will appear around the referenced
cell.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 4/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
4 Type the mathematical operator you want to use. In our example, we'll
type the addition sign (+).
5 Type the cell address of the cell you want to reference second in the
formula: cell B2 in our example. A red border will appear around the
referenced cell.
6 Press Enter on your keyboard. The formula will be calculated, and the
value will be displayed in the cell.
Let's practice!
Question 1 of 1
Which formula would add the January and
February profits?
=B2+B3 B3+B4=
B2+B3= B2+B3
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 5/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Excel will not always tell you if your formula contains an error, so it's up to
you to check all of your formulas. To learn how to do this, you can read the
Double-Check Your Formulas lesson from our Excel Formulas tutorial.
1 Select the cell that will contain the formula. In our example, we'll select cell
D3.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 6/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
3 Select the cell you want to reference first in the formula: cell B3 in our
example. The cell address will appear in the formula, and a dashed blue
line will appear around the referenced cell.
4 Type the mathematical operator you want to use. In our example, we'll
type the multiplication sign (*).
5 Select the cell you want to reference second in the formula: cell C3 in our
example. The cell address will appear in the formula, and a dashed red
line will appear around the referenced cell.
6 Press Enter on your keyboard. The formula will be calculated, and the
value will be displayed in the cell.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 7/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Formulas can also be copied to adjacent cells with the fill handle, which
can save a lot of time and e ort if you need to perform the same
calculation multiple times in a worksheet. Review our lesson on Relative
and Absolute Cell References to learn more.
To edit a formula:
Sometimes you may want to modify an existing formula. In the example below, we've
entered an incorrect cell address in our formula, so we'll need to correct it.
1 Select the cell containing the formula you want to edit. In our example,
we'll select cell B3.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 8/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
2 Click the formula bar to edit the formula. You can also double-click the cell
to view and edit the formula directly within the cell.
3 A border will appear around any referenced cells. In our example, we'll
change the second part of the formula to reference cell B2 instead of cell
C2.
4 When you're finished, press Enter on your keyboard or click the checkmark
in the formula bar.
5 The formula will be updated, and the new value will be displayed in the
cell.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 9/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you change your mind, you can press the Esc key on your keyboard to
avoid accidentally making changes to your formula.
To show all of the formulas in a spreadsheet, you can hold the Ctrl key and
press ` (grave accent). The grave accent key is usually located in the top-le
corner of the keyboard. You can press Ctrl+` again to switch back to the
normal view.
Challenge!
1 Open an existing Excel workbook. If you want, you can use our practice
workbook.
2 Create a simple addition formula using cell references. If you are using the
example, create the formula in cell B4 to calculate the total budget.
3 Try modifying the value of a cell referenced in a formula. If you are using
the example, change the value of cell B2 to $2,000. Notice how the formula
in cell B4 recalculates the total.
4 Try using the point-and-click method to create a formula. If you are using
the example, create a formula in cell G5 that multiplies the cost of napkins
by the quantity needed to calculate the total cost.
5 Edit a formula using the formula bar. If you are using the example, edit the
formula in cell B9 to change the division sign (/) to a minus sign (-).
Introduction
A simple formula is a mathematical expression with one operator, such as 7+9. A
complex formula has more than one mathematical operator, such as 5+2*8. When
there is more than one operation in a formula, the order of operations tells your
spreadsheet which operation to calculate first. In order to use complex formulas, you
will need to understand the order of operations.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 10/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
A mnemonic that can help you remember the order is PEMDAS, or Please
Excuse My Dear Aunt Sally.
Click the arrows in the slideshow below to learn more about how the order
of operations is used to calculate complex formulas.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 11/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Let's practice!
Question 1 of 1
What value would the following formula
return?
17 13
11 19
Submit
Using parentheses within a formula can be very important. Because of the order of
operations, it can completely change an answer. Let's try the same problem from above,
but this time we'll add parentheses to the last part.
Let's practice!
Question 1 of 1
Now that the formula has parentheses, what
value would the following formula return?
19 13
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 12/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
17 11
Submit
The spreadsheet then follows the order of operations and first adds the values inside the
parentheses: (44.85+39.90) = $84.75. Then it multiplies that value by the tax rate:
$84.75*0.075. The result will show that the sales tax is $6.36.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 13/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
1 Select the cell that will contain the formula. In our example, we'll select cell
C4.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 14/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
You can add parentheses to any equation to make it easier to read. While it
won't change the result of the formula in this example, we could enclose
the multiplication operations within parentheses to clarify that they will be
calculated before the addition.
Your spreadsheet will not always tell you if your formula contains an error,
so it's up to you to check all of your formulas. To learn how to do this, check
out the Double-Check Your Formulas lesson.
Challenge!
1 Open an existing Excel workbook. If you want, you can use the example file
for this lesson.
Introduction
There are two types of cell references: relative and absolute. Relative and absolute
references behave di erently when copied and filled to other cells. Relative references
change when a formula is copied to another cell. Absolute references, on the other
hand, remain constant no matter where they are copied.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 15/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Relative references
By default, all cell references are relative references. When copied across multiple cells,
they change based on the relative position of rows and columns. For example, if you
copy the formula =A1+B1 from row 1 to row 2, the formula will become =A2+B2. Relative
references are especially convenient whenever you need to repeat the same calculation
across multiple rows or columns.
1 Select the cell that will contain the formula. In our example, we'll select cell
D2.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 16/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
2 Enter the formula to calculate the desired value. In our example, we'll type
=B2*C2.
3 Press Enter on your keyboard. The formula will be calculated, and the
result will be displayed in the cell.
4 Locate the fill handle in the lower-right corner of the desired cell. In our
example, we'll locate the fill handle for cell D2.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 17/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
5 Click, hold, and drag the fill handle over the cells you wish to fill. In our
example, we'll select cells D3:D12.
6 Release the mouse. The formula will be copied to the selected cells with
relative references and the values will be calculated in each cell.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 18/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
You can double-click the filled cells to check their formulas for accuracy.
The relative cell references should be di erent for each cell, depending on
its row.
Let's practice!
Question 1 of 1
Which of the following is a relative cell reference?
$C$2 C2
!C2 $C2
Submit
Absolute references
There may be times when you do not want a cell reference to change when filling cells.
Unlike relative references, absolute references do not change when copied or filled. You
can use an absolute reference to keep a row and/or column constant.
a mixed reference.
You will use the relative (A2) and absolute ($A$2) formats in most formulas.
Mixed references are used less frequently.
When writing a formula in Microso Excel, you can press the F4 key on your keyboard to
switch between relative, absolute, and mixed cell references, as shown in the video
below. This is an easy way to quickly insert an absolute reference.
1 Select the cell that will contain the formula. In our example, we'll select cell
D3.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 20/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
2 Enter the formula to calculate the desired value. In our example, we'll type
=(B3*C3)*$E$1.
3 Press Enter on your keyboard. The formula will calculate, and the result will
display in the cell.
4 Locate the fill handle in the lower-right corner of the desired cell. In our
example, we'll locate the fill handle for cell D3.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 21/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
5 Click, hold, and drag the fill handle over the cells you wish to fill, cells
D4:D13 in our example.
6 Release the mouse. The formula will be copied to the selected cells with an
absolute reference, and the values will be calculated in each cell.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 22/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
You can double-click the filled cells to check their formulas for accuracy.
The absolute reference should be the same for each cell, while the other
references are relative to the cell's row.
Be sure to include the dollar sign ($) whenever you're making an absolute
reference across multiple cells. The dollar signs were omitted in the
example below. This caused the spreadsheet to interpret it as a relative
reference, producing an incorrect result when copied to other cells.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 23/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Let's practice!
Question 1 of 1
If you wanted to make an absolute reference to cell E2, what would it look like?
E2 [E2]
$E$2 @E2
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 24/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Note that if a worksheet name contains a space, you will need to include
single quotation marks (' ') around the name. For example, if you wanted
to reference cell A1 on a worksheet named July Budget, its cell reference
would be 'July Budget'!A1.
1 Locate the cell you wish to reference, and note its worksheet. In our
example, we want to reference cell E14 on the Menu Order worksheet.
4 Locate and select the cell where you want the value to appear. In our
example, we'll select cell B2.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 25/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
5 Type the equals sign (=), the sheet name followed by an exclamation
point (!), and the cell address. In our example, we'll type ='Menu
Order'!E14.
6 Press Enter on your keyboard. The value of the referenced cell will appear.
If the value of cell E14 changes on the Menu Order worksheet, it will be
updated automatically on the Catering Invoice worksheet.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 26/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you rename your worksheet at a later point, the cell reference will be
updated automatically to reflect the new worksheet name.
Challenge!
1 Open an existing Excel workbook. If you want, you can use the example file
for this lesson.
2 Create a formula that uses a relative reference. If you are using the
example, use the fill handle to fill in the formula in cells E4 through E14.
Double-click a cell to see the copied formula and the relative cell
references.
3 Create a formula that uses an absolute reference. If you are using the
example, correct the formula in cell D4 to refer only to the tax rate in cell E2
as an absolute reference, then use the fill handle to fill the formula from
cells D4 to D14.
4 Try referencing a cell across worksheets. If you are using the example,
create a cell reference in cell B3 on the Catering Invoice worksheet for cell
E15 on the Menu Order worksheet.
Lesson 5: Functions
Introduction
A function is a predefined formula that performs calculations using specific values in a
particular order. All spreadsheet programs include common functions that can be used
for quickly finding the sum, average, count, maximum value, and minimum value for
a range of cells. In order to use functions correctly, you'll need to understand the
di erent parts of a function and how to create arguments to calculate values and cell
references.
Watch the video below to learn more about using functions in Excel.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 27/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Excel: Functions
For example, the function =AVERAGE(B1:B9) would calculate the average of the values
in the cell range B1:B9. This function contains only one argument.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 28/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Let's practice!
Question 1 of 1
Which of the following functions is using the correct syntax?
=SUM(A2:A8,E2:E8) SUM=(A2:A8,E2:E8)
SUM(A2:A8,E2:E8)= =A2:A8(SUM)E2:E8
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 29/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Using functions
There are a variety of functions. Here are some of the most common functions you'll use:
▶ SUM: This function adds all the values of the cells in the argument.
▶ COUNT: This function counts the number of cells with numerical data in the
argument. This function is useful for quickly counting items in a cell range.
▶ MAX: This function determines the highest cell value included in the
argument.
▶ MIN: This function determines the lowest cell value included in the
argument.
To use a function:
In our example below, we'll use a basic function to calculate the average price per unit
for a list of recently ordered items using the AVERAGE function.
1 Select the cell that will contain the function. In our example, we'll select cell
C11.
2 Type the equals sign (=) and enter the desired function name. In our
example, we'll type =AVERAGE.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 30/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
3 Enter the cell range for the argument inside parentheses. In our example,
we'll type (C3:C10). This formula will add the values of cells C3:C10 and
then divide that value by the total number of cells in the range to determine
the average.
4 Press Enter on your keyboard. The function will be calculated, and the
result will appear in the cell. In our example, the average price per unit of
items ordered was $15.93.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 31/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Your spreadsheet will not always tell you if your function contains an
error, so it's up to you to check all of your functions. To learn how to do this,
check out the Double-Check Your Formulas lesson.
Let's practice!
Question 1 of 1
In this example, we want to use the formula
=MAX(B3:D7)
The average number of cakes sold in The total number of items sold
March between January and March
Submit
If you want to learn how a function works, you can start typing that function in a blank
cell to see what it does.
You can then type an open parenthesis to see what kind of arguments it needs.
Let's take a look at a more complicated example that uses multiple functions:
=WORKDAY(TODAY(),3)
Here, we have two di erent functions working together: the WORKDAY function and the
TODAY function. These are known as nested functions, since one function is placed, or
nested, within the arguments of another. As a rule, the nested function is always
calculated first, just like parentheses are performed first in the order of operations. In
this example, the TODAY function will be calculated first, since it's nested within the
WORKDAY function.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 33/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 34/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
To make matters worse, your spreadsheet will not always tell you if a formula is
wrong. It will usually just go ahead and run the calculations and give you the wrong
answer. It's up to you to double-check your formulas whenever you create them.
We've put together a list of tips you can use to help check formulas for accuracy. These
tips won't help you solve every problem you encounter, but they should provide you
with the tools to identify many common errors.
Break it up
If a formula is too complicated to check, try breaking it up into several smaller
formulas. This way, you can check each formula for accuracy, and if there are any
problems you will know exactly where they are.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 35/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Ballpark it
You can use your own experience, critical-thinking skills, and common sense to estimate
what the answer should be. If Excel gives you a much larger or smaller value than
expected, there may be a problem with your formula (or with the values in the cells).
For example, if you are calculating the total price of 8 items that are 98 cents each, the
answer should be slightly less than $8. In the example below, the formula calculated the
answer as $784.00, which is incorrect. That's because the price in A2 was entered as 98,
and it should have been 0.98. As you can see, even the smallest details can make a
huge di erence.
Note that this tip does not always work. In some cases, the wrong answer
may be fairly close to the correct answer. However, in many situations it can
help you quickly catch a problem in your formula.
This can be especially useful when you're trying to fix a function that's not working
correctly. For example, let's look at the function below:
In the example above, the NETWORKDAYS function is returning an error. If we enter the
NETWORKDAYS function into a new cell, the reason becomes clear:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 36/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
The NETWORKDAYS function requires at least two arguments—a start date and an end
date. Our original function only has one argument, so we'll edit our function to include
both arguments:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 37/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Remember, it takes a lot of practice to master writing formulas. Even the most
experienced spreadsheet users encounter formula errors. If your formula doesn't work
or produces an incorrect value, don't panic! More o en than not, there's probably a
simple reason your formula resulted in an error—once you find it, you'll be able to get
your formula working correctly.
Let's practice!
Question 1 of 1
Someone is trying to find the average profit
amount between January and July, using
the formula in cell B9.
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 38/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Watch the video below to learn more about number formats in Excel.
If you don't need to use a specific number format, the spreadsheet will
usually apply the general number format by default. However, the general
format may apply some small formatting changes to your data.
▶ For Microso Excel 2007-2019, go to the Home tab, click the Number
Format drop-down menu in the Number group, and select the desired
format. You can also click one of the quick number-formatting commands
below the drop-down menu.
▶ For Google Sheets, click the More Formats button near the le side of the
toolbar—this button will look like the numbers 123. To the le of the
command, you can also click the Currency or Percent commands to
quickly apply those formats.
For most versions of Microso Excel, you can also select the desired cells
and press Ctrl+1 on your keyboard to access more number-formatting
options.
In this example, we've applied the Currency number format, which adds currency
symbols ($) and displays two decimal places for any numerical values.
If you select any cells with number formatting, you can see the actual value of the cell in
the formula bar. The spreadsheet will use this value for formulas and other calculations.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 40/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Now that you know more about how number formats work, we'll look at a few di erent
number formats in action.
Percentage formats
One of the most helpful number formats is the percentage (%) format. It displays values
as percentages, such as 20% or 55%. This is especially helpful when calculating things
like the cost of sales tax or a tip. When you type a percent sign (%) a er a number, the
percentage number format will be be applied to that cell automatically.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 41/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
As you may remember from math class, a percentage can also be written as a decimal.
So 15% is the same thing as 0.15, 7.5% is 0.075, 20% is 0.20, 55% is 0.55, and so on. You
can review this lesson from our Math tutorial to learn more about converting
percentages to decimals.
There are many times when percentage formatting will be useful. For example, in the
images below, notice how the sales tax rate is formatted di erently for each
spreadsheet (5, 5%, and 0.05):
As you can see, the calculation in the spreadsheet on the le didn't work correctly.
Without the percentage number format, our spreadsheet thinks we want to multiply
$22.50 by 5, not 5%. And while the spreadsheet on the right still works without
percentage formatting, the spreadsheet in the middle is easier to read.
Date formats
Whenever you're working with dates, you'll want to use a date format to tell the
spreadsheet that you're referring to specific calendar dates, such as July 15, 2014. Date
formats also allow you to work with a powerful set of date functions that use time and
date information to calculate an answer.
Spreadsheets don't understand information the same way a person would. For instance,
if you type October into a cell, the spreadsheet won't know you're entering a date so it
will treat it like any other text. Instead, when you enter a date, you'll need to use a
specific format your spreadsheet understands, such as month/day/year (or
day/month/year depending on which country you're in). In the example below, we'll
type 10/12/2014 for October 12, 2014. Our spreadsheet will then automatically apply
the date number format for the cell.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 42/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Now that we have our date correctly formatted, we can do lots of di erent things with
this data. For example, we could use the fill handle to continue the dates through the
column, so a di erent day appears in each cell:
If the date formatting isn't applied automatically, it means the spreadsheet did not
understand the data you entered. In the example below, we've typed March 15th. The
spreadsheet did not understand that we were referring to a date, so this cell is still using
the general number format.
On the other hand, if we type March 15 (without the "th"), the spreadsheet will
recognize it as a date. Since it doesn't include a year, the spreadsheet will automatically
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 43/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
add the current year so the date will have all of the necessary information. We could also
type the date several other ways, such as 3/15, 3/15/2014, or March 15 2014, and the
spreadsheet would still recognize it as a date.
Try entering the dates below into a spreadsheet and see if the date format is applied
automatically:
▶ 10/12
▶ October
▶ October 12
▶ October 2014
▶ 10/12/2014
▶ 2014
▶ October 12th
If you want to add the current date to a cell, you can use the Ctrl+; shortcut,
as shown in the video below.
spreadsheet program you're using. To access these options in Excel 2007-2019, select
the Number Format drop-down menu and choose More Number Formats.
A dialog box will appear. From here, you can choose the desired date formatting option.
As you can see in the formula bar, a custom date format doesn't change the actual date
in our cell—it just changes the way it's displayed.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 45/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 46/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
▶ If you want your data to appear exactly as entered, you'll need to use the
text number format. This format is especially good for numbers you don't
want to perform calculations with, such as phone numbers, zip codes, or
numbers that begin with 0: for example, "02415". For best results, you may
want to apply the text number format before entering data in those cells.
▶ Excel 2007-2019
▶ Excel 2003
▶ Google Sheets
Let's practice!
Question 1 of 1
What format is best for things like ID numbers, ZIP codes, and phone numbers?
Currency Date
Percentage Text
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 47/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
With that in mind, we've put together a list of tips to help you read formulas.
You may also find the tips in our Double-Check Your Formulas lesson to be
helpful.
You can also double-click a cell that contains a formula to see what cells it's referencing.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 48/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
You can also switch to formula view, which will display all of the formulas in the
spreadsheet. This can help you understand how the spreadsheet is put together and
where the formulas are stored. Just hold the Ctrl key and press ` (grave accent). The
grave accent key is usually located in the upper-le corner of the keyboard. Press Ctrl+`
again to switch back to normal view.
Let's practice!
Question 1 of 1
What is the formula in cell B3 doing?
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 49/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
The same is true for functions. For example, let's take a look at this spreadsheet—a
running log our friend Sophie created:
It looks like Sophie didn't label the calculated value in cell B8. However, if we take a look
at the formula we can see that she used the AVERAGE function to find the average of the
values in cell range B3:B7. Based on the data in column B, we can reasonably guess that
she used this formula to find the average distance for these di erent runs.
Let's practice!
Question 1 of 1
In this example, what information would this
formula find:
=MAX(B2:B6)
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 50/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
Let's practice!
Question 1 of 1
In this example, what's wrong with the
formula in cell B5?
Submit
It's also important to remember that whenever a formula contains a function, the
function is generally calculated before any other operators, like multiplication and
division. For example, in the formula below, the SUM function will be calculated before
division:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 51/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If one function is nested inside another function, the innermost function will be
calculated first. For example, in the formula =WORKDAY(TODAY(),3), the TODAY
function will be calculated first.
You can review our lesson on Functions to learn more about how functions
work within formulas.
Let's practice!
Question 1 of 1
Which function will be performed first in this formula?
=IF(SUM(C2:C4)>500,"Yes","No")
SUM IF
Submit
Let's briefly review what we have learned in the past few lessons. Then, you'll answer a
few questions to test your knowledge.
Simple Formulas
Simple formulas combine relative cell references and mathematical operators to
perform helpful calculations.
Let's practice!
Question 1 of 1
Select the formula that will subtract the
inventory costs from the monthly budget.
=B2-B3 =B3*B2
=B3-B2 =B3/B2
Submit
Complex Formulas
Like simple formulas, complex formulas combine cell references and mathematical
operators. However, in complex formulas, we usually perform more than one
mathematical operation. The order of operations helps us to determine which operation
to perform first.
Let's practice!
Question 1 of 1
Which formula will subtract the inventory
costs from the annual budget and then
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 53/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
divide by 12?
=B2-B1/12 =B2-(B1/12)
=(B1-B2)/12 =(B2-B1)/12
Submit
Functions
A function is a predefined formula that performs calculations using specific values in a
particular order. The first step, however, is determining which function to use. To review
the di erent types of functions, you can check out our Functions lesson.
Let's practice!
Question 1 of 1
Which formula would find the fastest time
for this running log?
=AVERAGE(B2:B6) =MIN(B2:B6)
=MAX(B2:B6) =SUM(B2:B6)
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 54/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
The second step to using a function is determining the correct arguments. Arguments
determine which cells are analyzed by a function.
Let's practice!
Question 1 of 1
In this example, which formula would find
the average time for a 3-mile run?
=AVERAGE(B2:C6) =AVERAGE(B2,B6)
=AVERAGE(B2:B6) =AVERAGE(B2:B5)
Submit
Now that you know the basics of formulas and functions, you're ready to learn some
more advanced Excel formulas!
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 55/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. As you can see, our coworker Carter has given us a pretty
simple budget: Each category is on a separate row, and there are columns for the
projected costs and actual costs.
How do we know if something is over budget? In this example, we can compare the
projected and actual costs. If the actual cost is higher than the projected cost, then it is
over budget.
If the result is negative, then we know that category is over budget. In our example, we
expected to spend $14,000 on Facilities, and we actually spent $15,000. If we subtract
$15,000 from $14,000, the result would be -$1,000 (negative $1,000). We could also say
this category is $1,000 over budget.
Our projected expenses are in column B, and our actual expenses are in column C. So for
the first category, the formula to compare these values would be:
=B2-C2
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 56/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Next, we can just drag the fill handle down to add the formula to the other cells in the
column:
Now we can see that several of the categories have negative values, which means they
are over budget.
Carter is right: Although this spreadsheet gives us an answer, it isn't very easy to read.
There are a few di erent ways we could make the over-budget items more noticeable.
For example:
▶ We could filter the data to only show rows that have a negative result.
▶ We could select the data and create a chart, which will make the data more
visual.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 57/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
All of these solutions will work—there isn't a right or wrong answer. You may want to
experiment with di erent methods to see which one you think is the clearest. In our
example, we’ll add conditional formatting.
First, make sure the values in column D are selected. Next, we'll need to create a
conditional formatting rule that looks for cells containing a value less than zero. The
process will vary depending on which spreadsheet program you're using:
▶ For Excel 2007-2019: From the Home tab, select Conditional Formatting >
Highlight Cells Rules > Less Than.
Make sure the rule is set to "Less than" and that the value is set to "0" (to look for cells
that are less than zero), and choose a formatting option that will stand out. In this case,
a red background with red text is a good choice.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 58/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
red text.
That's it! Now we can easily see at a glance which items are over budget.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 59/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Can you help me figure out how much it will cost a er the
discount? I added the basic info to a spreadsheet if that
makes it any easier."
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. Here, we have two main columns: one for the item name, and
another for the item price. There's also a formula in cell B5 that calculates the original
total cost of the items: =SUM(B2:B4)
To make this problem easier to solve with a spreadsheet, we'll break it down into two
steps:
2 Subtract that value from the original total to find the final cost.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 60/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Let's practice!
Question 1 of 1
How would we type 15% as a decimal?
0.15 0.015
1.5 15
Submit
Excellent! Now that we know how to write 15% as a decimal, we're ready to write our
formula:
=B5*0.15
=B5-B6
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 61/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Bonus Section
In the example above, we found the discount and then subtracted that from the original
total. To make this simpler, we broke the problem down into two smaller steps.
However, if you're comfortable working with percentage problems, we could have found
the same answer with only one formula.
Can you figure out which formula we could have used instead? Here's a hint: Because we
know we'll get 15% o , you could also say the final cost would be 85% of the original
total.
Let's practice!
Question 1 of 1
Which formula would calculate the price a er a 15% discount?
=B5*0.85 =B5/0.85
=B5-0.15 =B5*0.15
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 62/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. You may want to take a moment to see how the data is
organized. As you can see, there is a di erent row for each of the players and di erent
columns for the number of points they scored in each game.
Before we write our formulas, let's think about the problem we're trying to solve. Our
friend wants to find out which player scored the most points total over these five
games.
Let's practice!
Question 1 of 1
Which function could we use to find the total points scored?
AVERAGE TOTAL
SUM COUNTA
Submit
Before we write the formula, we'll need to decide what cell range to include in the
argument.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 64/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Now that we know what function and cell range to use, we're ready to enter our
formula, =SUM(B2:F2), in cell G2:
It looks like Tonya scored 51 points total. Next, we'll drag the fill handle down to add this
formula for the other players.
There we go! It looks like Bella scored the most points overall. However, we could take it
a bit further to make our data really stand out. For example, we could:
There's really no right answer in this case—the most important thing is to make your
data clear and easier to understand. In this example, it might be especially helpful to
sort the data by the total points scored from highest to lowest—this will show who the
top scorer is and make it easier to rank the other players on the team. Sorting works a
bit di erently, depending on which spreadsheet program you're using:
▶ For Excel 2007-2019: Select column G, then click the Descending Sort (Z-
A) command on the Data tab.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 65/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
▶ For Excel 2003 and earlier: Select column G, then click Data > Sort >
Descending.
▶ For Google Sheets: Select column G, then click Data > Sort sheet by
column G > Descending.
OK, now it's really easy to read our results! We can tell at a glance that Bella is the
highest scorer, and we can also rank the other players.
Let's practice!
Question 1 of 1
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 66/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
MIN BEST
MAX MVP
Submit
Now that we know what function to use, we'll start by finding the highest-scoring game
for Bella in row 2.
Before we write our formula, we'll need to decide what cell range to include in the
argument.
Let's practice!
Question 1 of 1
Using the example above, what cell range should we use for our function?
B2:F2 2
B2:F9 B2:G2
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 67/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
Highest-scoring game
Now that we know what function and cell range to use, we'll type our formula,
=MAX(B2:F2), in cell H2 and then use the fill handle to add it to the other cells in
column H.
Now we can easily see how many points each of the players scored in their highest-
scoring game!
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. We'll just need to enter a few di erent values to get started.
Our friend Darien told us that a ticket costs $11.75, so we'll enter that in cell B1. He'll
need 4 tickets (one for himself and three for his friends), so we'll enter 4 into cell B2.
Finally, Darien said he didn't want to spend more than $50.00, so we'll enter that in cell
B3.
2 Subtract that amount from the total budget to find our answer.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 69/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Let's start by calculating the cost of the tickets. To find the answer, we'll multiply the
cost of the tickets by the number of tickets needed. Those values are stored in cells B1
and B2. So here's our formula:
=B1*B2
OK, the tickets will cost $47.00. Now, we'll subtract that value from the total budget in
cell B3. Here's our formula:
=B3-B4
So if Darien buys 4 regularly priced tickets, he'll have $3.00 le over for popcorn and
drinks.
Since we used cell references to write our formulas, we can simply change the ticket cost
in cell B1 from $11.75 to $7.25—our formulas will then recalculate automatically.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 70/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
OK, Darien will have $21.00 le over if he chooses to go to the matinee showing of the
movie! Let's send this back to him.
Bonus Section
In the example above, we used two di erent formulas to make the problem easier to
solve. But if you're already familiar with the order of operations, you might have realized
that we could have written it as one formula. In the interactive below, see if you can
select a formula that would do this.
Let's practice!
Question 1 of 1
Which formula would calculate the le over
amount?
=B3+B1*B2 =B3-B1/B2
=B3-B1*B2 =B1*B2-B3
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 71/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
This formula gives us the same answer as the example above: $21.00. As you may
remember from the lesson on Complex Formulas, spreadsheets use the order of
operations to determine which operations to perform first in a formula. Because
multiplication comes before subtraction, this formula will first multiply the values in
cells B1 and B2 and then subtract that value from the budget total in cell B3.
Of course, it's up to you to determine how you want to solve problems in a spreadsheet.
However, as you become more confident with using the order of operations, you may
find it easier to write only one formula to solve complex problems, as in the example
above.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 72/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you want to try another interactive scenario, check out Birthday Budget
Blues.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 73/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you want to try another interactive scenario, check out Pizza Party Panic.
Our spreadsheet
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 74/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. As you can see, our coworker Jordan has already added a ton
of information—there are several di erent columns, and each row contains the contact
information for one person, along with the amount of money that person donated.
While you might never have used it before, the IF function can simplify these kinds of
problems. The IF function can look at a value in a cell to see if it meets a basic condition
(in our example, if the value is greater than or equal to 50). Then it can then add text
to an empty cell. Here, we can use the IF function to look at each person's donation,
then add the words Free Gi if they donated at least $50. Basically, the IF function can
do the same thing we were planning to do, only it can do it much faster.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 75/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
=IF(
Now, we'll add our arguments. The arguments will tell the IF function what to look for
and what to write in the cell depending on the outcome.
The first argument sets up the condition we want to test. For this formula, we want to
know if the value in cell G2 is greater than or equal to 50. We'll use some
mathematical operators ( > for greater than and = for equals ) to write the condition:
=IF(G2>=50
The next argument will tell the function what to write if the condition is true (that is, if
the value is greater than or equal to 50). This means the person will be getting a free gi ,
so we'll have it write Free Gi . Because this argument is text, we'll need to put it in
double quotes (" "). And, as with any function, we'll need to use a comma to separate
each argument:
The final argument will tell the function what to write if the condition is false. This
means the person won't get a free gi . We could make the function write something like
None or No, but in this case we actually just want the cell to remain blank. To do this,
we'll just type double quotes ("") with no text inside. This is also our last argument, so
go ahead and close the parentheses:
OK, you're done! When you press Enter, the words Free Gi should appear in the cell.
Now we can just drag the fill handle down to add the formula to the other cells in
column H:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 76/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Bonus Section
Let's practice!
Question 1 of 1
Let's say our company is based in North Carolina and we want to know which of our donors are
local. Which of the following IF functions would place the word "Yes" for donors from North
Carolina and "No" for those who live out of state?
Submit
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. It looks like we have a list of contact information. Each person
has his or her own row, and there are columns for each person's first name, last name,
and other contact information.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 78/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
How it works
The word concatenate is just another way of saying "to combine" or "to join together".
The CONCATENATE function allows you to combine text from di erent cells into one cell.
In our example, we can use it to combine the text in column A and column B to create a
combined name in a new column.
Before we start writing the function, we'll need to insert a new column in our
spreadsheet for this data. In our example, we'll insert it to the right of column B.
=CONCATENATE(
In the current version of Excel, you can use the new CONCAT function
instead of CONCATENATE. The two functions work the same way.
Now we're ready to enter our arguments. The arguments tell the CONCATENATE function
what cells to combine. In our example, we want to combine the text in cells A2 and B2,
so we'll make each of those an argument:
=CONCATENATE(B2, A2)
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 79/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
You may have noticed that the first and last names don't have a space in between them.
That's because CONCATENATE will combine exactly what you tell it to combine, and
nothing more. If you want punctuation, spaces, or any other details to appear in the
cell, you’ll need to tell CONCATENATE to include it.
To add a space, we can simply add another argument: " " (two double quotes around a
space). Make sure the three arguments are separated by commas:
=CONCATENATE(B2," ",A2)
Perfect! Now we can use the fill handle to copy the formula to the remaining cells in this
column.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 80/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Bonus Section
Let's practice!
Question 1 of 1
In this example, what would be returned if
we put the following function into a cell?
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 81/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
This is all useful information, but it's not very consistent or well organized. In order to
compare these two printers, we'll need to make sure our spreadsheet organizes the data
consistently, which means we'll need to move some things around.
If you download our spreadsheet, you'll see that we've rearranged the printer cost,
cartridge cost, and number of sheets per cartridge so we have a clear, side-by-side
comparison of the two printers. We've also added the total number of sheets printed per
year, since we'll need to use that value in our formulas.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 82/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
See how this format makes it easy to compare the di erent information for each printer?
Now that we have our spreadsheet organized, we're ready to start solving this problem.
First, we'll calculate how many toner cartridges we'd need to purchase each year for
each printer. We know the o ice prints about 12,000 sheets of paper per year (that
value is stored in cell F2). If we divide that by the number of sheets per cartridge, we can
determine how many cartridges we'll need over one year. Here are our formulas:
▶ In cell C5, type =$F$2/C4 (Note: You can also just copy and paste the
formula from cell B5.)
OK, it looks like we'd need to purchase 24 cartridges over one year for the Nidi and only
12 for the Ace.
Next, we'll calculate how much money we'll spend each year on cartridges. Because
we just calculated the number of cartridges, we just need to multiply that value by the
cartridge price:
▶ In cell C6, type =C5*C3 (or copy the formula from cell B6)
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 83/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
It looks like cartridges would cost $420 each year for the Ace and $600 each year for the
Nidi. Next, we'll multiply those values by 3 to determine the cost for three years. Here
are our formulas:
Finally, we'll add the printer cost and the cartridge cost over three years to determine
the total cost over three years for each printer. Here are our formulas:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 84/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
And there's our answer! As you can see, the Ace X1 is cheaper than the Nidi 2600 in the
long term, even though the upfront costs for the Nidi are much lower. And because the
yearly cartridge cost for the Ace X1 is much lower, we'll continue to save money the
longer we keep this printer.
This lesson is part 1 of 5 in a series. The other lessons in this unit will build
on the same example and add various types of functionality. Before moving
on, you'll want to make sure you are comfortable creating formulas. If you'd
like more practice, you can work through some of the previous Excel
Formulas lessons.
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. It looks like we have an order invoice. There's information
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 85/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
about the order, along with some formulas to calculate the tax, order subtotal, and total
order cost.
▶ The second argument tells the function what to write if the condition is
true. In this example, if the value is greater than or equal to 100, we want it
to write "0" in the cell. So our second argument will be 0.
▶ The third argument tells the function what to write if the condition is false:
In this example, if the value is less than 100, we want it to use the value
from cell G3 (5.99). So our third argument will be $G$3 (we'll use an
absolute reference here just in case we move this formula in the future).
Here's our function: =IF(D6>=100,0,$G$3). We'll enter this function into cell D7.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 86/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you entered the function correctly, the shipping cost should change from $5.99 to
$0.00. That's because the Order Subtotal is more than $100.
If you want to test the function, change the value in cell C2 from 2 to 1. Because the
Order Subtotal is now less than $100, the Shipping cost should change from $0.00 to
$5.99.
OK—our function is working really well! We're ready to send this back!
If you'd like to continue on to the next part in this series, go to Invoice, Part
2: VLOOKUP.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 87/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. It looks similar to the invoice from the last lesson, but now we
have two di erent worksheets: one for the Invoice, and one for the Products.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 88/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
How it works
Before we start using VLOOKUP, it will be helpful to know what it does. In our example, it
will search for the Product ID number on the Products worksheet. It first searches
vertically down the first column (VLOOKUP is short for "vertical lookup"). When it finds
the desired product ID, it moves to the right to find the product name and product
price.
Before we write our function, we'll need to take a moment to think carefully about each
argument and collect some information from our spreadsheet. The arguments will tell
VLOOKUP what to search for and where to look. We'll need to use four arguments:
1 The first argument tells VLOOKUP what to search for. In our example,
we're searching for the product ID number, which is in cell A2, so our first
argument is A2.
2 The second argument is a cell range that tells VLOOKUP where to look for
the value from our first argument. In our example, we want it to search for
this value in cell range A2:C13 on the Products worksheet, so our second
argument is Products!$A$2:$C$13. Note that we're using absolute
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 89/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
references so this range won't change when we copy the formula to other
cells.
3 The third argument is the column index number, which is simpler than it
sounds: The first column in the cell range from the previous argument is 1,
the second column is 2, and so on. In our example, we're looking for the
Product Name. The names are stored in the second column of the cell
range from the previous argument, so our our third argument is 2.
It's important to know that VLOOKUP will always search the le most
column in the cell range. Since our cell range is A2:C13, it will search
column A.
=VLOOKUP(
Next, we'll add each of the four arguments, separate them with commas, then close the
parentheses:
If you entered the function correctly, the product name should appear: Measuring cups.
If you want to test your function, change the Product ID number in cell A2 from MEA7879
to CHE7888. The product name should change from Measuring cups to Cheesecloth.
Next, we also want the Product ID to pull in the product price, so we'll use the
VLOOKUP function again. Since we're using the same data, this function will be very
similar to the one we just added. In fact, all we have to do is change the third argument
to 3. This will tell VLOOKUP to pull in the data from the third column, where the product
price is stored:
We've got our formulas working, so we can just select cells B2 and C2 and then drag
the fill handle down to copy the formulas to the other rows in the invoice. Now, each
row is using VLOOKUP to find the Product Name and Product Price.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 91/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Bonus Section
Let's say a veterinarian's o ice is creating a spreadsheet to look up patient information.
Here's the patient directory. This is where information will be pulled from:
Here's the patient lookup sheet. This is where the function will be inserted.
Let's practice!
Question 1 of 1
Which of the following VLOOKUP functions could be inserted into cell B4 of the Lookup sheet in
order to insert the pet type?
=VLOOKUP($B$1, =VLOOKUP(Directory!$A$1:$H$150,
Directory!$A$1:$H$150, 4, False) $B$1, False, 4)
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 92/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Submit
If you'd like to continue on to the next part in this series, go to Invoice, Part
3: Fix Broken VLOOKUP.
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. The VLOOKUP function in row 2 looks good, but row 3 doesn't
seem to be working. And since the formulas in column E depend on the values in row 3,
they're not able to calculate correctly.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 93/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
But if we look at the function in cell B3, we can see that the VLOOKUP function is only
searching for information in cell range A2:C13.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 94/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
As you can see, the VLOOKUP function isn't searching the full list of products; it's only
searching down to row 13. So it has no trouble finding the Ramekin, but it won't be able
to find the Zester, Grater, or Wire whisk.
To fix this, we'll need to change the second argument in VLOOKUP so it searches the
entire product list. There are two ways to do this:
We'll edit the function to include all of the cells in the Products table. And just in case
more products are added later, we'll increase the number of rows in the cell range to
100. This means we're including a lot of empty rows, but that's OK—the VLOOKUP
function will still work the same way. So here's our new function:
The function will recalculate, and the correct product name should appear: Zester. We'll
also make the same correction to the remaining VLOOKUP functions in the spreadsheet:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 95/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
And that's it! Now our spreadsheet's working correctly, and it'll be harder to break these
functions in the future.
Use a table
Above, we fixed our VLOOKUP function by extending the cell range to row 100. However,
if we continue adding more products, we will eventually break the VLOOKUP function
again, so this is not a perfect solution. If you're using Microso Excel, a much better
solution is to use a table. This will ensure that any new data will be included
automatically.
Tables work with all recent versions of Excel, but they are not currently
available in Google Sheets.
First, we'll select our product information and then convert it to a table. Note that this
will work a bit di erently depending on which version of Excel you're using:
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 96/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
▶ For Excel 2003 and earlier: Go to Data > List > Create List (tables were
known as lists in Excel 2003 and earlier).
Next, we'll name the table. In this example, we'll give it the name: ProductsList. Note
that table names cannot contain spaces.
Now let's go back to our VLOOKUP function. Rather than telling VLOOKUP to search in a
specific range on the Products worksheet (Products!$A$2:$C$100), we can simply type
the name of the table (ProductsList).
If anyone ever adds information to the table, the VLOOKUP function will include it
automatically—no need to worry about updating the cell range later on. Again, you'll
need to update all of the VLOOKUP functions in the spreadsheet to refer to the table
rather than the cell range.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 97/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you'd like to continue on to the next part in this series, go to Invoice, Part
4: More Shipping Options.
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. It looks similar to our spreadsheet from the previous lesson,
but now there are some new rows for the shipping options, along with a new Shipping
worksheet with di erent shipping options and costs.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 98/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
If you've never used VLOOKUP before, you can go to Invoice, Part 2: Using
VLOOKUP to learn the basics.
=VLOOKUP(
Next, we'll add our arguments. The first argument tells VLOOKUP what to search for. In
our example, it will search for the Shipping Option, which we will be typing in cell E6 of
our Invoice.
=VLOOKUP(E6
The second argument tells VLOOKUP where to look for the value in our first argument.
In our example, that's in the Shipping worksheet, in cell range A2:B4.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 99/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
We'll include some extra rows in the cell range in case more shipping options are added
later.
=VLOOKUP(E6, Shipping!A2:B10
Finally, we'll add our third and fourth arguments. In this example, the Shipping Cost is in
column B (the second column), so our third argument is 2. And because we're only
looking for exact matches, the fourth argument is FALSE.
Type the formula into cell E7 of the Invoice and press Enter to see the result.
If you typed the formula correctly, the correct shipping price should appear: $9.99. If you
want to make sure your formula is working correctly, change the Shipping Option in cell
E6 from 3-Day to 2-Day. The Shipping Cost should change from $9.99 to $13.99.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 100/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
As you may remember from Invoice, Part 1: Free Shipping, we used the IF function to
change the shipping cost to $0 if the cost of the order was at least $100. This time, we'll
do it a bit di erently: If the order is at least $100, we'll give them a credit of $5.99, which
is the cost of standard shipping. This means standard shipping will be free, and the more
expensive shipping options will also get a discount of $5.99.
Just like before, our new formula will look at the Order Subtotal in cell E5 to see if the
value is greater than or equal to $100, so our first argument will be E5>=100.
=IF(E5>=100
The second argument looks to see if the statement in the first argument is true. If it's
true, they'll receive a credit for the cost of standard shipping (5.99). Since the credit will
be subtracted from the total order cost, we'll make it a negative number: -5.99.
=IF(E5>=100,-5.99
The third argument looks to see if the statement in the first argument is false. If it's false,
they won't receive the $5.99 shipping credit. This means our third argument will be 0
(zero). We'll also add a close parenthesis a er the last argument. Here's our new IF
function:
=IF(E5>=100, -5.99, 0)
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 101/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
When you press Enter, the correct discount should appear in cell E8.
If we look at the formula that calculates the Total Order Cost in cell E9, we can calculate
the total value of Order Subtotal, Shipping Cost, and Discount. We'll simply add all
three values; since the Discount is a negative number, that value will be subtracted from
the Total Order Cost.
If you'd like to continue on to the next part in this series, go to Invoice, Part
5: Data Validation.
Our spreadsheet
Once you've downloaded our spreadsheet, open the file in Excel or another
spreadsheet application. Cell E7 is using the same VLOOKUP formula we added in
Invoice, Part 4: More Shipping Options, but it's no longer pulling in the Shipping Cost
correctly. And since the formula in cell E9 depends on that value, it's not able to
calculate correctly either.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 103/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Data validation
Data validation allows you to control exactly what a user can enter into a cell. In our
example, we can use data validation to ensure that the user chooses one of the three
possible shipping options. To make things even easier, we can insert a drop-down list of
the possible options.
This kind of data validation allows you to build a powerful, fool-proof spreadsheet. Since
users won't have to type in data manually, the spreadsheet will be faster to use, and
there's a much lower chance that someone can introduce an error. Depending on what
spreadsheet program you're using, the process of adding data validation will vary. We'll
show you how to add data validation in Microso Excel and Google Sheets.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 104/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
3 A dialog box will appear. Type a name for the cell range in the Name: field
and then click OK. In our example, we'll name it ShipRange.
If you ever add more data to your spreadsheet, you can easily check all of
your named ranges with the Name Manager to make sure they are
including all of the data.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 105/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 106/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
4 In the Source: field, type the equals sign (=) and the name of your range,
and then click OK. In our example, we'll type: =ShipRange.
5 A drop-down arrow will appear next to the selected cell. Click the arrow to
select the desired option. In our example, we'll select Standard.
Alternatively, you can type the shipping option, but Excel will only accept it
if it is spelled correctly.
6 The selected value will appear in the cell. Now that we're searching for the
exact name of a shipping option, our VLOOKUP function is working
correctly again.
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 107/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 108/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
2 A dialog box will appear. Click Select data range in the Criteria: field.
3 Select the data that will appear in the drop-down list, and then click OK. In
our example, the shipping options are stored in cell range A2:A4 on the
Shipping worksheet, but we'll select A2:A10 (we're including empty rows
just in case more shipping options are added later on).
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 109/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
5 A drop-down arrow will appear within the selected cell. Click the arrow to
select the desired option. In our example, we'll select Standard.
Alternatively, you can type the shipping option, but Google Sheets will only
accept it if it is spelled correctly.
There we go—with our new data validation drop-down list, it'll be a lot harder for
someone to break our function in the future!
Quiz
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 110/111
5/19/2020 Excel Formulas: Invoice, Part 5: Data Validation
Question 1 of 14
A group of cells is called a ________.
Submit
https://edu.gcfglobal.org/en/excelformulas/invoice-part-5-data-validation/1/ 111/111