MrExcel Publishing
Your One Stop for Excel Tips & Solutions

DMIN criteria argument, how to use?


Posted by Andy on September 22, 2001 3:00 PM

I am trying to use the DMIN function to sort a list of values contained in cells. The DMIN function has 3 arguments, the 3rd being a reference to a range of cells containing the criteria for the function.

The function will only consider rows in the database (list of rows) that match the criteria.
I want the insert the following criteria: greater than the value in cell B2. In other words, include this row only if the value in question is greater than the value in cell B2.

If this is possible, how do I refer to the value in a cell in the criteria?

The help files are not very extensive and the examples only show how to do this with a static value (such as >10).

Please reply also to aloftus@uiuc.edu

Thanks in advance.
--
Andy


Posted by Tom Urtis on September 22, 2001 10:44 PM

See if this works for you

Andy,

If I follow you correctly here's a possible solution example.

Say your database range (including headers) is D5:G18.
Say your criteria range (including header)is G20:G21.

Using G23 as your cell reference,
enter the DMIN formula in cell G24:
=DMIN(D5:G18,G23,G20:G21)

and in the actual criteria cell G21 you can enter the formula:
=IF(G20=G23,">"&B2,""), where G20 and G23 are cells containing the header text of the column (field) you are DMINing for.

Now you can enter any number or formula into B2 without the ">", and the DMIN formula will work.

As you request in your post I will also email you this message, along with an attached example so you can tell me if I'm on the right track.

Hope this helps.

Tom Urtis

Posted by Andy on September 23, 2001 3:27 PM

Re: See if this works for you

Tom,
Thanks a bunch for your help. I've got what I need now.
--
Andy