Contact

DMAX in Google Sheets: Find the Largest Eligible Shipment

Database Intermediate Google Sheets

Find the maximum shipment weight with DMAX in Google Sheets using route, release and weight-band criteria, with auditable selected rows.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: DMAX returns the largest value in a chosen column after filtering a header-based table. In the worked dataset below, =DMAX(A1:D7,"Weight",H1:H2) returns 900 using the first criteria setup.

Verification: These are documentation-based expectations and independently calculated examples, not results observed in Google Sheets. No native test or application screenshot is available.

When to use DMAX

A dispatcher is comparing shipment weights in kilograms. The largest weight in the register is not necessarily eligible for dispatch; the criteria table determines the eligible population first. The criteria cells stay visible beside the report so another person can inspect which records were intended to contribute.

Syntax and arguments

=DMAX(database, field, criteria)
  • database: the complete rectangular range, including its field headers.
  • field: the header of the column to aggregate, or its one-based position inside that range.
  • criteria: a separate range with field headers and one or more rows of tests.

All examples explicitly supply all three arguments. Google’s database specification establishes the header grid: conditions on one row combine with AND; alternative rows combine with OR. Despite the phrase “SQL-like” in some help descriptions, pass a criteria range rather than a SQL statement.

Set up the practice sheet

Use a blank sheet. Enter the following original practice data in A1:D7, Copy only the four field columns; the leftmost Row column is a worksheet-row annotation, not data to enter. The numbered row 1 supplies A1:D1. The table heading above it repeats the field names only for readability; do not enter that display heading as an additional row. Enter numbers as numbers, without units appended. Keep the criteria and result outside this database range.

Row Load Route Release Weight
1 Load Route Release Weight
2 L1 Coast Yes 420
3 L2 Coast No 900
4 L3 Inland Yes 650
5 L4 Coast Yes 580
6 L5 Inland No 1100
7 L6 Hill Yes 580

Use F2 for the result. The field argument will be "Weight", which selects column D. The equivalent index is 4, measured from A within A1:D7. Criteria may test other columns without changing which field supplies the result.

First calculation

Clear H1:J4 before each setup so old criteria do not remain. Enter this grid, beginning at H1:

Cell row H
1 Route
2 Coast

Enter =DMAX(A1:D7,"Weight",H1:H2) in F2. Expected result: 900.

Matched worksheet rows: 2, 3, 5. Their selected Weight entries are 420, 900, 580. Check the explicit field index by replacing the formula with =DMAX(A1:D7,4,H1:H2); the expected result remains 900.

Require both conditions

Clear H1:J4 before each setup so old criteria do not remain. Enter this grid, beginning at H1:

Cell row H I
1 Route Release
2 Coast Yes

Enter =DMAX(A1:D7,"Weight",H1:I2) in F2. Expected result: 580.

Matched worksheet rows: 2, 5. Their selected Weight entries are 420, 580. Both tests are on the same criteria row, so a record must pass both. Moving a test to another row would change the selection logic.

Allow either group

Clear H1:J4 before each setup so old criteria do not remain. Enter this grid, beginning at H1:

Cell row H I
1 Route Release
2 Coast Yes
3 Inland Yes

Enter =DMAX(A1:D7,"Weight",H1:I3) in F2. Expected result: 650.

Matched worksheet rows: 2, 4, 5. Their selected Weight entries are 420, 650, 580. Each criteria row is a complete alternative. A record qualifies when it passes all tests in either row; it need not pass both alternatives.

Find the largest load inside a capacity window

Clear H1:J4 before each setup so old criteria do not remain. Enter this grid, beginning at H1:

Cell row H I J
1 Release Weight Weight
2 Yes >=400 <=600

Enter =DMAX(A1:D7,"Weight",H1:J2) in F2. Expected result: 580.

Matched worksheet rows: 2, 5, 7. Their selected Weight entries are 420, 580, 580. For an equipment trial, select released loads weighing between 400 and 600 kilograms inclusive. Rows 2, 5 and 7 qualify. The maximum is 580, shared by L4 and L6. DMAX returns the weight only; it does not identify a winning load or break ties. Keep the qualifying row list beside the summary when dispatchers must choose a specific load. Repeating a field header lets its lower and upper bounds apply together on the same row.

Troubleshooting and interpretation

The unreleased 1100-kilogram load must not influence the trial result. If 1100 appears, inspect the criteria range before questioning the maximum calculation. A maximum value alone is not a row lookup.

If the result is unexpected, first list the records selected by each criteria row. Then check the aggregation separately. This distinguishes an incorrect filter from incorrect arithmetic.

  • Keep A1:D7 inclusive of the header. Starting at A2 turns the first record into the apparent labels.
  • Copy criteria headers from row 1 rather than inventing display labels. Check that "Weight" names the intended result field.
  • Enter comparison criteria such as >=7 as cell contents, not as a SQL fragment or an extra formula argument.
  • Keep the database range large enough for new records, but do not silently include unrelated totals below the register.
  • If a formula fails to parse, check quotation marks, the leading equals sign, and the argument separator expected by your sheet. The examples use English function names and comma-separated arguments.
  • If the filter matches no rows, inspect the filter before interpreting any output. This guide does not prescribe an error code or default for empty selections.

Compatibility and verification limits

This guide targets Google Sheets as described in the saved official documentation reviewed October 19, 2026. The reviewed sources do not provide a first-supported version or a desktop-style release matrix. No mobile, offline, exported Excel, or other spreadsheet-engine behavior was tested. Recheck the worked records after importing or exporting a workbook.

The examples deliberately avoid wildcard rules, date-text parsing, formulas returning empty text, and errors in the selected field. Those edge cases are not established by the sources reviewed here. Do not borrow another product’s behavior for them. For production reports, test the exact data types and selection boundaries used in your own sheet.

Official references

  • Google Sheets function catalogue: establishes the DMAX signature and aggregate purpose. The individual DMAX detail page was not successfully retrieved; this guide does not claim it was reviewed.
  • Google database functions: field selection, criteria headers, AND/OR logic, repeated headers and unrestricted empty criteria cells.

All datasets, record selections and applications above are original instructional examples.