Some ways to use the SUM function to calculate totals in Excel
Some ways to use the SUM function to calculate totals in Excel: The SUM function is the most basic Excel function used to calculate totals. The SUM function is used very frequently in all cases. Follow the article below to understand how to use the SUM function in Excel.
1. SUM function structure
Function syntax: =SUM(number1,[number2],…)
Where:
- number1: required argument, is the first number you want to add. That number can be 4, a cell reference like B6, or a range like B2:B8.
- number2-255: optional argument, is the second to 255th number you want to add. That number can be 4, a cell reference like B6, or a range like B2:B8.
2. Why you should use the SUM function
The method =1+2 or =A+B – Although you can enter =1+2+3 or =A1+B1+C2 and get the full, accurate result, you should use the SUM function because these methods can lead to errors for some reasons:
- Spelling errors. If you have to enter many elements with a long sequence of numbers into your formula. It will be much easier if you place these values in separate cells, then use the SUM formula. In addition, you can format the values in thecell, making the values much easier to read than when in the formula.
- #VALUE! error due to text reference instead of number. Your formula may be broken if there are any values that are not numbers (text) in the referenced cells, at this point the formula will return #VALUE! error. The SUM function will ignore text values and only provide you with the sum of numerical values.
- #REF! error due to deleting rows or columns. If you delete a row or column, the formula will not update to exclude the deleted row and the formula will return #REF! error, while the SUM function will automatically update.
- The formula will not update references when inserting rows or columns. If you insert a row or column, the formula will not update to include the newly added row, while the SUM function will automatically update (as long as you are within the range referenced in the formula). This is particularly important if you expect your formula to be updated and this does not happen because the formula will give you incomplete results that you may not grasp.
3. How to use the SUM function
For example, if we need to calculate the total revenue for 2017 in the table below, we just need to put the formula:
=SUM(C2:C10)
The result we will get is the total revenue for 2017 as shown in the figure below. In addition, you can also place the cursor at cell C11 and use the shortcut Alt + = to quickly create a formula to sum the cells above it.
You can also sum a range and an individual cell using the formula:
=SUM(C2:C10;D2)
Or calculate the total revenue for both 2017 and 2019 using the formula:
=SUM(C2:C10;E2:E10)
Therefore, this article has guided you on how to use the SUM function to calculate totals in Excel. We hope that this article will be useful to you in your work. Good luck!