» Modifying a SUMPRODUCT function to Return a Sum Rather than a Count
CATEGORY - Excel Summing
VERSION - All Microsoft Excel Versions
Problem: Columns B & C list the prices and categories of various items sold.
Column A contains the ID of the salesperson who sold each item.
The following formula was created to count the number of "A" category items that were sold by salesperson "1".
=SUMPRODUCT((A2:A9=1)*(B2:C9="A"))
We want to modify the formula so that it calculates the sum of the prices of all items meeting the above criteria.
Solution:
To cause the SUMPRODUCT formula to sum the values from a range instead of counting them, add another argument to the SUMPRODUCT formula that contains the range to sum (cells C2:C9):
=SUMPRODUCT((A2:A9=1)*(B2:B9="A")*C2:C9)
Book Store:
Recommended Books:
- The Intelligent Investor: The Definitive Book On Value Investing, Revised Edition
- VBA for Modelers: Developing Decision Support Systems Using Microsoft« Excel
- Financial Peace: Revisited
- The 22 Immutable Laws of Marketing : Exposed and Explained by the World's Two
- The 11 Immutable Laws of Internet Branding
- Positioning: The Battle for Your Mind
No comments have been submitted.

