+ Reply to Thread
Results 1 to 5 of 5

Get max value in subset of Column B decided by values in Column A

  1. #1
    Registered User
    Join Date
    12-22-2010
    Location
    Fort Rouge, Canada
    MS-Off Ver
    Excel 2010
    Posts
    37

    Question Get max value in subset of Column B decided by values in Column A

    A B
    Item1 Jul
    Item1 Sep
    Item1 Oct
    Item2 Apr
    Item2 Jun
    Item2 Dec

    e.g.
    How to get the min and max date for Item1?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Get max value in subset of Column B decided by values in Column A

    if they are real dates then these 2 array formulas

    =MAX((A1:A6="item1")*(B1:B6))
    =MIN(IF(A1:A6="item1",B1:B6,""))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    12-22-2010
    Location
    Fort Rouge, Canada
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Get max value in subset of Column B decided by values in Column A

    Thank you

    It works as you wrote it.

    But when I change it to:

    =MAX((A:A="item1")*(B:B))
    =MIN(IF(A:A="item1",B:B,""))

    they both return #VALUE

    I suppose where the data ends in doesn't like the blanks.

    But I have to run this formula against many rows that may grow over time. Any ideas?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Get max value in subset of Column B decided by values in Column A

    that formula doesn't like a:a ,b:b try a1:a10000,b1:b10000

  5. #5
    Registered User
    Join Date
    09-02-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Get max value in subset of Column B decided by values in Column A

    Could try array formulas -

    Please Login or Register  to view this content.

+ 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