+ Reply to Thread
Results 1 to 8 of 8

Using SUMIFs to sum muliple criteria from ranges

  1. #1
    Registered User
    Join Date
    02-19-2015
    Location
    London
    MS-Off Ver
    not sure
    Posts
    4

    Using SUMIFs to sum muliple criteria from ranges

    Hi therre

    I’m using SUMIFs to sum data from a list of timesheet details based on

    -project code: '2014 replicon data store’!A:A (range),$B6 (code to include)
    -staff category: '2014 replicon data store’!E:E (range),$F6 (category to include)
    -returning total number of hours meeting the above conditions: '2014 replicon data store’!D:D (range)

    This is the formula that returns the above:

    =(sumifs('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B6,'2014 replicon data store'!E:E,$F6)

    However, as some of our projects have more than one code, I’d like to expand this formula so that if I add more project codes below B6, it also includes these in the search.

    A manual way to do this across codes in B6 and B7 is:

    =(sumifs('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B6,'2014 replicon data store'!E:E,$F6))+(sumifs('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B7,'2014 replicon data store'!E:E,$F6))

    However, it will be prohibitively laborious to have to roll this out across all my formulas, as I would like the option to count up to 10 different project codes. So I’m looking for something like:

    =(sumifs('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B6:$B16,'2014 replicon data store'!E:E,$F6)

    …where I turn $B6 to $B6:$B16 - but this doesn’t work. Is there another way to modify this formula so that it will look for more than one project code in the SUMIF?

    Many thanks from a newbie!

    Tom

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Using SUMIFs to sum muliple criteria from ranges

    Not in a single cell. In a cell on row 6, use your existing formula, with one change (bolded)

    =(sumifs('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B6,'2014 replicon data store'!E:E,$F$6)

    and copy down to row 16, then sum those cells.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Using SUMIFs to sum muliple criteria from ranges

    Try

    =SUMPRODUCT(sumifs('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B6:$B16,'2014 replicon data store'!E:E,$F6)

  4. #4
    Registered User
    Join Date
    02-19-2015
    Location
    London
    MS-Off Ver
    not sure
    Posts
    4

    Re: Using SUMIFs to sum muliple criteria from ranges

    Thank you - that doesn't seem to have any effect...(it's not pulling in data from the second project code...)

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Using SUMIFs to sum muliple criteria from ranges

    Can you post a sample book?

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Registered User
    Join Date
    02-19-2015
    Location
    London
    MS-Off Ver
    not sure
    Posts
    4

    Re: Using SUMIFs to sum muliple criteria from ranges

    Hi there

    Thank you. I've uploaded an example workbook (I think). Thanks for your help!

    Tom
    Attached Files Attached Files

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Using SUMIFs to sum muliple criteria from ranges

    You haven't entered a value into the 2nd (or beyond) project code.
    You only have a value in B6, nothing in B7 - B16

    In X6 you have
    =SUMPRODUCT(SUMIFS('2014 replicon data store'!D:D,'2014 replicon data store'!A:A,$B6:$B16,'2014 replicon data store'!E:E,$F6))

    Once I enter say "Test2" into B7, the formula in X6 updates from 3 to 7

  8. #8
    Registered User
    Join Date
    02-19-2015
    Location
    London
    MS-Off Ver
    not sure
    Posts
    4

    Re: Using SUMIFs to sum muliple criteria from ranges

    Ah yes- thanks.

    I'm actually working in Google Spreadsheets, which doesn't seem to interpret the formula in the same way. I exported for this example and forgot to change the formula back from what you'd suggested - or to test whether it worked in Excel!

    It does indeed already do exactly what I wanted it to in the example I provided....I suppose it's sacrilege to ask if there's any reason why it wouldn't work in GS?

    Tom

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SUMIFS with multiple SUM and Criteria Ranges
    By Xerxies in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-20-2013, 09:01 AM
  2. SUMIFS or SUMPRODUCT with multiple criteria including date ranges
    By baxcat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2013, 09:40 AM
  3. Sumifs with criteria that has different size ranges?
    By rhyan66 in forum Excel General
    Replies: 7
    Last Post: 05-20-2011, 01:49 PM
  4. Replies: 4
    Last Post: 03-11-2010, 12:05 PM
  5. VBA to find Muliple criteria
    By Anil2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2009, 02:36 PM

Tags for this Thread

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