Thread: Min If
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Min If

Aaron,

The following array formula will return the minimum value from C3:C13 where
the corresponding entry in B3:B13 is equal to the value in cell C1. If the
value in C1 is not found in B3:B13, the result is #N/A.

=IF(COUNTIF(B3:B13,C1)=0,NA(),MIN(IF(B3:B13=C1,C3: C13,FALSE)))


This is an array formula, so you must press CTRL SHIFT ENTER rather than
just ENTER when you first enter the formula and whenever you edit it later.
If you do this properly, Excel will display the formula in the formula bar
enclosed in curly braces { }. See
http://www.cpearson.com/Excel/ArrayFormulas.aspx for more info about array
formulas.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


"Aaron" wrote in message
...
I am looking for a function that is a lot like SUMIF function but is Min
if.
Returns the min in a range by criteria.
Range, Criteria, and Min range
Any help would be great.
Thanks in advance!

Aaron