+ Reply to Thread
Results 1 to 8 of 8

Min with sumproduct

Hybrid View

peterkiukas Min with sumproduct 11-25-2007, 05:02 PM
shg Without seeing your data,... 11-25-2007, 05:27 PM
peterkiukas I´m really new to all this,... 11-25-2007, 05:56 PM
shg Maybe =MIN( IF(... 11-25-2007, 06:16 PM
peterkiukas Works perfecty thank you! ... 11-25-2007, 06:51 PM
  1. #1
    Registered User
    Join Date
    11-09-2007
    Posts
    24

    Min with sumproduct

    I´m having a problem figuring this formula out. I have a formula that count how many services we have that are over 20 days old + a few other citeria. Now i´m trying to get the date of the oldest service.

    This is the formula that i use to count the number of old services.

    =SUMPRODUCT((G!$A$2:$A$6000=$B4)*(NOT(G!$I$2:$I$6000="Valmis/Odottaa nouto"))*(NOT(G!$I$2:$I$6000="Valmis, toimitettu"))*(NOT(G!$I$2:$I$6000="Finished/WaitingDeli"))*(Päivämääärät!$C$1-G!$C$2:$C$6000>Päivämääärät!$I$3))

    I just cant figure out how to get the min function in the so that it would work and give me the date for the oldest service. Could someone please help me.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Without seeing your data, it's hard to say. But it will be an array formula having the form,

    =MIN( IF( Cond1 * Cond2 * ... * CondN, Date) )

    The IF function returns False when the conditions are not all satisfied (which the MIN ignores), and the dates of the lines that do meet the conditions.

  3. #3
    Registered User
    Join Date
    11-09-2007
    Posts
    24
    I´m really new to all this, but is this what you ment?

    =MIN( IF((G!$A$2:$A$6000=$B4)*(NOT(G!$I$2:$I$6000="Valmis/Odottaa nouto")*(NOT(G!$I$2:$I$6000="Valmis, toimitettu"))*(NOT(G!$I$2:$I$6000="Finished/WaitingDeli"))*(Päivämääärät!$C$1-G!$C$2:$C$6000>Päivämääärät!$I$3))) )

    i attached a sample of my worksheet.
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Maybe

    =MIN( IF( (G!$A$2:$A$6000=$B4) * (G!$I$2:$I$6000 <> "Valmis/Odottaa nouto") * (G!$I$2:$I$6000 <> "Valmis, toimitettu") * (G!$I$2:$I$6000 <> "Finished/WaitingDeli"), G!$D$2:$D$6000 ) )

    It's an array formula -- you have to confirm it with Ctrl+Shift+Enter, not just Enter. If you do it right, it will be enclosed in curly braces.

    BTW, time for you to learn to use dynamic named ranges. Those huge references will kill performnace, and they make your formulas unreadable.

  5. #5
    Registered User
    Join Date
    11-09-2007
    Posts
    24
    Works perfecty thank you!

    Dynamic named ranges?

    The formulas i use now in my sheet dont use dynamic ranges?
    Would it be better if i changed the formulas that i now have to something like the formula
    that you came up with?

    Still learning by hopefully someday i´ll get there :=)
    Last edited by peterkiukas; 11-25-2007 at 06:54 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    The formulas i use now in my sheet dont use dynamic ranges?
    No, you'd know if they did, because you'd have to have created them.

    Take a look at http://www.ozgrid.com/Excel/DynamicRanges.htm.

+ 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