DSUM Function: How to Sum with Complex Conditions in Excel
In the basic Excel functions , the DSUM function is one of the most popular functions. This function will calculate the sum of a field or a column to satisfy the conditions you set in the data table. The formula for using the DSUM function as well as the way to calculate the conditional sum of the function is relatively simple and faster than the SUMIF function on Excel . The following article will guide readers on how to use the DSUM function on Excel to calculate the sum of columns with given conditions.
- How to use the SUM function to calculate the sum in Excel
- Instructions for creating interactive charts in Excel with the INDEX function
- How to use Vlookup function in Excel
Formula of DSUM function in Excel
The DSUM function is a function that adds numbers in a field or column in a data list that satisfy specified conditions. The function syntax is =DSUM(database; field; criteria) .
In there:
- Database : is the database range containing the column to be summed and the column to be checked for the condition. The list contains the first row as the column header.
- Field: is a required argument that specifies the name of the column used to sum the data. You can enter the column title in double quotes, or use a number representing the column position in the list without double quotes, or refer to the column title you want to sum.
- Criteria: is a required argument, the range of cells containing the condition you want the DSUM function to check.
User Note:
- Any range can be used for criteria if the range contains at least 1 column label and at least 1 cell below the column heading that will define the conditions for that column.
- Do not place the condition range at the bottom of the list because there will be no place to add more information to the list.
Example of using the DSUM function to calculate conditional sum
We will process the data table as shown below.
Example 1. Calculate the total amount sold of iPhone products
Step 1:
First we create a condition range for the DSUM function to calculate the total amount sold of iPhone products. The condition for the DSUM function is iPhone*.
Note: Use * to represent other characters.
Step 2:
Next, the user enters the DSUM function formula as =DSUM(A6:E13;"Total Amount";C2:C3) .
In there:
- A6:E13 is the database range containing the column to sum and the column containing the condition to check.
- 'Total' is the column heading that will use the value in that column to calculate the total.
- C2:C3 is the condition range containing column headers and 1 condition value.
Press Enter and we will get the exact result as shown.
Or the user can replace the value in Field with a reference to the Total column. The input formula is =DSUM(A6:E13;E6;C2:C3) . The result is the same as when you enter the Total column into the formula.
Example 2. Calculate the total amount of products sold with quantity greater than or equal to 5.
Step 1:
First user will also need to create condition range with column header Sales Quantity and condition value is >=5 as shown below.
Step 2:
We enter the function formula =DSUM(A6:E13;E6;C2:C3) and press Enter.
The total amount will be as shown in the picture.
In general, using the DSUM function in Excel is very simple. You can use the function to calculate the sum of values in columns with simple conditions. With more complex conditions, we can use the SUMIF function.
See also:
- Instructions for using the Index function in Excel
- 3 ways to calculate sum in Excel
- How to print Excel spreadsheet in one page
Good luck!
You should read it
- Basic Excel functions that anyone must know
- How to use COUNTIF function on Excel
- Conditional counting function in Excel
- Instructions on how to use the Dmax function in Excel
- How to use AVERAGEIF function in Excel
- How to use the SUM function to calculate totals in Excel
- How to fix the SUM function doesn't add up in Excel
- How to use Hlookup function on Excel
May be interested
- How to use AVERAGEIF function in Excelaverageif function on excel is a conditional plus average function in the data table, with the given conditions set by the user.
- SUM function in Excel, sum function and examplessum is a basic excel function that allows users to quickly and accurately calculate the sum of columns or cells in an excel spreadsheet. for an overview of the concept, formula and how to use the sum function in excel, readers can refer to our article below. with many illustrative examples from simple to complex, readers can understand and quickly apply this function to practical work.
- How to combine Vlookup function with If function in Excelwhen combining vlookup function with if function in excel, we can set conditions to search for values by column.
- How to use MAXIFS function in Excel 2016maxifs function in excel is a statistical function that returns the largest value based on one or more conditions from the specified cells. maxifs function was introduced in ms excel 2016.
- How to use the SUMIF function in Excel to calculate the sum based on conditionsare you having trouble calculating the sum of values in excel based on conditions? with simple usage, the sumif function will help you calculate accurately.
- How to calculate the total value based on multiple conditions in Excelto calculate conditional sum in excel, it is impossible not to mention the special calculation function that is sumif and sumifs function. software tips will guide how to use conditional sum function. please follow the following article.
- The search function satisfies many conditions in Excel - Usage and examplesthe search function satisfies many conditions in excel - usage and examples. in the process of processing data in excel many times you need to search for data that satisfies many conditions to extract data, so you are looking for a function that satisfies many things.
- DCOUNTA function, how to use the function to count non-empty cells in Exceldcounta functions in excel to count non-empty cells in database fields or lists according to specific conditions.
- How to add computers to Excelto perform complex calculations on excel or even change units, we can install computers on excel.
- How to use the COUNTIFS function in Excelthe countifs function in excel is a useful tool that helps you count the number of cells that satisfy various conditions. when working with large data, this function helps to make quick and accurate statistics. the following article will guide you on how to use countifs and provide specific illustrative examples.