+ Reply to Thread
Results 1 to 4 of 4

sumif with fixed and variable criteria

  1. #1
    Registered User
    Join Date
    12-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    sumif with fixed and variable criteria

    I need to sum the result of column “three” when a cell in column “one” is “A” and a cell in column two has either “W”,”X”or”Y”. I have tried using Sumif but have been defeated trying to use the “And” and “OR” to select A and either W,XorY. The result should be 3

    Thanks in advance

    Harry.
    Last edited by bufharry; 12-21-2010 at 04:32 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: sumif with fixed and variable criteria

    Welcome to the forum.

    =SUMPRODUCT( (A1:A10="a") * ( (B1:B10="W")+(B1:B10="X")+(B1:B10="Y") ), C1:C10)
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,077

    Re: sumif with fixed and variable criteria

    One way:

    =SUMPRODUCT((A2:A15="A")*(B2:B15={"X","Y","Z"})*(C2:C15))


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    12-20-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Thumbs up Re: sumif with fixed and variable criteria

    Thanks thg and TMShucks have tried both examples and both do the job. Has saved me lots of time and frustration.

+ 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