+ Reply to Thread
Results 1 to 7 of 7

Can I use two arguments for sumif?

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    Indonesia
    Posts
    4

    Can I use two arguments for sumif?

    Hi,

    Can I use double arguments for sumif function?

    I am trying to sum all the numbers if it satisfies two arguments. Can't get it to work...

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Can I use two arguments for sumif?

    We need to know more details about what you're trying to do.
    Also, please post what you've tried....even if it didn't work.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-22-2008
    Location
    Indonesia
    Posts
    4

    Sumif with multiple criterias

    Hi, I need help in summarizing a data table...
    here is my data, I need to summarize the number of sales by product by each salesman...

    Product Sales Salesman
    101 67 John
    102 84 John
    103 26 John
    101 48 Toni
    105 13 Mike
    108 45 Mike
    109 0 Jane
    101 84 John
    102 0 Jane
    105 26 Jane
    108 78 John
    108 26 John
    102 58 Jane
    101 67 Toni
    106 95 John
    109 0 John
    107 12 Jane
    101 35 John
    102 18 Toni
    103 45 Jane
    104 28 Mike
    105 34 Mike
    102 15 Mike
    101 15 Mike

    here is the format of the result that I want...

    I use sumif function to sum each product sold by each salesman which is sold in different days....but sumif function can't accept two criteria, can it?


    Product John Mike Jane Toni
    101
    102
    103
    104
    105
    106
    107
    108
    109

    Any help will be appreciated...

    Thanks

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    With your second table in F1:J10

    Product John Mike Jane Toni
    101 186 15 0 115
    102 84 15 58 18
    103 26 0 45 0
    104 0 28 0 0
    105 0 47 26 0
    106 95 0 0 0
    107 0 0 12 0
    108 104 45 0 0
    109 0 0 0 0

    G2=SUMPRODUCT(--($A$2:$A$25=$F2)*--($C$2:$C$25=G$1)*--($B$2:$B$25)) copy across to J2 and down to J10
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    12-12-2006
    Posts
    6
    This also helped me !! Thanks buddy !

  6. #6
    Registered User
    Join Date
    12-05-2008
    Location
    htown
    Posts
    1
    This helped me too! Thanks, oldchippy!


  7. #7
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470
    Quote Originally Posted by oldchippy View Post
    Hi,

    With your second table in F1:J10

    Product John Mike Jane Toni
    101 186 15 0 115
    102 84 15 58 18
    103 26 0 45 0
    104 0 28 0 0
    105 0 47 26 0
    106 95 0 0 0
    107 0 0 12 0
    108 104 45 0 0
    109 0 0 0 0

    G2=SUMPRODUCT(--($A$2:$A$25=$F2)*--($C$2:$C$25=G$1)*--($B$2:$B$25)) copy across to J2 and down to J10
    or,

    PHP Code: 
    =SUMPRODUCT(($A$2:$A$25=$F2)*($C$2:$C$25=G$1),$B$2:$B$25
    OR we can use SUMIFS in Excel 2007

    PHP Code: 
    =SUMIFS($B$2:$B$25,$A$2:$A$25,$F2,$C$2:$C$25,G$1
    Syntax extract from help of Microsoft:

    SUMIFS(sum_range,criteria_range1,criteria1,criteria_range2,criteria2…)

    Sum_range is one or more cells to sum, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.

    Criteria_range1, criteria_range2, … are 1 to 127 ranges in which to evaluate the associated criteria.

    Criteria1, criteria2, … are 1 to 127 criteria in the form of a number, expression, cell reference, or text that define which cells will be added. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.
    Last edited by tigertiger; 12-05-2008 at 11:42 PM.

+ 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