SUM

SUM (number1, number2,  ...)

Here are five examples of using the SUM function.

Sheet1

Example1:  =SUM(A2:A5) adds the numbers in the range from A2 to A5.
Example1a: =SUM(SumRange) adds the numbers in the named range "SumRange", which also covers the cells A2 to A5.

Example2: =SUM(C2,C3,C4,C5) adds the numbers in the four cells, C2, C3, C4 and C5.

Example3: =SUM(E2:E4,E5) adds numbers from a mix of a range and a cell.

Sheet2

Example4: =SUM(B33,B32,B31,B30,B29,B28,B27,B26,B25,B24,B23,B22,B21,B20,B19,B18,B17,B16,B15,B14,B13,B12,B11,B10,B9,B8,B7,B6,B5,B4). Shows a SUM formula containing 30 arguments, the maximum number allowed.

Example5: =SUM((D43,D42,D41,D40,D39,D38,D37,D36,D35,D34,D33,D32,D31,D30,D29,D28,D27,D26,D25,D24,D23,D22,D21,D20,D19,D18,D17,D16,D15,D14,D13,D12,D11,D10,D9,D8,D7,D6,D5,D4)). Shows a SUM formula containing 40 arguments. How does this work given that the maximum number of arguments allowed is 30? By putting an extra set of brackets around the arguments, SUM now treats them all as one argument.

   Missing: Microsoft Office Web Components
 
This page requires the Microsoft Office Web Components.

Click here to install Microsoft Office Web Components..

This page also requires Microsoft Internet Explorer 4.01 (SP-1) or higher.

Click here to install the latest Internet Explorer.
 

You need Office Spreadsheet components installed to see the example.

Published: 06-Feb-2004
Last edited: 05-Jun-2005 19:16