+ Reply to Thread
Results 1 to 4 of 4

How to formulate Min Max Function with Criteria?

  1. #1
    Registered User
    Join Date
    05-31-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    88

    How to formulate Min Max Function with Criteria?

    I have 50 items, with 5 random different codes. I need to return the smallest value of each code. I tried combining IF, Vlookup and Min functions, but I just can't get it right.

    I was thinking of sumproduct, but I don't know how to start.

    Attach is my sample file, I have the data tab and the output tab.

    Thank you in advance!
    Attached Files Attached Files
    Last edited by geng; 07-08-2010 at 07:57 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: How to formulate Min Max Function with Criteria?

    Try these array formulae

    =INDEX(Data!A:A,MATCH(1,(MIN(IF(Data!$B$1:$B$50=$A4,Data!$C$1:$C$50))=Data!$C$1:$C$50)*(Data!$B$1:$B$50=$A4),0))

    and

    =INDEX(Data!C:C,MATCH(1,(MIN(IF(Data!$B$1:$B$50=$A4,Data!$C$1:$C$50))=Data!$C$1:$C$50)*(Data!$B$1:$B$50=$A4),0))

  3. #3
    Registered User
    Join Date
    05-31-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: How to formulate Min Max Function with Criteria?

    Hi Bob, it returns #N/A, and when I tried evaluating it shows "false" in this part
    IF(Data!$B$1:$B$50=$A4,Data!$C$1:$C$50))=Data!$C$1:$C$50)*(Data!$B$1:$B$50=$A4)

    Thanks!

  4. #4
    Registered User
    Join Date
    05-31-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: How to formulate Min Max Function with Criteria?

    hey Bob!
    it's okay now, I just forgot to do the CTRL-SHIFT ENTER thing! Stupid me!

    Anyway, Thank you very much again and again and again!!!

    Mwahhhhhh!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1