=DSUM(database, field, criteria)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
Need more than a single DSUM formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.
database:
The range of cells that contains the data you want to analyze, including headers.
field:
The column label or index number that specifies which column's values you want to sum. This can be a text string (the header name) or a number (the position of the column in the database).
criteria:
The range of cells that contains the conditions you want to apply to the data in the database. This range should include at least one column label and one or more rows of criteria.
The DSUM function in Excel is a powerful tool that allows you to sum values in a database based on specific criteria. It evaluates a database (a range of cells organized in a table format) and sums the values in a specified field (column) that meet the defined criteria.
In simpler terms, the DSUM function helps you calculate totals from a database while applying certain conditions, making it easier to analyze structured data.
Imagine you are managing a product inventory report for a small business, and you have the following data in an Excel spreadsheet:
| Product | Quantity | Category |
|---|---|---|
| Apples | 50 | Fruit |
| Bananas | 30 | Fruit |
| Carrots | 20 | Vegetable |
| Potatoes | 40 | Vegetable |
| Oranges | 25 | Fruit |
You want to find the total quantity of products in the "Fruit" category.
To calculate the total quantity for the Fruit category, you would use the DSUM formula as follows:
=DSUM(A1:C6, "Quantity", E1:F2)When you apply the formula, it sums the quantities for Apples, Bananas, and Oranges, which are all in the Fruit category. The output would be:
| Total Quantity for Fruit |
|---|
| 105 |
Here, the total quantity is calculated as 50 (Apples) + 30 (Bananas) + 25 (Oranges) = 105.
The DSUM function is particularly useful when you need to analyze data from a structured database format based on specific conditions. It allows you to quickly derive insights and make data-driven decisions without manually filtering or sorting your data.
Understanding how to use the DSUM function can significantly enhance your data analysis capabilities in Excel, enabling you to extract meaningful insights from your datasets.
Happy calculating!
You have a database where Column A contains product categories, Column B contains sales amounts, and Column C contains the region where the sales occurred. You can use the DSUM function to calculate the total sales for a specific product category in a specific region by setting up a criteria range. This allows for targeted analysis of sales performance across different categories and regions, facilitating better inventory management and marketing strategies without the need for complex data manipulation.
Beyond the DSUM function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.
Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.
Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.
Browse our complete library of Excel formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.