You can add numbers as you type them into a cell. For example, type =5+10 in a cell to display the result 15.
Add all numbers in a contiguous row or column
Use AutoSum to do this task.
- Click a cell below the column of numbers or to the right of the row of numbers.
- Click AutoSum on the Standard toolbar, and then press ENTER.
Add numbers that are not in a contiguous row or column
You can use the SUM function to do this task as in the following example.
Example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. 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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
Note The SUM function can include up to 30 cell or range references.
For more information, see the SUM function.
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.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. 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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
The SUMIF function uses the following arguments
Formula with SUMIF function
Range to evaluate: check these cells to determine whether a row meets your criteria.
Criteria: the condition that the cells you evaluate must meet for the row to be included in the sum.
Range to sum: add the numbers in these cells, provided the row satisfies the condition.
For more information, see the SUMIF function.
Add numbers based on multiple conditions
You can use the IF and SUM functions to do this task, as in the following example.
Example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. 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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
Note The formulas in the example must be entered as array formulas. After copying the example to a blank worksheet, select the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the error #VALUE! is returned.
For more information, see the functions SUM and IF functions.
Add numbers based on criteria stored in a separate range
You can use the DSUM function to do this task, as in the following example.
Example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. 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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
The DSUM function uses the following arguments.
Range to evaluate: the list from which you want to sum.
Field: the label of the column to sum.
Criteria: is the range of cells that contains the conditions.
For more information. see the DSUM function.
Add numbers based on multiple conditions with the Conditional Sum Wizard
If you want to summarize values in a list based on specific conditions, you can use the Conditional Sum Wizard. For example, if your list contains sales amounts for different salespeople, the Conditional Sum Wizard add-in program can help you create a formula that calculates the total sales amount for one salesperson.
- Click a cell in the list.
- On the Tools menu, point to Wizard, and then click Conditional Sum.
If the Conditional Sum command is not on the Wizard submenu on the Tools menu, you need to load the Conditional Sum Wizard add-in program.
- On the Tools menu, click Add-Ins.
-
If the add-in you want to use is not listed in the Add-Ins available box, click Browse, and then locate the add-in.
- In the Add-Ins available box, select the check box next to the add-in you want to load, and then click OK.
- If necessary, follow the instructions in the setup program.
- Follow the instructions in the wizard.
Note The formulas created by the Conditional Sum Wizard are array formulas. After you edit these formulas, you must press CTRL+SHIFT+ENTER to lock in the formulas.