Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: How can I create a "MaxIF" formula?

  1. #1
    Board Regular
    Join Date
    May 2015
    Posts
    205
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default How can I create a "MaxIF" formula?

    Should be simple, but I'm banging my head against the wall. If I have the below data in cells A1:B9, how do I pull the max B-column value for each A-column category. E.g. I want to ask "Considering ONLY the rows with JAN in the A-column, what's the max value in the B-column?" (So formula would return: 30 for Jan, 5 for Feb, 27 for Mar, and 8 for Apr)

    Jan 1
    Jan 8
    Feb 5
    Mar 13
    Jan 7
    Mar 27
    Feb 1
    Apr 8
    Jan 30

  2. #2
    Board Regular
    Join Date
    May 2015
    Posts
    205
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How can I create a "MaxIF" formula?

    EDIT: blah, shoulda just googled first; apparently lots of solutions, eg MINIF & MAXIF: 5 Ways to Get a Conditional Minimum Value | | Professor Excel

  3. #3
    MrExcel MVP
    Join Date
    May 2002
    Posts
    14,220
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)

    Default Re: How can I create a "MaxIF" formula?

    1) use a pivot table, set to show top n, with n=1

    2) formula of the form:

    max(if(range=value,number_range))

    so something like:

    max(if(a1:a9="Jan",b1:b9))
    ...entered with control + shift + enter, not just enter.
    Two plus two equals five for large values of two.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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