Wauvel

Excel like a finance pro.

← The library

Database function

DSUM

Adds values in a column of a table that match a criteria range.

Rarely usedDifficulty 1350 · AdvancedUsage rank #326 of 520
Practice · 2 questions →

When to use it

Sums a column of a table for rows that match a criteria range. The criteria range is a small table with column headers and one or more rows of conditions.

The shape of it

Syntax
=DSUM(database, field, criteria)

Worked examples

  • One condition

    =DSUM(A1:E11,"Revenue",H1:H2) 500

    H1 is "Region" and H2 is "West": the three West rows add to 500.

  • OR conditions

    =DSUM(A1:E11,5,H1:H3) 1,100

    Two rows under Region (West, East) are ORed. Column 5 is Revenue.

  • AND conditions

    =DSUM(A1:E11,"Revenue",H1:I2) 400

    Region West and Units >2 in the same row are ANDed.

Worth knowing

  • Criteria headers must match the table headers exactly.
  • Conditions like ">100" go in the criteria cell as text.
  • SUMIFS is simpler for AND-only conditions; DSUM wins for OR across columns.

Where it goes wrong

  • Returns 0 when a criteria header is misspelled.
  • #VALUE! when the field is not found.

Related

Learn the moves here — or let Wauvel run them on your numbers.

Meet your AI CFO →

One CFO-grade Excel tip a week

A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.