| Applies to |
| Microsoft Office Excel 2003 |
Adding and counting data is the bedrock of data analysis, whether you are tallying an exact head count of an organization, subtotaling sales in the Northwest region, or doing a running total of weekly receipts. Microsoft Excel documents more ways to add and count than you can shake a stick at. That's great, because it means there's likely a help topic that explains how to do what you want.
But, it isn't always obvious which help topic to use.
To help you make the right choice, here's a comprehensive summary of links to each adding and counting help topic. Each section has a decision table to help you quickly find the information you're looking for.
Tip Don't forget to add
this article to your favorites list, so you can always count on it to help you find
the topic you're looking for.
Adding numbers
The following sections summarize the specific tasks for adding numbers, the best Office Excel feature for each task, and a link to one or more help topics for specific examples and information.
Addition with one or more criteria
| If you want to |
See |
Comments |
| Add values in a range based on a single criteria by using the SUMIF, or SUM and IF functions |
SUMIF IF (Contains an example for deciding whether or not to add values)
Add numbers ("Add numbers based on one condition" section)
XL: When to Use SUM(IF()) instead of CountBlank()
|
You can add numbers based on a single criteria with the SUMIF function, but sometimes it's better to nest the SUM and IF functions if you need more flexibility. |
| Add values in a column based on single or multiple criteria by using the DSUM database function |
Add numbers ("Add numbers based on criteria stored in a separate range" section)DSUM
|
Use the DSUM function when you have a column list and you find it easier to define your criteria in a separate range of cells, rather than use a nested function. |
| Add values in a range based on multiple criteria by using the Conditional Sum Wizard |
Add numbers ("Add numbers based on multiple conditions with the Conditional Sum Wizard" section) |
Feeling lazy? Let the Conditional Sum Wizard (available from the Conditional Sum command on the Tools menu) add values based on multiple criteria. If this command is not available, install and load the Analysis ToolPak add-in.
How?
- On the Tools menu, click Add-Ins.
- In the Add-Ins available list, select the Analysis ToolPak box, and then click OK.
- If necessary, follow the instructions in the setup program.
|
| Add values in a range based on multiple criteria by using the SUM and IF functions |
Add numbers ("Add numbers based on multiple conditions" section)XL: How to Use a Logical AND or OR in a SUM+IF Statement in Excel
XL: When to Use SUM(IF()) instead of CountBlank()
|
There's no one function or feature that can do this task, so your best bet is to nest the SUM and IF functions. |
Addition of squared and array values
| If you want to |
See |
Comments |
| Add the product of corresponding values in multiple arrays |
SUMPRODUCT |
The SUMPRODUCT function is great for values in arrays with the same dimensions, but you can also use the SUM function with a formula array if you need more flexibility. |
| Add the square of each value in a range |
SUMSQ |
These calculations are often used with statistics and complex math. |
| Add the sum of the square of corresponding values in two arrays |
SUMX2PY2 |
| Add the difference of the square of corresponding values in two arrays |
SUMX2MY2 |
| Add the square of the difference of corresponding values in two arrays |
SUMXMY2 |
Counting number and text values
The following sections summarize the specific tasks for counting number and text values, the best Office Excel feature for each task, and a link to one or more help topics for specific examples and information.
Counting with one or more criteria
| If you want to |
See |
Comments |
| Count cells in a range based on a single criteria by using the COUNTIF function |
COUNTIF Count numbers greater than or less than a number
|
You can easily count cells based on a single criteria with the COUNTIF function. |
| Count cells in a column based on single or multiple criteria by using the DCOUNT database function |
DCOUNT |
Use the DCOUNT function when you have a column list and you find it easier to define your criteria in a separate range of cells, rather than use a nested function. |
| Count cells in a range based on multiple criteria
by using the COUNT and IF functions
|
Count how often a value occurs |
There's no one function or feature that can do this task, so your best bet is to nest the COUNT and IF functions. |
Counting with blank values
| If you want to |
See |
Comments |
| Count nonblank cells in a range by using the COUNTA function |
Count nonblank cells COUNTA
|
When counting cells, sometimes you want to ignore any blank cells because only cells with values are meaningful to you. For example, you want to count all salespeople who made at least one sale in a region. |
| Count nonblank cells in a list by using the DCOUNTA function |
DCOUNTA |
Count the nonblank cells in a list column or the entire list. |
| Count blank cells in a contiguous range by using the COUNTBLANK function |
COUNTBLANK |
When counting cells, sometimes you want to include blank cells because they are meaningful to you. For example, you want to count all salespeople in a region, whether or not they made a sale. |
| Count blank cells in a discontiguous range by using the SUM and IF functions |
XL: When to Use SUM(IF()) instead of CountBlank() |
Agreed, it's not obvious to use the SUM and IF functions instead of COUNTBLANK, but this topic explains how. |
Related Office Online discussions
Read related questions and answers from other Microsoft Office customers.