Returns the sum of all numbers in a certain range of cells.
Syntax
SUM(number1,number2, ...)
Number1,Number2, ... are 1 to 255 parameters that need to be summed.
Description
• Numbers, logical values, and numeric text expressions typed directly into the parameter table will be evaluated.
• If the parameter is an array or reference, only The numbers in it will be calculated. Blank cells, logical values, text, or error values in arrays or references are ignored.
• If the parameter is an incorrect value or cannot be Converting text to numbers will result in an error.
SUMThe function is a summation function that can calculate the sum of cells or ranges of cells. Sum.
Calculate the sum of individual cells
▪Using this form as an example, if we want to calculate the score of Chinese, mathematics, and English and.
Click the "Formulas" tab- "Insert function" button and find the SUMfunction.
Enter value1"< /span>B2, in "value2" EnterB5 in "Value3"InputB8.
Click OK to calculate the sum of the scores in Chinese, Mathematics, and English.
CalculateMultiple cell ranges span>and
▪Take this table as an example, if we want to calculateXiaohong and Xiaoli's6Total monthly sales.
Click the "Formula" tab-"Insert Function" button and find SUMFunction.
Enter value1"< /span>B2:G2, in "value2"InputB3:G3.
Click OK to calculate the total monthly sales volume of Xiaohong and Xiaoli6 span>.
When usingSUMfunction to calculate the result< /span>0, what is the reason for this?
▪The sum is 0There are many reasons,The most commonreason isThe cells being summed are in text format.
We can see data1with data span>2Adding, the formula is correct but the result is0.
This is because data1and data< /span>2 is text type, so the calculation is wrong.
At this time, you only need to click the green warning icon in the upper left corner of the cell and click "Convert to Number".
You can combine data1with data< /span>2Convert to numbers for calculation.
▪You can also use the "Sort" function.
Select data1, click "Data "Tab-"Sort" button.
Select "Delimiter" in step1 ", click "Next";
In step2 Do not set a delimiter in "Next";
Set the column data type in step3 For "Normal", click "Finish";
You can combine data1with data< /span>2Convert to regular numbers for calculation, so that you can get the correct result.
评论列表(196条)
测试