Syntax
=SUM(number1, [number2], ...)Arguments
| Argument | Required | Description |
|---|---|---|
number1 | Required | A number or range to add |
number2 | Optional | More numbers or ranges |
How to use SUM
SUM takes 1 required argument and 1 optional argument, and accepts more values in the same pattern. Type =SUM( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=SUM(3, 2)Result =SUM(A1:A3)Result Data in the sheet
| A | |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
=SUM("5", 15, TRUE)Result Related math functions
- SINHReturns the hyperbolic sine of a number.
- SQRTReturns the square root of a number.
- SQRTPIReturns the square root of a number multiplied by pi.
- SUBTOTALReturns a subtotal (sum, average, count and more) of ranges, skipping other subtotals; codes 101 to 111 also skip hidden rows.
- SUMIFAdds the cells that meet a condition.
- SUMIFSAdds the cells that meet all of several conditions.
- SUMPRODUCTMultiplies matching items of arrays or ranges and returns the sum of those products.
- SUMSQReturns the sum of the squares of the numbers.
- SUMX2MY2Returns the sum of the differences of the squares of matching values in two arrays.