+ Reply to Thread
Results 1 to 5 of 5

help with =sumif statement

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    help with =sumif statement

    Can you have two conditions in a =sumif statement. Meaning, sum col C if "x" is in col A and "y" is in col B, then and only then sum col C.

    Thanks!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702
    Try SUMPRODUCT

    =SUMPRODUCT((A1:A100="x")*(B1:B100="y"),C1:C100)

    adjust ranges as necessary but you can't use whole columns

  3. #3
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    thank you!

    yes worked beautifully, but needed to put two "--" infront of the ranges for col A and B.

    looked like this:

    =SUMPRODUCT(--(A1:A100="x"),--(B1:B100="y"),C1:C100)

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702
    Quote Originally Posted by Mile029
    worked beautifully, but needed to put two "--" infront of the ranges for col A and B.
    Well, you can certainly do it that way too but the formula I posted would give the same result

  5. #5
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172
    yes yours worked nicely too.

+ 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