Counting and Summing Worksheet Cells

Generally, a counting formula returns the number of cells in a specified range that meet certain criteria. A summing formula returns the sum of the values of the cells in a range that meet certain criteria. The range you want counted or summed may or may not consist of a worksheet database.

Table 17-1 lists the Excel worksheet functions that come into play when creating counting and summing formulas. Not all these functions are covered in this chapter. If none of the functions in Table 17-1 can solve your problem, it’s likely that an array formula can come to the rescue.

Table 17-1. Excel’s Counting and Summing Functions
FunctionDescription
COUNTReturns the number of cells that contain a numeric value.
COUNTAReturns the number of nonblank cells.
COUNTBLANKReturns the number of blank cells.
COUNTIFReturns the number of cells that meet a specified criterion.
COUNTIFS[*]Returns the number of cells that meet multiple criteria.
DCOUNTCounts the number of records that meet specified criteria; used with a worksheet database.
DCOUNTACounts the number of nonblank records that meet specified criteria; used with a worksheet database.
DEVSQReturns the sum of squares of deviations of data points from the sample mean; used primarily in statistical formulas.
DSUMReturns the sum of a column of values that meet specified criteria; used with a worksheet database
FREQUENCYCalculates how often values occur within a range of values and returns a vertical array of numbers. Used only in a multicell array formula.
SUBTOTALWhen used with a first argument of 2, 3, 102, or 103, returns a count of cells that comprise a subtotal; when used with a first argument of 9 or 109, returns the sum of cells that comprise a subtotal.
SUMReturns the sum of its arguments.
SUMIFReturns the sum of cells that meet a specified criterion.
SUMIFS[*]Returns the sum of cells that meet multiple criteria.
SUMPRODUCTMultiplies corresponding cells in two or more ranges and returns the sum of those products.
SUMSQReturns the sum of the squares of its arguments; used primarily in statistical formulas.
SUMX2PY2Returns the sum of the sum of squares of corresponding values in two ranges; used primarily in statistical formulas.
SUMXMY2Returns the sum of squares of the differences of corresponding values in two ranges; used primarily in statistical formulas.
SUMX2MY2Returns the sum of the differences of squares of corresponding values in two ranges; used primarily in statistical formulas.

[*] These are new functions, available only in Excel 2007.

Note

If your data is in the form of a table, you can use autofiltering to accomplish many counting and summing operations. Just set the AutoFilter criteria, and the table displays only the rows that match your criteria (the nonqualifying rows in the table are hidden). Then you can select formulas to display counts or sums in the table’s total row. Refer to Chapter 19 for more information on using tables.


Getting a Quick Count or Sum

Excel’s status bar can display useful information about the currently selected cells—no formulas required. Normally, the status bar displays the sum and count of the values in the selected range. You can, however, right-click to bring up a menu with other options. You can choose any or all of the following: Average, Count, Numerical Count, Minimum, Maximum, and Sum.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset