+ Reply to Thread
Results 1 to 4 of 4

Sumproduct with OR statement

  1. #1
    Registered User
    Join Date
    05-21-2009
    Location
    Austin, TX
    MS-Off Ver
    Office 2010
    Posts
    10

    Sumproduct with OR statement

    Hi folks,

    I'm trying to get a SUMPRODUCT formula that will use an OR statement in it. What I need to do is sum all the order values where one staff member is involved in @ least one step of the order process.


    zyj2pz.jpg

    So basically, as you can see, Daniel is involved in 3 transactions, but one of them (Oct 7th) he's done both steps. I need to sum all the orders he's involved in but don't want to double count the 7th's order.

    the formula I have so far is this: =SUMPRODUCT((D2:D9)*((C2:C9=A13)+(B2:B9=A13)))

    but this obviously double counts on that date.

    Can anyone please help with ammending the formula to suit my needs?

    Thanks
    Last edited by iLurk; 03-19-2012 at 07:03 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sumproduct with OR statement

    Try this version

    =SUMPRODUCT(D2:D9,((C2:C9=A13)+(B2:B9=A13)>0)+0)
    Audere est facere

  3. #3
    Registered User
    Join Date
    05-21-2009
    Location
    Austin, TX
    MS-Off Ver
    Office 2010
    Posts
    10

    Re: Sumproduct with OR statement

    wow that was quick!


    edit: I sort of understand the other change you made but could you please tell me why you're adding a +0 at the end?


    Thanks spiderman
    Last edited by iLurk; 03-19-2012 at 07:09 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Sumproduct with OR statement

    i'm a little late w/ this reply, but i just found this post useful a few minutes ago.

    the +0 turns an array of true/false into 1/0. could also be done w/ "--" before the parenthesis
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

+ 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