+ Reply to Thread
Results 1 to 7 of 7

max if multiple conditions, ignoring blanks

  1. #1
    Registered User
    Join Date
    05-04-2006
    Posts
    56

    max if multiple conditions, ignoring blanks

    Hi All,
    I'm right on the edge of solving this but cannot understand why one aspect of my sumproduct is being ignored.

    Please Login or Register  to view this content.
    What I want to do is show the maximum Days Pending per company in a list. The column that shows days pending already has a function in it - giving either a number value or ="".

    I've been able to get the function to ignore the blanks in the list, but I'm getting the same value for all 3 Company results. i.e they should be different.
    What have I done wrong?

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: max if multiple conditions, ignoring blanks

    A little data sample might help. Mock up the expected results manually and upload a file that can be used for testing.

  3. #3
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: max if multiple conditions, ignoring blanks

    if i understand you correctly, you may not need SUMPRODUCT, just an Array-MAX. something like this (untested):

    {=max((company=a6)*(status=d4)*days_pending)}

    and since you are trying to find MAX, you may not even need the "(days_pending<>"")" portion...
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  4. #4
    Registered User
    Join Date
    05-04-2006
    Posts
    56

    Re: max if multiple conditions, ignoring blanks

    Hi,
    I've tried tusing MAX as an array but i get #VALUE errors. perhaps because i have ="" as values in the MAX range.

    Attached example. green cells are the output and desired result in column H

    Example v0-1.xls

  5. #5
    Registered User
    Join Date
    05-04-2006
    Posts
    56

    Re: max if multiple conditions, ignoring blanks

    P.S. +1 day to the desired results. It's counting days...

  6. #6
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: max if multiple conditions, ignoring blanks

    This can give you your answers, however, it is because your dates in C are entered in ascending order:
    Please Login or Register  to view this content.
    This occurs because "Pending Age" will always be in descending order. However, in the event where "Pending Age" will not be listed in descending order (meaning that you can find values in lower rows that are higher than values that can be found in the upper rows). Then the formula will not work as it will only give you the first instance where that happens.

    Someone else here may give you a nicer array that may be more reliable. I'm really not good with arrays...
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: max if multiple conditions, ignoring blanks

    The array formula would be:

    =MAX(IF(($D$244:$D$332=A6)*($E$244:$E$332=$D$4),$B$244:$B$332)) confirmed with Ctrl+Shift+Enter

    and drag down

+ 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