Using Math and Trigonometry Functions

The math and trigonometry functions include the SUM() function. This function is probably the most commonly used function in Excel. To enhance the SUM() function, Excel offers the SUMIF() function. Assume that you have a list containing customer sales. To filter the sales for one customer and calculate the sum, use the SUMIF() function as shown in the following example.

The customers are listed in A2:A20, and the sales are listed in B2:B20 (see Figure 2-51). Cell D6 contains the customer whose sales you want to query. The formula in E6 for the sum of the sales is:

=SUMIF(A2:A20,D6,B2:B20)
Filtering values with the SUMIF() function.

Figure 2-51. Filtering ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.