August 11th in Functions by .

DSUM Function

The DSUM function is used to sum the values in a column or range based on selected criteria.

Owner and site operator for Excelbuddy.com

The DSUM function is used to sum the values in a column or range based on selected criteria.  The general format of the function is:

= DSUM (Range, Field, Criteria)

The example below shows a case where the DSUM function could be useful.  The range that you’re interested in summing is contained in cells A4:E10.  The criteria are in cells A1:E2.  Whatever criteria you are using should have the same names as the columns in your range.  You only need to have values for the criteria which you want to use.  In this example, Order Number is left blank because it will not be used as a criterion.    The field is the column which you want to sum.  It can be either the number of the column in the range or the name of the column.  These examples show a variety of ways to use the DSUM function and the resulting values:

=DSUM(A4:E10,3,B1:B2) => 33

=DSUM(A4:E10,”Quantity”,B1:B2) => 33

=DSUM(A4:E10,5,B1:C2) => 89.25

=DSUM(A4:E10,5,B1:B2) => 106.75

Leave a Reply

Excelbuddy.com Get your excel questions answered in our forum!