HomeGoogle DocsSpreadsheetDMIN Function in Google Sheets - How to and Criteria Usage Tips

DMIN Function in Google Sheets – How to and Criteria Usage Tips

Published on

Similar to SQL you can communicate with a database table-like array, using the DMIN function in Google Sheets. All database functions in Google Docs Sheets are meant to do so.

Purpose:

The DMIN formula in Sheets can return the minimum value from a database table-like array using a SQL-like query.

You may be unfamiliar with the term database table-like array which I have used above, right?

It’s of course data or you can say records arranged in rows. But, similar to a database table, the first row in the range must contain the labels representing values in each column.

Are you still in a dilemma? I hope the following example can help you.

The following sample data shows the diesel consumption/filling of a few vehicles in date wise. You can see that the first row of this report contains the column labels.

In this and similar data types, you can flawlessly use the database functions including DMIN.

DMIN sample data in Sheets

That means if the labels are not there you can’t use any database functions in such an array. So you must either use MINIFS, MIN, SMALL or MINA to find the min value.

The Syntax of the DMIN Database Function in Google Docs Sheets:

MIN(database, field, criteria)

Arguments:

database – The range containing the data to consider which complies the above-said database table-like array features.

field – The column in the database to find the min value. Use either the column label or the column number.

criteria – The condition to filter the database.

Let me elaborate on how to use the DMIN function in Google Sheets and also the criteria usage tips.

DMIN Formula Examples

Let’s consider the above same sample data. The first column contains the dates of filling the fuel, the second column contains the filled quantities in gallons, and the third column contains the vehicle numbers. See the usage tips of the criteria in this function.

DMIN Function and String Criteria in Sheets

=DMIN(A1:C15,2,{"vehicle_no";"TMP 597"})

The above formula will return the minimum quantity of the fuel filled by the vehicle # “TMP 597”.

The same DMIN formula when using the condition/criterion as a cell reference:

=DMIN(A1:C15,2,E1:E2)
Text criteria use in DMIN function in Google Sheets

The are three types of criteria normally in use. They are text, number, and date. Other than this sometimes you may want to use the comparison operators.

I have explained above how to use the Text criteria in DMIN in Google Sheets. Now let me share you the DMIN formula that contains date as the criteria.

DMIN Function and Date Criteria in Sheets

Formula:

=DMIN(A1:C15,2,{"date";DATE(2018,8,17)})

This formula filters the rows contain the date 17/08/2018 in the first column and then in that filtered data finds the min value in field 2.

See the equivalent to this formula.

=DMIN(A1:C15,2,E1:E2)
Date as criteria in DMIN formula in Sheets

DMIN Function and Number Criteria in Sheets

There is no number column to use as the criteria field in the above sample data. There is only one column that is the field to find the min. That prompted me to consider a second sample data.

Here is a new sample data which is not realistic though. But it will be enough to explain the formula.

=dmin(A1:C6,3,E1:E2)
DMIN function and number criteria

The formula returns the least number of goals conceded by any player in 5 matches. The formula can be coded as below also.

=dmin(A1:C6,3,{"matches";5})

DMIN Formula with Comparison Operators

=dmin(A1:C6,3,{"matches";">"&4})

When you use a comparison operator with the number criteria in DMIN, place that within double quotes and use the ampersand to join it with the number.

If it’s referred to a cell, you can directly type the criteria with the comparison operator as below.

Comparison operator in DMIN

For additional tips and tricks related to the DMIN function please check the following database functions guide related to DSUM – How to Properly Use Criteria in DSUM in Google Sheets [Chart]. You can follow the tips presented in that tutorial in DMIN too.

Before winding up one more important thing! In this tutorial, I haven’t touched the multiple criteria usage part.

I purposefully omitted that realizing it’s already posted in another tutorial related to DMAX. Needless to say, the usage tips are the same in both functions.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

SUMPRODUCT Differences: Excel vs. Google Sheets

The core purpose of the SUMPRODUCT function remains consistent across both Excel and Google...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.