11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7: Counting and Summing Techniques 203<br />

Summing all cells in a range<br />

It doesn’t get much simpler than this. The following formula returns the sum of all values in a<br />

range named Data:<br />

=SUM(Data)<br />

The SUM function can take up to 255 arguments. The following formula, for example, returns the<br />

sum of the values in five noncontiguous ranges:<br />

=SUM(A1:A9,C1:C9,E1:E9,G1:G9,I1:I9)<br />

You can use complete rows or columns as an argument for the SUM function. The formula that<br />

follows, for example, returns the sum of all values in column A. If this formula appears in a cell in<br />

column A, it generates a circular reference error.<br />

=SUM(A:A)<br />

The following formula returns the sum of all values on Sheet1. To avoid a circular reference error,<br />

this formula must appear on a sheet other than Sheet1.<br />

=SUM(Sheet1!1:1048576)<br />

The SUM function is very versatile. The arguments can be numerical values, cells, ranges, text<br />

representations of numbers (which are interpreted as values), logical values, array constants, and<br />

even embedded functions. For example, consider the following formula:<br />

=SUM(B1,5,”6”,,SQRT(4),{1,2,3},A1:A5,TRUE)<br />

This formula, which is a perfectly valid formula, contains all the following types of arguments,<br />

listed here in the order of their presentation:<br />

A single cell reference<br />

A literal value<br />

A string that looks like a value<br />

A missing argument<br />

An expression that uses another function<br />

An array constant

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!