+ Reply to Thread
Results 1 to 8 of 8

Can I use more complex logical expression for sumif as creteria?

Hybrid View

  1. #1
    Mark Lincoln
    Guest

    Re: Can I use more complex logical expression for sumif as creteri

    That complicates matters some. We have to sum the rows in which either
    criterion is met and subtract the rows where both are met (otherwise
    the latter cases would be counted twice). Either of these work:

    =SUMPRODUCT(--(A3:A10="MA"),F3:F10)+SUMPRODUCT(--(B3:B10>5000),F3:F10)-SUMPRODUCT(--(A3:A10="MA"),--(B3:B10>5000),F3:F10)

    =SUMIF(A3:A10,"MA",F3:F10)+SUMIF(B3:B10,">5000",F3:F10)-SUMPRODUCT(--(A3:A10="MA"),--(B3:B10>5000),F3:F10)


  2. #2
    JE McGimpsey
    Guest

    Re: Can I use more complex logical expression for sumif as creteri

    This is a bit shorter:

    =SUMPRODUCT(--((A3:A10="MA")+(B3:B10>5000)>0),F3:F10)


    In article <1146163561.677247.234460@u72g2000cwu.googlegroups.com>,
    "Mark Lincoln" <mlincoln@earthlink.net> wrote:

    > That complicates matters some. We have to sum the rows in which either
    > criterion is met and subtract the rows where both are met (otherwise
    > the latter cases would be counted twice). Either of these work:
    >
    > =SUMPRODUCT(--(A3:A10="MA"),F3:F10)+SUMPRODUCT(--(B3:B10>5000),F3:F10)-SUMPROD
    > UCT(--(A3:A10="MA"),--(B3:B10>5000),F3:F10)
    >
    > =SUMIF(A3:A10,"MA",F3:F10)+SUMIF(B3:B10,">5000",F3:F10)-SUMPRODUCT(--(A3:A10="
    > MA"),--(B3:B10>5000),F3:F10)


  3. #3
    JE McGimpsey
    Guest

    Re: Can I use more complex logical expression for sumif as creteri

    Oops, didn't see the identical solution in the other subthread...

    In article <jemcgimpsey-5E3D43.17503727042006@msnews.microsoft.com>,
    JE McGimpsey <jemcgimpsey@mvps.org> wrote:

    > This is a bit shorter:
    >
    > =SUMPRODUCT(--((A3:A10="MA")+(B3:B10>5000)>0),F3:F10)
    >


+ 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