+ Reply to Thread
Results 1 to 8 of 8

SUMPRODUCT(SUMIF or other clever solution!

  1. #1
    Registered User
    Join Date
    11-04-2011
    Location
    Kristiansand
    MS-Off Ver
    Excel 2007
    Posts
    10

    Red face SUMPRODUCT(SUMIF or other clever solution!

    Hello Guys!

    What I need is a dynamic list in sheet TCO M2:M44 with unique values from sheet GE G3:G45, no blanks.
    In sheet TCO N2:N44 this will look up the value in the adjacent M row and find this value in sheet GE G3:G45 and then all values in the adjacent B row.
    The values in sheet GE B3:B45 will then be looked up in sheet MCO C:K and return the adjacent qty (1 column to the right) for each result summed up, but only if A column has 2012.
    The end result will be displayed in sheet TCO N2:N44, preferably without helper columns, and no VBA

    Ex: The result for sheet TCO M2 should be 11013302, and N2 should be 0
    The result for sheet TCO M4 should be 11022316, and N4 should be 23

    Workbook.xlsx

    Best Regards
    Torleif

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT(SUMIF or other clever solution!

    If I understood correctly...

    In GE!C3:

    =SUMPRODUCT((MCO!$A$2:$A$24=2012)*(MCO!$C$2:$K$24=B3)*(MCO!$D$2:$L$24))

    copied down

    In TCO!M2:

    =IFERROR(INDEX(GE!$G$3:$G$24,MATCH(1,IF(GE!$G$3:$G$24<>"",IF(ISNA(MATCH(GE!$G$3:$G$24,M$1:M1,0)),1)),0)),"")

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down

    in N2:

    =IF(M2="","",SUMIF(GE!$B$3:$B$27,M2,GE!$C$3:$C$27))

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-04-2011
    Location
    Kristiansand
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: SUMPRODUCT(SUMIF or other clever solution!

    Great work NBVC!

    I changed TCO! N2 to:

    =IF(M2="","",SUMIF(GE!$G$3:$G$27,M2,GE!$C$3:$C$27))

    And now i get the correct values
    Is there anyway to ship the "helper column" GE!C:C ?

    BR
    Torleif

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT(SUMIF or other clever solution!

    Yes, try in N2:

    =IF($M2="","",SUMPRODUCT((MCO!$A$2:$A$24=N$1)*(MCO!$C$2:$K$24=INDEX(GE!$B$3:$B$27,MATCH($M2,GE!$G$3:$G$27,0)))*(MCO!$D$2:$L$24)))

    copied to next column for 2013 and down...

  5. #5
    Registered User
    Join Date
    11-04-2011
    Location
    Kristiansand
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: SUMPRODUCT(SUMIF or other clever solution!

    Amazing NBVC!

    Works perfectly, thanks alot!

    BR
    Torleif

  6. #6
    Registered User
    Join Date
    11-04-2011
    Location
    Kristiansand
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: SUMPRODUCT(SUMIF or other clever solution!

    Hello again!

    My formula has now evolved to this:

    Please Login or Register  to view this content.
    My problem is that it does not include duplicates in Gears!$H$3:$H$50.
    Is there any solution to this? I have been trying to implement this formula:
    Please Login or Register  to view this content.
    , but with no luck.
    There are now up to 5 duplicates in Gears!$H$3:$H$50, this could increase.

    Best Regards
    Torleif

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT(SUMIF or other clever solution!

    Sorry for the late reply... been busy at work....

    Hope it's not too late.. but you can try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by NBVC; 11-05-2012 at 12:33 PM.

  8. #8
    Registered User
    Join Date
    11-04-2011
    Location
    Kristiansand
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: SUMPRODUCT(SUMIF or other clever solution!

    Thanks alot NBVC!

    A small adjustment and it works perfectly! :D

    Best Regards
    Torleif

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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