DSUM
DSUM calculates the sum of a range of cells in a database that meets specific criteria. It is useful for analyzing structured data sets. The function helps filter and sum data based on defined conditions.
Syntax 🔗
=DSUM(database
, field
, criteria
)
database | The range of cells that make up the database, including headers. Ensure that it has column headings. |
field | The column or field from which you want to sum numeric values. |
criteria | The range of cells containing the criteria for summing the data. Each criterion should be in a separate column and match the database headers. |
criteria | The range of cells containing the criteria for summing the data. Each criterion should be in a separate column and match the database headers. |
About DSUM 🔗
The DSUM function in Excel helps you sum up values in a database that meet specified conditions. You provide the database range, specify the field to sum, and define the criteria for the summation. DSUM then filters the database entries based on your criteria and calculates the total of the corresponding values.
Examples 🔗
Suppose you have a sales database with columns like 'Product', 'Salesperson', and 'Revenue'. You want to calculate the total revenue generated by a specific salesperson. If the database range is from A1 to C1000, and you want to sum the 'Revenue' column where the 'Salesperson' is 'John', the DSUM formula would be: =DSUM(A1:C1000, "Revenue", A1:C1000, "Salesperson", "John")
Consider a student database with columns 'Name', 'Age', 'Gender', and 'Score'. To calculate the total score of female students aged below 25, located in cells A1:D500, the DSUM formula would be: =DSUM(A1:D500, "Score", A1:D500, "Gender", "Female", "Age", "<25")
Notes 🔗
Ensure the criteria range includes headers that match the database column headers. DSUM automatically considers logical AND conditions when you provide multiple criteria. Adjust the formula based on the structure and unique requirements of your database.
Questions 🔗
While the SUM function calculates the total of a given range of cells, DSUM is specifically designed for summing values based on predefined criteria within a database. DSUM offers a more targeted approach to data analysis, allowing users to specify conditions for the summation.
Can DSUM handle multiple criteria for summing data?Yes, DSUM can accommodate multiple criteria for summing data. You simply need to provide the corresponding criteria columns within the criteria range. DSUM automatically applies logical AND conditions when multiple criteria are specified.
Is it necessary for the database range in DSUM to include headers?Yes, it is essential for the database range in DSUM to include headers. The headers help DSUM identify the columns correctly and match them with the criteria, ensuring accurate data extraction and summation.
Related functions 🔗
DAVERAGE
DCOUNT
DCOUNTA
DGET
DMAX
DMIN
DPRODUCT
DSTDEV
DSTDEVP
DSUM
DVAR
DVARP