+ Reply to Thread
Results 1 to 13 of 13

Formula for counting values across a range using multiple criteria across multiple sheets

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Formula for counting values across a range using multiple criteria across multiple sheets

    I have saved this on a 2010 workbook as I am at home but this will be used on a 2003 workbook


    I have several projects on one spreadsheet which multiple users will be working and I could do with some help trying to create a summary sheet of the work carried out.

    Each user is expected to carry out a task on each row of the data held in each worksheet (research, call, update etc) and each task (Option 1-5) is assigned a value. Each user is expected to meet a certain level of points per day to calculate productivity.

    I am looking for a sumproduct along the lines of the summary sheet attached but mine just takes one sheet into consideration and I need one for all sheets.
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Hi,

    Will be the layout of each sheet to be considered be identical?

    Regards
    Click * below if this answer helped

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

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Formula for counting values across a range using multiple criteria across multiple she

    There will be varying amounts of rows in each spreadsheet but columns are all formulaic

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula for counting values across a range using multiple criteria across multiple she

    On Sheet1 in column C you have the header "Select" but the range below is empty.

    What is supposed to go there? The options?

    How many sheets are there? What are the REAL sheet names?

    It looks like you're going to need/use a lot of these formulas. The formula to do this is very complex and extremely inefficient. This may impact the performance of your file.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Hi,

    Go to Name Manager and define a new name, Sheets say, as:

    ={"Sheet2","Sheet3"}

    (Or whatever the relevant tab names in your actual set-up are.)

    Exit Name Manager.

    The formula in D8 of your summary table is then:

    =SUMPRODUCT(SUMIFS(INDIRECT("'"&Sheets&"'!$I4:$I1000"),INDIRECT("'"&Sheets&"'!$E4:$E1000"),Sheet1!$B8,INDIRECT("'"&Sheets&"'!$F4:$F1000"),Sheet1!D$7))

    Copy down and across as required.

    Obviously amend the end range reference (I used 1000) as necessary.

    Regards

  6. #6
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Quote Originally Posted by Tony Valko View Post
    On Sheet1 in column C you have the header "Select" but the range below is empty.

    What is supposed to go there? The options?

    How many sheets are there? What are the REAL sheet names?

    It looks like you're going to need/use a lot of these formulas. The formula to do this is very complex and extremely inefficient. This may impact the performance of your file.
    There are 7 sheets in total (not including summary sheet).
    The second Select... is part of the dates defined range for the drop downs, it can be ignored as it is not part of the summary counts.

    I could do a sumproduct+sumproduct for each sheet but that would be far too many calculations and would impact upon file performance which is what I want to avoid.

  7. #7
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Quote Originally Posted by XOR LX View Post
    Hi,

    Go to Name Manager and define a new name, Sheets say, as:

    ={"Sheet2","Sheet3"}

    (Or whatever the relevant tab names in your actual set-up are.)

    Exit Name Manager.

    The formula in D8 of your summary table is then:

    =SUMPRODUCT(SUMIFS(INDIRECT("'"&Sheets&"'!$I4:$I1000"),INDIRECT("'"&Sheets&"'!$E4:$E1000"),Sheet1!$B8,INDIRECT("'"&Sheets&"'!$F4:$F1000"),Sheet1!D$7))

    Copy down and across as required.

    Obviously amend the end range reference (I used 1000) as necessary.

    Regards


    This looks like it could be exactly what I am looking for but what does the INDIRECT part of the formula do??

  8. #8
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Formula for counting values across a range using multiple criteria across multiple she

    I don't think sumifs work on Excel 2003???

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Ah, yes. Apologies. Forgot about the 2003 part. Then you'll need this version:

    =SUMPRODUCT((T(OFFSET(INDIRECT("'"&Sheets&"'!$E4"),ROW($1:$1000),,,))=Sheet1!$B8)*(N(OFFSET(INDIRECT("'"&Sheets&"'!$F4"),ROW($1:$1000),,,))=Sheet1!D$7)*(N(OFFSET(INDIRECT("'"&Sheets&"'!$I4"),ROW($1:$1000),,,))))

    Regards

  10. #10
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Formula for counting values across a range using multiple criteria across multiple she

    The ROW($1:$1000) part of the code ranges cells in "Sheet1" and not on the subsequent pages saved as "Sheets"?

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Sorry - don't understand what you mean. If the data goes beyond row 1004 (starting row of 4 plus my arbitrary 1000) in any of your sheets then adjust the 1000 in the ROW($1:$1000) construction appropriately.

    It is not of huge importance that this number match precisely the maximum row number containing data in all of your tabs; only that it is sufficiently large (though I wouldn't recommend setting it to be unnecessarily large).

    Regards

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Using ROW(...) leaves the formula vulnerable to new row insertions on the sheet that contains the formula.

    If you will never insert new rows then it'll work just fine. If you might insert new rows then you should make it more robust like this...

    ROW(INDIRECT(...))

    However, this is also vulnerable to row insertions in the data ranges.

    So, you're damned if ya do and you're damned if ya don't!

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula for counting values across a range using multiple criteria across multiple she

    Thanks, Tony.

    And yes, I did make the choice between assuming that you would not be inserting rows (I think, in general, that a spreadsheet in which row insertion is a required feature is a poorly-designed spreadsheet) and assuming that you would and therefore offering you a "volatile" solution with INDIRECT.

    However, as Tony says, if you must insist upon having the option of allowing row insertions, then follow his advice and wrap the ROW() constructions in an INDIRECT. I'm sure we'd be happy to show you how if you are not sure.

    Regards

+ 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. [SOLVED] Lookup and sum multiple values based on a single criteria in multiple sheets.
    By paulsanett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 12:18 PM
  2. Sum cell values within the same range in multiple sheets with a criteria applied
    By nikenis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2013, 10:35 AM
  3. [SOLVED] Counting multiple items with multiple criteria from multiple sheets?
    By essee in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-23-2013, 01:56 AM
  4. Counting Cells With Multiple Criteria on Multiple Sheets
    By ericmeiers in forum Excel General
    Replies: 5
    Last Post: 08-04-2012, 10:23 PM
  5. Replies: 8
    Last Post: 07-13-2012, 06:00 AM

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