Add numbers
Let's say you want to sum prices for all items not on sale in a store or sum gross profit margins for all departments under budget. There are several ways to add numbers.
What do you want to do?
Add numbers in a cell
To do this task, use the + (plus sign) arithmetic operator.
For example, if you type the following formula in a cell:
=5+10
The cell displays the following result:
15
Add all contiguous numbers in a row or column
To do this task, use AutoSum .

Click a cell below the column of numbers or to the right of the row of numbers.

On the Home tab, in the Editing group, click AutoSum , and then press ENTER.
Add noncontiguous numbers
To do this task, use the SUM function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example

Create a blank workbook or worksheet.

Select the example in the Help topic.
Note Do not select the row or column headers.Selecting an example from Help

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), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.


Function details
Add numbers based on one condition
You can use the SUMIF function to create a total value for one range based on a value in another range, as in the following example.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example

Create a blank workbook or worksheet.

Select the example in the Help topic.
Note Do not select the row or column headers.Selecting an example from Help

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), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.


The SUMIF function uses the following arguments
Formula with SUMIF function
1. Range to evaluate: Check these cells to determine whether a row meets your criteria.
2. Criteria: The condition that the cells you evaluate must meet for the row to be included in the sum.
3. Range to sum: Add the numbers in these cells provided that the row satisfies the condition.
Function details
Add numbers based on multiple conditions
To do this task, use the IF and SUM functions.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example

Create a blank workbook or worksheet.

Select the example in the Help topic.
Note Do not select the row or column headers.Selecting an example from Help

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), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.


Function details
Add numbers based on criteria stored in a separate range
To do this task, use the DSUM function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example

Create a blank workbook or worksheet.

Select the example in the Help topic.
Note Do not select the row or column headers.Selecting an example from Help

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), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.


The DSUM function uses the following arguments.
1. Range to evaluate: The list from which you want to sum.
2. Field: The label of the column to sum.
3. Criteria: The range of cells that contains the conditions.
Function details
Add numbers based on multiple conditions with the Conditional Sum Wizard
If you want to summarize a range of cells based on specific conditions, you can use the Conditional Sum Wizard. For example, if your range of cells contain sales amounts for different salespeople, the Conditional Sum Wizard addin program can help you create a formula that calculates the total sales amount for one salesperson.

Click a cell in the range of cells.

On the Formulas tab, in the Solutions group, click Conditional Sum.
If the Conditional Sum command or Solutions tab are not available, then you need to load the Conditional Sum Wizard addin program.
Install and load the Conditional Sum Wizard addin program

Click the Microsoft Office Button , click Excel Options, and then click the Addins category.

Select Excel Addins in the Manage list box, and then click Go.

In the AddIns available list, select the Conditional Sum Wizard check box, and then click OK.


Follow the instructions in the wizard.
Add unique values
To do this task, use the SUM, IF, and FREQUENCY functions.
The following example uses the:

FREQUENCY function to identify the unique values. For the first occurrence of a specific value, this function returns a number equal to the number of occurrences of that value. For each occurrence of that same value after the first, this function returns a 0 (zero).

IF function to assign a value of 1 to each true condition.

The SUM function to add the unique values.
Tip To see a function evaluated step by step, select the cell containing the formula, and then on the Formulas tab, in the Formula Auditing group, click Evaluate Formula.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example

Create a blank workbook or worksheet.

Select the example in the Help topic.
Note Do not select the row or column headers.Selecting an example from Help

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), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

