A few weeks ago Karine asked me if there was a way she could find the minimum value for a specific product from a large table of data.
For example, if we take this table of data, let’s say we wanted to find the lowest price for Apples.
Excel MIN IF
One way is to use an array formula like this:
Entered with CTRL+SHIFT+ENTER as this is an array formula.
And where F3 contained our criteria; ‘Apples’
Result = $4.00
Excel MAX IF
Alternatively Karine could find the highest sale price by replacing MIN with MAX:
Result = $6.00
DMIN - Another Way to Find MIN IF
Of course many people are wary of array formulas and for that reason I prefer to use simpler alternatives if they’re available.
Introducing Database Function DMIN.
Returns the smallest number in the field (column of records in the database that match the conditions you specify.
– Our whole table including the row headers – A3:B19
– The column heading containing the value – “Price”
– Cells H3 – our column name, and H4 – our criteria
The DMAX function works the same way but instead…wait for it….it finds the maximum:
The only downside to Database functions is the spreadsheet real estate the criteria occupies, but I don’t think this should be an issue since each worksheet has over 1 billion cells.
Thanks for your question Karine.
Suppose I have three columns, one represents the area,other two represent fruit and prices respectively. I would like to apply D MIN and D MAX for area which should give least/highest price and name of the fruit. How it can be done.
Please post this question in our Excel forum and if you can provide a sample file that would help you get a speedy reply.