+ Reply to Thread
Results 1 to 12 of 12

Alternative to an if sumproduct formula

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Alternative to an if sumproduct formula

    I have the following formula in Cells G69:G439.

    =IF($D$53="Service Code",SUMPRODUCT(($D$52='Actuals Input'!$AG$4:$AG$27885)*('Actuals Input'!$I$4:$I$27885>700000)*('Actuals Input'!$L$4:$L$27885<>"HI1")*($F69='Actuals Input'!$X$4:$X$27885)*('Actuals Input'!$C$4:$C$27885)),SUMPRODUCT(($D$52='Actuals Input'!$AG$4:$AG$27885)*('Actuals Input'!$I$4:$I$27885>700000)*('Actuals Input'!$L$4:$L$27885<>"HI1")*($F69='Actuals Input'!$V$4:$V$27885)*('Actuals Input'!$C$4:$C$27885)))

    I would like to replace this formula with something more efficient and faster at calculating.

    Can anyone please help?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Alternative to an if sumproduct formula

    Since you have XL2007 you can use COUNTIFS formula that will be faster.

  3. #3
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2010
    Posts
    179

    Re: Alternative to an if sumproduct formula

    Hi Trax,

    Seeing as you are using ranges, you could use the SUMIFS or COUNTIFS formulae? I believe these are quicker than sumproduct as sumproduct works with arrays.
    Did I help? Click *- add to my rep.

  4. #4
    Registered User
    Join Date
    10-17-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Alternative to an if sumproduct formula

    Brumbot/Zbor,

    Many thanks for your swift response.

    I have already tried using SUMIFS, but it did not work. It may be that I did something wrong, so will try again.

    Trax

  5. #5
    Registered User
    Join Date
    10-17-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Alternative to an if sumproduct formula

    Having re-tried SUMIFS, I am getting 'The formula you typed contains an error'. I have tried various different ways, but don't ssem to get anywhere.

    =IF($D$53="Service Code",SUMIFS('Actuals Input'!$C$4:$C$9886,$D$52,'Actuals Input'!$AG$4:$AG$9886,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",$F$69,'Actuals Input'!$X$4:$X$9886)),SUMIFS('Actuals Input'!$C$4:$C$9886,$D$53,"Service Code",$D$52,'Actuals Input'!$AG$4:$AG$9886,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",$F$69,'Actuals Input'!$V$4:$V$9886)))

    What am I doing wrong?

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Alternative to an if sumproduct formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Lots of things.. check did I manage to fix it.

  7. #7
    Registered User
    Join Date
    10-17-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Alternative to an if sumproduct formula

    Zbor,

    It still gives the error message!

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Alternative to an if sumproduct formula

    Just try to follow syntax:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    oh, yes, keep you ranges same:

    'Actuals Input'!$C$4:$C$9886 vs. 'Actuals Input'!$AG$4:$AG$27885

    they all must be same size!

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-17-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Alternative to an if sumproduct formula

    I have gone through the setps, which independently seem to work fine. When I put them together, it tells me that there are too few arguments.

    =IF($D53="Service Code",SUMIFS('Actuals Input'!$C$4:$C$9886,'Actuals Input'!$AG$4:$AG$9886,$D$52,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",'Actuals Input'!$X$4:$X$9886,$F69)),SUMIFS('Actuals Input'!$AG$4:$AG$9886,$D$52,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",'Actuals Input'!$V$4:$V$9886,$F69))

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Alternative to an if sumproduct formula

    I think there is one extra bracket:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-17-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Alternative to an if sumproduct formula

    Zbor,

    Tried it with two brackets at the end, it still gives the same message 'You have entered too few arguments'.

    Have just noticed that I need the sum range in the second part of the SUMIFS formula - it now works fine.

    =IF($D$53="Service Code",SUMIFS('Actuals Input'!$C$4:$C$9886,'Actuals Input'!$AG$4:$AG$9886,$D$52,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",'Actuals Input'!$X$4:$X$9886,$F69),SUMIFS('Actuals Input'!C4:$C$9886,'Actuals Input'!$AG$4:$AG$9886,$D$52,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",'Actuals Input'!$V$4:$V$9886,$F69))

    Many thanks for your patience and help with this.
    Last edited by Trax; 05-29-2013 at 05:20 AM.

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Alternative to an if sumproduct formula

    There should be 2 at the end. YOu have one extra in the middle (try mine solution above):

    =IF($D53="Service Code",SUMIFS('Actuals Input'!$C$4:$C$9886,'Actuals Input'!$AG$4:$AG$9886,$D$52,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",'Actuals Input'!$X$4:$X$9886,$F69)),SUMIFS('Actuals Input'!$AG$4:$AG$9886,$D$52,'Actuals Input'!$I$4:$I$9886,">700000",'Actuals Input'!$L$4:$L$9886,"<>HI1",'Actuals Input'!$V$4:$V$9886,$F69))

+ 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