+ Reply to Thread
Results 1 to 10 of 10

Sumifs that includes additional criteria

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Sumifs that includes additional criteria

    I am looking to use the sumifs function to sum the values of the codes between a specific full range, and for a specific period.

    I have simplified this example, but the information comes from an accounts code structure. It is an I&E with an slighly unstructured coding format.

    I have a list of codes column A, a list of values column B, and a list of periods column C.

    A B C
    1 50 5
    2 150 8
    3 200 8
    4 150 6
    5 149 8
    6 132 7

    I want to add up all of column B, between the range 2 to 5, for a specific period (say 8).

    I am using =SUMIFS(B1:B6,A1:A6,">"&D1,A1:A6,"<"&E1) to sum A depending on the B range, but wondered if I could add an additional criteria (period) column C. It would be alot easier for the users of the spreadsheet if this was possible.

    Hope this makes sense.

    Thanks

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumifs that includes additional criteria

    Hi

    What are in D1 & E1?

    Can you upload a small sample workbook?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  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
    44,377

    Re: Sumifs that includes additional criteria

    SUMIFS can have more than two conditions. What's the problem?


    Regards, TMS
    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
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Sumifs that includes additional criteria

    Hopefully I have attached a sample DB file? It should make more sense now.

    I want to sum a range of codes in the I&E workbook (for which I am using a SUMIFS formulas), but I would prefer to only sum the Period 8 data. All of the information being retrieved is in the Actual 2012 workbook.

    Hope this is clearer now.

    Thanks
    Attached Files Attached Files

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

    Re: Sumifs that includes additional criteria

    For period 8 try this version

    =-SUMIFS('Actual 2012'!F:F,'Actual 2012'!A:A,">="&$A15,'Actual 2012'!A:A,"<="&$B15,'Actual 2012'!E:E,8)
    Audere est facere

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumifs that includes additional criteria

    One way, is this.

    =-(SUMIFS('Actual 2012'!F:F,'Actual 2012'!A:A,">="&$A15,'Actual 2012'!A:A,"<="&$B15,'Actual 2012'!E:E,'I&E'!$G$6))

    In I15 and copy down.

  7. #7
    Registered User
    Join Date
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Sumifs that includes additional criteria

    Excellent, Thank you all.

    How would this forumla change if I wanted to sum a specific account code (instead of a from to range), and the period 8?

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumifs that includes additional criteria

    You are welcome.

    My poor English does not let me to understand your new question.....

  9. #9
    Registered User
    Join Date
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Sumifs that includes additional criteria

    Sorry, I should have made it clearer.

    I want to add up the values of one code (say 0500) in period 8 (alternatively add up a number of individual codes) in period 8.

    Sample workbook attached.
    Attached Files Attached Files

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Sumifs that includes additional criteria

    This would sum for Account 500 Period 8

    =SUMIFS('Actual 2012'!F:F,'Actual 2012'!A:A,A15,'Actual 2012'!E:E,$G$6)

    and this would sum for Account 500 & 4500 for Period 8

    =SUM(SUMIFS('Actual 2012'!F:F,'Actual 2012'!A:A,A15,'Actual 2012'!E:E,G6),SUMIFS('Actual 2012'!F:F,'Actual 2012'!A:A,B15,'Actual 2012'!E:E,$G$6))
    Last edited by Cutter; 06-19-2012 at 10:27 AM.

+ 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