Database functions

DMIN

Matches all 3 recorded answers

Recorded: 3 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicDMIN
BulgarianDMIN
CzechDMIN
DanishDMIN
GermanDMIN
GreekDMIN
English (Australia)DMIN
English (United Kingdom)DMIN
English (United States)DMIN
SpanishBDMIN
EstonianDMIN
FinnishTMIN
FrenchBDMIN
HebrewDMIN
CroatianDMIN
HungarianAB.MIN
IndonesianDMIN
ItalianDMIN
JapaneseDMIN
KoreanDMIN
LithuanianDMIN
LatvianDMIN
NorwegianDMIN
DutchDBMIN
PolishBD.MIN
Portuguese (Brazil)DMIN
Portuguese (Portugal)BDMÍN
RomanianDMIN
RussianДМИН
SlovakDMIN
SlovenianDMIN
Serbian (Latin)DMIN
SwedishDMIN
ThaiDMIN
TurkishVSEÇMİN işlevi
UkrainianDMIN
VietnameseDMIN
Chinese (Simplified)DMIN
Chinese (Hong Kong)DMIN
Chinese (Traditional)DMIN

Names from Microsoft's support site.

What it does

DMIN(database, field, criteria)

DMIN(database, field, criteria) selects the records of database that satisfy criteria, reads the column named by field, and returns the smallest of the numeric values found there.

With R the set of selected record rows, c the resolved field column, and

V = [ v : v = value of cell (r, c) for r in R, where v is a Number ]

On a column of strictly positive numbers that zero is indistinguishable in kind from a real answer, and it is smaller than every value actually present. DMIN is therefore the member of the family where the empty-selection convention does the most damage if it goes unnoticed.

The selection stage — header matching, AND across a criteria row, OR down the rows, blank criteria cells, and criteria-expression parsing — is identical for all twelve database functions and is explained once in the criteria-range mechanism.

Arguments

Three arguments, all required at the call site; the reference implementation declares an arity of exactly 3.

  • database — the header-plus-records range or array.
  • field — the column selector, as header text or as a 1-based column index within the database range. Required; only DCOUNT and DCOUNTA accept an omitted field.
  • criteria — the header-plus-conditions range or array.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns a Number.

  • No numeric value selected: 0, not an error. See the warning above.
  • Text that looks numeric in the field column is skipped, per the range-scan side of the asymmetry in coercion and lifting.
  • Logicals in the field column are skipped, so FALSE never wins as 0.
  • Ties are invisible: the value is returned, not the record that held it.
  • Arrays: inline array literals resolve to grids and are accepted; DMIN is not a lift kernel.

Errors

ErrorCondition
#VALUE!database or criteria is not a grid or is empty; a database header cell is blank; a criteria header names no database field; field matches no header, or is a non-integer or out-of-range column index
propagatedAn error value in a header cell, a criteria cell, or a scanned field cell surfaces as that error

How to implement

Notes for implementers

  1. The empty-selection zero is a convention. Apply it after the non-numeric skip, and be aware that it is not the identity of the min operation in any useful sense — it is a compatibility answer.
  2. Skip, do not coerce. Admit only cells whose value kind is Number.
  3. Two comparison paths, one function. Criteria matching uses the tolerant, truncation-style comparison lane; the min reduction over the collected values uses ordinary IEEE ordering. Keep them separate.
  4. Numeric criteria comparison is not exact double comparison — see the note in the shared mechanism.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

DMIN · 1 lines · calc-func/src/catalogue/database.rs on GitHub
6 dmin "DMIN" (3, 3) [R "database", V "field", R "criteria"] |s, a, sv| { database(s, a, sv, Kind::Min) }

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.

Alternatives

Relationships

  • DMAX is the mirror member, identical but for the comparison direction.
  • Nearest modern equivalent: MINIFS, with inline conditions instead of a criteria table.
  • Confused with: MIN (no selection stage), SMALL (k-th smallest), and MINA (which counts logicals and text as values).

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents