09 How To Use Excel
09 How To Use Excel
=1+2 Output: 3
Since Excel sees the = sign at the beginning of the line, it realizes that
it's being given a formula to calculate. It then sees 1+2 and adds the two
numbers together, outputting a final value of 3.
Each function is made up of three parts:
First, a function name, Function names are built into Excel. For
example, there is a SUM, AVERAGE…
Second, arguments, which combine within the function to output
something. For example, if we wanted to take the AVERAGE of 4
and 6, the arguments to the function would be the numbers four and
six. In a function, arguments are separated by commas within
parentheses.
Third, output, which is what comes out of the function when it's
finished calculating. For example, if we took
the AVERAGE of 4 and 6, the output would be 5.
Take a look at the examples of completed formulae below. Can you
identify the function names, arguments, and output?
=SUM (C3:C7)
Our formula works in cell C8, but when we copy and paste it to the
right, our relative cell references change and our formula breaks:
=D7*I4 Output: 0
Notice what happens when we copy and paste this formula to the right.
Our $H4 reference doesn't change, because the column letter is locked.
Our formula now works for all cells into which we're pasting it!
SUM
SUM is one of Excel's simplest — and most-used — mathematical
functions. It can take as many arguments as you want to give it, in the
form of numbers, cell references, or cell ranges. Given these arguments
as inputs, it outputs the SUM of all values provided — including each
individual cell within a cell range.
Here's a basic use of the SUM function, in which we add up a series of
manually-entered numbers:
=SUM(3, 7)
Output: 10
And, finally, here's a better use of the SUM function, in which we use a
cell range to add up the values in a series of contiguous cells:
=SUM(C3:C5)
Output: $18,000,000
Check out our detailed SUM tutorial for even more details and
information.
AVERAGE
The AVERAGE function works much like the SUM function: it takes as
arguments a list of numbers or cell ranges. Unlike SUM it outputs
the AVERAGE of the values provided.
Here's a basic use of AVERAGE in action:
=AVERAGE(10, 20)
Output: 15
Head over to our overview of the AVERAGE function for more info.
MAX
The MAX function starts to get a little more complicated: given input
arguments of numbers, cell references, or cell ranges, MAX finds the
maximum individual value provided and outputs it. MAX is particularly
useful when working with large quantities of data to determine high
values within a set — like students' highest score on a test or a daily
high stock price.
Take a look at the following formula, in which we've used MAX to find
the maximum value within a series of individual numbers:
=MAX(4, 5, 6)
Output: 6
MAX has many applications, and as you get more and more comfortable
with Excel, you're sure to find multiple uses for it within your
spreadsheets. You can also use the closely-related MIN formula to find
minimum values within a set. Check our our MAX and MINtutorials for
more.
COUNT
COUNT is another frequently-used function in Excel. Given a cell range
or set of values, it counts the instances in which a number appears in the
given range. Consider the following example:
=COUNT(5, 9, 10)
Output: 3
How is this useful in practice? Use the COUNT function in your sheets
to count data points, like number of test scores, number of items sold in
a given period of time, and more. COUNTalso has a sister function
called COUNTA, which includes cells that contain text in its totals. Stop
by our COUNT and COUNTA tutorial pages for more info.
FURTHER READING
Lookup functions
Now that we've got a handle on some of Excel's basic mathematical
functions, it's time to move on to a more complicated class of tools:
lookups. Lookup functions allow us to look up a given value on a table
with multiple rows and columns dynamically. That's quite a mouthful, so
let's take a look at a real-world example to give you an idea what we
mean.
Take a look at the below spreadsheet, which lists SnackWorld unit sales
and profit for various item categories in a given month.
Let's say that a SnackWorld analyst wants to pull the Unit Sales number
for the Lollipopscategory. She could just look it up on the table — but
manually looking it up becomes infeasible if the table is too large — for
example, if it contains hundreds or thousands of rows and columns. It's
also time-consuming. What if we could create a tool in which we enter a
category name, and the Unit Sales number for that category is
automatically pulled from our input table?
VLOOKUP
We can accomplish the above using
the VLOOKUP function. VLOOKUP takes a table and a lookup value as
inputs, browses the given table for the lookup value in question, and
finds whatever sits in a corresponding column number specified. Here's
how it works:
=VLOOKUP(C9, B2:D7, 3)
Output: $24,000,000
INDEX MATCH
Once you've mastered VLOOKUP, it's time to move on to an even more
powerful lookup formula: INDEX MATCH. INDEX MATCH isn't
actually a single function, but rather a combination of two separate
Excel functions: INDEX and MATCH. We use it in place
of VLOOKUP for almost all of our lookups, because it confers several
important advantages:
FURTHER READING
How to do a VLOOKUP
Using INDEX MATCH
Using INDEX MATCH MATCH (look up in two dimensions)
INDEX MATCH with multiple criteria
Logical functions
Logical functions are some of the most advanced formulas you can
create in Excel. They allow us to tell Excel to choose one of various
possible outputs depending on a condition that we specify. This
functionality becomes incredibly useful when you want Excel to make
decisions for you: for example, marking a test score as "Passing" if it is
over 70%; marking a salesperson's quota as "met" if she has exceeded
$20M in monthly sales; or marking a stock as "High-priority" if its price
drops below a certain limit.
IF statements
IF statements are the foundation of logical functions in
Excel. IF statements look like this:
=IF(logical_expression, value_if_true, value_if_false)
SUMIF
Once you've got a handle on the IF statement, it's time to move on to an
even more useful Excel feature: SUMIF. This handy function allows us
to take the SUM of every number in a range of values, provided that
certain external criteria for those values are met.
Let's take a look at a basic example of SUMIF in action to demonstrate.
Consider the following spreadsheet, which lists SnackWorld's monthly
sales by item type and product category.
We already know how to use VLOOKUP and INDEX MATCH to
dynamically pull the sales numbers for any individual Item. But what if
we wanted to SUM up sales for every item within a given Category?
We can do this using the SUMIF function. Take a look at its syntax
below:
Given an input range of data points and a set criteria that we want those
data points to fulfill, SUMIF will take the SUM of all numbers within a
separately-provided sum_range. Here's a practical example
of SUMIF used to solve our category problem above:
=SUMIF(C3:C7,"="&G4,D3:D7)
Output: $11,000,000
In the above example, SUMIF takes a look at the range C3:C7 and
evaluates each cell in that range based on its provided criteria: the value
in the given cell is equal to the value in cell G4. Note the syntax we've
used to tell Excel that we want to evaluate equality to cell G4:
The =sign, in quotes, the ampersand (&), and then a reference to cell G4.
This syntax might be confusing at first, but it's just how SUMIF works;
note that we can replace that = sign with any other logical operator,
like <= or <>.
After examining each cell in the range C3:C7, Excel adds the
corresponding value in the range D3:D7 to a SUM total if and only
if our criteria is true — in this case, if the Category is equal to the value
in cell G4, "Baked Goods". In this case, our final output is $11,000,000,
because there were $11,000,000 total sales of Baked Goods in the data
set provided.
The best part about this formula is that it's dynamic. Try changing the
string in cell G4 from Baked Goods to Candy and watch as our category
sales calculation automatically updates.
The above may take a little time to digest, but walk through it a couple
times and you'll get a handle on how SUMIF works. If you're still having
trouble, take a look at our in-depth SUMIFtutorial for more details and
examples.
Once you've mastered SUMIF, it's also worth checking out our overview
of SUMIFS, which is SUMIF's big brother. SUMIFS allows you to
conditionally SUM values in a row based on multiple criteria rather than
just a single criteria.
It's also worth noting that SUM isn't the only function that has a
conditional formula. COUNTIF works much the same way, but
it COUNTs rows instead of SUMming them.
FURTHER READING
Creating charts
Formulas and numbers aren't all that Excel has to offer. In addition to
displaying data numerically, it's also excellent at displaying data visually
using charts and graphs. In this section, we'll give you a brief overview
of Excel's charting capabilities, and show you how to generate graphs
based off of your data.
The most important first step to creating a chart is preparing your data.
To generate a chart, you'll need to create a data summary table that
shows the exact data points that you'd like to appear on your chart.
Oftentimes, we create summary table for use with charts and graphs by
leveraging the Excel functions we discussed above, including
lookups, SUMIF, and COUNTIF. In the example below, we've
consolidated a list of SnackWorld sales by category and month.
Once your data is ready for charting, select your entire table by clicking
and dragging your mouse, or using hotkeys (Ctrl + A using Windows
or ⌘ + A on a Mac). Then, navigate to the Insert tab on the Ribbon, hit
the Charts button, and select the type of chart you would like to create.
In our example, we'll create a Clustered Column chart from our data.
Our chart is created! With just a few simple clicks, we've taken a data
summary table and made it visually clear and accessible for our users.
There are many different chart types available in Excel, so it's important
to think carefully about which visual will most clearly communicate
your data. In the example below, we've used the same data to create
a Stacked Column chart, which gives us a more useful look at total sales
by month segmented by product category.
Of course, the chart above is lacking some crucial details — for
example, it doesn't have a title, so we have no idea what year our data
comes from (or, for that matter, what company's sales data it represents).
Once you've created your chart, ensure that your users have all the data
they need by adding a title, axis labels, and other formatting, like a
legend and data labels. All of these options are available when you select
your chart and go to the Layout tab on the Ribbon:
There are many complex charting options in Excel — including
advanced features like manually-set axis labels, statistical analysis, and
customized styling. Play around with the options in the Layout, Design,
and Format tabs on the ribbon to familiarize yourself with the full range
of Excel's capabilities. Or, check out our in-depth article on charting for
more information.
FURTHER READING
Report Filter allows us to filter our output based on the values in one
or more fields.
Column labels lets us summarize by a particular field across the top
of the screen (columns).
Row Labels lets us summarize by a particular field down the side of
the screen (rows).
Values Specifies the column data that we'd like to summarize — for
example, Total price.
That's all a lot to keep track of — so let's take a look at a real-life
example to get a better handle on what this all means. Suppose that a
SnackWorld analyst wants to summarize total sales by customer over the
entire period contained within our data table. She could do so by
dragging the Customer column to the Row Labels section — to indicate
that we want each row of our Pivot Table to represent a unique customer
— and the Total Price column to the Values section — to indicate that
we want to sum up Total Price by customer. Move the field names
around to different sections of the Pivot Table by clicking and dragging
with your mouse.
Without any formulas or functions, Excel has automatically added up
the Total Price column for each of our customers. We've created an
accurate summary table quickly and easily with minimal effort based on
a large input data set — that's the magic of Pivot Tables!
There are lots more things we can do with Pivot Tables by moving our
columns between the four boxes at the bottom of the screen. For
example, by dragging the Quantity column into the Values section
alongside Total Price, we can sum both fields at once, segmented by
customer. This view shows both total sales dollars and total quantity of
goods ordered by customer:
We can also drag another field — like Item — to the Column
Labels section of the report to create a two-dimensional summary
breaking out total sales by customer and item:
Or, we can drag a field to the Report Filter section to filter our output
table based on one or more criteria that we specify. In the following
example, we've dragged the Item column to the Report Filter box to
open up a dialogue that allows us to filter our output based on item type.
The power of Pivot Tables is practically limitless — they can be used in
a massive variety of situations to segment and summarize data. They're
particularly valuable when calculating a SUM, COUNT,
or AVERAGE across a large data set. For more detailed information
about how to set up and use Pivot Tables, be sure to check out our in-
depth explanation of Pivot Table features.
Advanced formatting
Now that you've got a handle on data manipulation in Excel, it's time to
learn some advanced formatting techniques to polish your spreadsheets
— making them both beautiful to look at and easy to interpret.
The most useful of these features is called Conditional Formatting. It's
an Excel tool that allows you to format cells (i.e. change how they look)
based on the values that they contain. For example, you could use
Conditional Formatting to highlight all cells that contain values over a
certain threshold; or, you could use it to turn cells that contain larger
numbers green and cells that contain smaller numbers red.
Let's take a look at a common example of conditional formatting in
practice to get a first-hand view of just how useful it is. Take a look at
the below spreadsheet, prepared by a SnackWorld analyst. It shows the
company's total monthly sales by product category for the year of 2019:
FURTHER READING
There you have it: the top ten places to start when you're learning how to
use Excel. We hope that this tutorial has been helpful as you start off
with this amazing and powerful program. Our website features dozens of
free, easy-to-follow courses on how to use Excel's formulas, functions,
and other features, so be sure to check it out for more information as you
learn. And if you have any questions or comments for us, we'd love to
hear them — sound off in the Comments section below. Thanks for
coming by!