Dget Function in Excel

If you just need to dget 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
ƒxQuick Pivot SummarizerLive
Groups
3

Grand total: 1,250.50

RegionSum
West125.50
East1050
South75

The same thing in your own sheet

Sum · Excel & Sheets

Put your group keys in a column (here starting at E2) and fill the formula down.
Real pivot table: Excel — select your data, Insert → PivotTable, drag the group column to Rows and the value column to Values. Google Sheets — select the data, Insert → Pivot table. · Runs entirely in your browser — your data never leaves this page.
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

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. Treat “dget function in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. 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 turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.

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. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. The short version of “dget function in excel”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.

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.