+ Reply to Thread
Results 1 to 7 of 7

Problems using the SUMPRODUCT function

  1. #1
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Problems using the SUMPRODUCT function

    I was reading this thread

    http://www.excelforum.com/excel-form...our-block.html

    where FDibbins used SUMIF to solve the OP's problem.

    Curious to see if this was solvable using SUMPRODUCT I had a go at it but the result was rather disappointing. Two results correspond with what is expected and at least three results are wrong.

    Unable to see what the problem is I hope some forum member may solve this.

    Alf
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Problems using the SUMPRODUCT function

    At first glance..shouldn't formula in I25 be

    Please Login or Register  to view this content.
    copied down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Problems using the SUMPRODUCT function

    Hi Alf

    =SUMPRODUCT(($C$2:$C$8=C25)*($D$2:$D$8>=D25)*($D$2:$D$8<=E25)*($F$2:$F$8))

    Looks to work for me.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Problems using the SUMPRODUCT function

    Hi Ace_XL and Fotis

    Yes of course I should be checking the D column for both values!

    Thanks to both of you.


    Alf

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Problems using the SUMPRODUCT function

    @ Alf

    FDibbins, was correct using the SUMIFS. The OP uploaded a xlsx file! So why not use the SUMIFS. There are to many people on here suggesting that they use the SUMPRODUCT when the OP's have Excel 2007> and probably confusing the matter.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Problems using the SUMPRODUCT function

    Hi Kevin

    FDibbins, was correct using the SUMIFS.
    To me it was not a question of right or wrong rather testing an alternative method to solve a specific problem.

    But since a part of my work is based on Excel 2003 I prefer choosing solutions that works in both environment i.e. Excel 2003 and 2007.

    Alf

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Problems using the SUMPRODUCT function

    You are welcome Alf. Thanks for the reb*.

    I'd like also to say this.

    I have seen you Kevin in many threads to insist that if someone is using Excel >2003, is wrong to use SUMPRODUCT and need to use SUMIFS or COUNTIFS.

    I agree that is better to use these(are more fasters than SUMPRODUCT), BUT there are some cases(like this that Alf mentioned and also some mores) that SUMPRODUCT helps more.

    And of course in any case no one can says that SUMPRODUCT using is wrong!

+ 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