Dsum Function in Excel

If you just need to dsum function in excel and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: use =DSUM(database, field, criteria) — the conditions live in a separate criteria RANGE on the sheet, not inside the formula.

On this page8

Syntax

=DSUM(database, field, criteria)

Arguments

Argumentrequired / optionalDescription
databaserequiredThe table INCLUDING its header row.
fieldrequiredWhich column to aggregate — a header name in quotes or a column number.
criteriarequiredA separate range whose headers match the table and whose rows hold the conditions.

Related functions

SUMIFSFILTERGETPIVOTDATA
▤Annotated stepsExcel
1

Copy the table's header row to an empty area to start the criteria range.

2

Under each header, type the condition — a value, or a comparison such as ">1000".

3

Type =DSUM( and select the table INCLUDING its headers.

4

Add the field name in quotes and select the whole criteria range including its headers.

Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

The D-functions — DSUM, DGET, DCOUNT, DAVERAGE, DMAX, DMIN — aggregate a table according to conditions written in a separate criteria range rather than in the formula. That is their distinguishing feature and their remaining advantage: a user can change the conditions by typing in cells, without editing a formula, which suits a controlled report handed to non-technical colleagues. Criteria on the same row combine with AND, on different rows with OR — which SUMIFS cannot express at all. The cost is a criteria range that must be maintained and whose headers must match the table exactly. For most work SUMIFS or FILTER is simpler. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. For “dsum function in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

A table in A1:E500 with headers, and a criteria range in G1:H2 holding "Region" and "West": =DSUM(A1:E500, "Revenue", G1:H2) totals Western revenue and updates the moment someone edits G2. OR logic that SUMIFS cannot do: put "West" and "East" on separate criteria rows. Retrieving a single matching value: =DGET(A1:E500, "Revenue", G1:H2), which errors if more than one row matches. The database functions put the conditions in cells rather than in the formula, which is what makes a report safely editable by someone who should not touch formulas. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. For “dsum function in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Omitting the header row from the database range, which is required and not optional.
  • Criteria headers that do not match the table headers exactly, which silently matches nothing.
  • Using DGET where several rows match, which returns #NUM! — it is strictly single-value.

Frequently asked questions

Why use DSUM instead of SUMIFS?

Because the conditions live in cells a user can edit without touching a formula, and because OR logic across rows is possible, which SUMIFS cannot express.

Why does DGET return #NUM!?

More than one row matches. DGET returns exactly one value or errors.

How do I write OR conditions?

Put them on separate rows of the criteria range. Same row means AND.