+ Reply to Thread
Results 1 to 5 of 5

SumIf with 2 arguments

Hybrid View

  1. #1
    Registered User
    Join Date
    07-16-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    SumIf with 2 arguments

    I have a spreadsheet with a list of jobs I am resourcing with the following attributes as row headings ....

    Resource Name
    Job Code
    Project Name
    Chargable or Non Chargable
    Hours charged

    And I have the column headings as the date week by week (simple stuff)

    I have used SumIf() to report in another list the total number of hours charged by person simply by having the list of names to check and SumIf() the 'Resource Name' list and then sum'ing the 'Hours Charged' column for if a match is found.

    This works perfectly so now I have a table of time charged by person - woohoo.

    Now I need to split out JUST the Chargable time. So I kinda want to say .... 'if the Resource Name is the same AND the Resource work is listed as Chargable then Sum the Hours Charged .... but SumIf doesn't allow more than one argument in the if .... or does it ?

    Thanks in advance,

    Christopher

    PS> I want the resource's Chargable hours for each day and displayed in the spreadsheet so a pivot table does not work either - I need a formula ?

    Help !

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    re: SumIf with 2 arguments

    Hi Christopher
    Have a search on SUMPRODUCT on the board
    You'll get lots of answers

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: SumIf with 2 arguments

    i dont think its that simple if all the jobs are down one column say a
    with info in b , you'd have to offset the sum product.
    like
    =SUMPRODUCT(--(B1:B17="martin"),--(B4:B20="chargeable"),(B5:B21))
    see attached
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-16-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: SumIf with 2 arguments

    This is EXCELLENT thanks for your quick and great help - it works

    I have copied and pasted the formula and edited the references to my cell and it works - thanks.

    BTW what is the deal with the '--' before the brackets, there is nothing in the Excel help on using "Sumproduct" in this way - more for actually products than summing

    any help ?

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: SumIf with 2 arguments

    They are a method of coercion, which is a way to convert a Boolean value (TRUE or FALSE) to its numeric equivalent (1 or 0). There are several ways to accomplish it, (adding a zero, or multiplying by 1 as examples). One of the, if not the, fastest and most efficient ways is to use two negation operators together, which changes the sign twice, resulting in a numeric value.


    I suggest you Google around for SUMPRODUCT and "unary operator" you'll find lots of answers(personally I use the * operator instead of --,)

+ 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