Beruflich Dokumente
Kultur Dokumente
SummingupwaystoaddandcountExceldataExcel
Sign in
Apps
Training
Admin
Applies To: Excel 2016, Excel 2013, Excel 2010, Excel 2007
Install
Office 365
Summing adding values is an integral part of data analysis, whether you are
subtotaling sales in the Northwest region or doing a running total of weekly
receipts. Excel provides multiple techniques that you can use to sum data.
To help you make the best choice, this article provides a comprehensive summary
of methods, supporting information to help you quickly decide on which technique
to use, and links to indepth articles.
Summing should not be confused with counting. For more information about
counting cells, columns, or rows of data, see Count cells, rows, or columns of data.
In this article
Simple addition and subtraction
Demo: View sums by using the Excel status bar
Add the values in a cell by using a simple formula
Subtract the values in a cell by using a simple formula
Add the values in a column or row by using a button
Add the values in a range by using a function
Subtract the values in a range by using a function
Summing data by grouping and pivoting
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
1/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
2/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
3/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
For more information about how to use AutoSum, see the article Use Excel as your
calculator.
Top of Page
Attendance
4823
12335
For example, using the data in the preceding table, all of the following formulas use
the SUM function to return the same value 17158:
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
4/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
=SUM4823,12335
A
=SUMA2,A3
=SUMA2:A3
=SUMA2,12335
The following figure shows the formula that uses the SUM function to add the
value of cell A2 and 12335. Below the formula, a ScreenTip provides guidance for
using the SUM function.
NOTES:
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
5/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
Attendance
29072
12335
For example, using the data in the preceding table, all of the following formulas use
the SUM function to return the same value 16737:
=SUM29072,12335
=SUMA2,A3
=SUMA2,12335
=SUMA2,1*A3
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
6/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
Region
Month
Sales
East
Jan
$18,000
East
Feb
$23,000
East
Mar
$19,000
West
Jan
$17,000
West
Feb
$27,000
West
Mar
$21,000
The following illustration shows an outline with subtotals, grouped by region, and a
grand total.
Use the Subtotal command Data tab, Outline group to create an outline,
subtotals, and a grand total.
The original data included three rows of data for the East region and three rows of
data for the West region rows 2 through 7. Note that the subtotal operation
inserted the East Total in row 5 between the last row of East data and the first row
of West data.
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
7/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
If you click cell A4 and then click the Subtotal command, Excel creates an outline
and inserts rows for East Total, West Total, and Grand Total, and populates the cells
in the Sales column with those totals.
For more information, see the following articles:
Outline a list of data in a worksheet
Insert subtotals in a list of data in a worksheet
Top of Page
For example, suppose that you want to calculate subtotals and a grand total for
data in cells C2 through C7, but you want to ignore the hidden data in row 3 and
row 6. The function you use looks like the following:
= SUBTOTAL 109,C2:C7
The first argument 109 specifies that you want to add the values in the range and
ignore hidden values. To include the hidden values, you instead use 9 as the first
argument.
For indepth information, see the articles SUBTOTAL function and Total the data in
an Excel table.
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
8/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
You can quickly create a PivotTable by selecting a cell in a range of data or Excel
table and then, on the Insert tab, in the Tables group, clicking PivotTable.
To show the power of a PivotTable, note that in the following example, the sales
data contains many rows there are actually 40 rows of data, but the graphic shows
only a portion. In addition, the data isn't summarized, and it has no subtotals or
grand total.
A PivotTable report based on the same data shows subtotals, grand totals, and
provides a concise summary at a glance.
Creating and working with PivotTables may require some initial preparation of your
data and a familiarity with some concepts.
For detailed information to help you get started, see the following articles:
Calculate values in a PivotTable report
Subtotal and total fields in a PivotTable report
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
9/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
If the SUMIF function didn't exist, you could still produce the same answer by
combining the IF and the SUM functions. Combining functions in this manner is
also known as "nesting," because one function is used in another function.
To create a formula that mimics the SUMIF function, you enter a formula that treats
the range A2 through A6 as an array, which means that the range is considered as a
single entity containing five cells.
Your formula looks like this: {=SUMIFA2:A6>20,A2:A6}. The "curly" braces that
surround the formula indicate that this is an array formula. An array formula
requires some special treatment: Instead of typing the braces yourself, you must
instead press CTRL+SHIFT+ENTER Excel then surrounds the formula
=SUMIFA2:A6>20,A2:A6 with the braces. If you type the braces yourself, you
won't create an array formula.
Try this!
Copy the data from the following table into a worksheet at cell A1. After you paste
the data, you'll notice that cell A10 contains a #VALUE! error. This means that you
need to convert cell A10 to an array formula. Do this by pressing F2 and then
pressing CTRL+SHIFT+ENTER. Excel displays the result 65 in cells A8 and A10.
How to copy the example worksheet data
10/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
Press CTRL+C.
In the worksheet, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return the
results, press CTRL+` grave accent.
Weight
18
29
36
11
16
=SUMIFA2:A6,">20"
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
11/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
10
=SUMIFA2:A6>20,A2:A6
For more information, see the article SUMIF function and the section "Add numbers
based on one condition" in the article Add numbers.
Also, the Knowledge Base article XL: When to Use SUMIF instead of CountBlank
provides additional guidance on when to use the SUMIF function.
Top of Page
For more information, see What happened to the Conditional Sum Wizard addin?.
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
12/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
If this command is not available the Solutions group may also not be visible,
install and load the Analysis ToolPak addin.
How to load the Analysis ToolPak
Click the Microsoft Office Button
ins category.
1. In the Manage list, select Excel Addins, and then click Go.
2. In the Addins available list, select the Analysis ToolPak box, and then click
OK.
3. If the wizard appears in the Inactive Application Addins list, select the
To use the Conditional Sum Wizard, select your range of data and click the
Conditional Sum command Solutions group on the Formulas tab. Follow steps 1
through 4 to complete the wizard. The following illustration shows step 2 of the
wizard, in which there is one condition: The values to be summed must be greater
than 100.
See the section "Add numbers based on multiple conditions with the Conditional
Sum Wizard" in the article Add numbers for more information.
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
13/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
14/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
that sum by the total credits 18, and determines the grade point average 3.41.
This type of calculation is also known as a weighted average.
You can also use the SUMPRODUCT function in more advanced mathematical
operations by multiplying several arrays.
The SUMPRODUCT function is easy to use with arrays that have the same
dimensions, but you can also use the SUM function in an array formula if you need
more flexibility.
For more detailed information, see the article SUMPRODUCT function.
The following four functions are typically used only in advanced statistical or
complex mathematical applications, so only a brief description is provided. For
more information, click the function name to go directly to its reference topic.
SUMSQ function Returns the sum of the squares of a list of numbers or values
in a range. For example, SUMSQ2,3 returns 13.
SUMX2PY2 function Adds the sum of the squares of corresponding values in
two arrays.
SUMX2MY2 function Returns the sum of the difference of squares of
corresponding values in two arrays.
SUMXMY2 function Returns the sum of squares of differences of
corresponding values in two arrays.
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
15/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
2. In the cell directly below your balance in this case, C3, enter a formula that
3. Drag this formula down to any new rows that you add. In the following
Deposits
Withdrawals
Balance
500
1000
625
=SUMC2,A3,B3
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
16/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
740
Examples
C
=SUMC3,A4,B4
You can use a running balance as you would use a check register to watch values of
items in cells increase or decrease as you enter new items and values over time.
For more information, see the article Calculate a running balance.
Top of Page
Enter this
Examples
to:
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
17/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
To refer
Enter this
Examples
A cell or
Sheet2!B2:B4
range in
another
Sheet3!SalesFigures
to:
A cell or
range in
another
workbook
worksheet followed by an
exclamation point, followed by
that is
[MyWorkbook.xlsx]Sheet1!A7
currently
open
A cell or
['C:\My Documents\
range in
another
[MyWorkbook.xlsx]Sheet1'!A2:A5
workbook
that is not
open
Top of Page
18/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
You can use date and time functions and even simple addition or subtraction to
A elapsed time,
B estimate Ccompletion dates for projects, and more. The
calculate
following table shows some formulas that calculate elapsed times and days. Note
that if you subtract a date or time that results in a negative value, Excel displays
### characters in the cell that contains the formula.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
Start time
End time
Elapsed
Description result
time
3
formula
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
19/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
11:55:24
2:48:13
=B2A2
AM
PM
Start date
End date
Elapsed
Description result
days
formula
Working with date and time values can produce unexpected results, so proceed
carefully.
Top of Page
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
20/21
9/12/2016
SummingupwaystoaddandcountExceldataExcel
Note In versions of Excel earlier than Excel 2007, these same values can be
displayed on the status bar, but only one value at a time.
Top of Page
Share
Yes
No
Trademarks
Accessibility
Legal
2016 Microsoft
https://support.office.com/enus/article/SummingupwaystoaddandcountExceldatad3f918a10151403e881fa92f3176f8ea
21/21