+ Reply to Thread
Results 1 to 10 of 10

Sumproduct to count items over multiple sheets

  1. #1
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Sumproduct to count items over multiple sheets

    My formula =SUMPRODUCT(SUMIF(INDIRECT(“‘”&tabs&”‘!E18:E190″),$H8,INDIRECT(“‘”&tabs&”‘!g18:g190″)))

    Works brilliantly for me but i need to amend slightly so that the formula counts the number of items in G18:G190 rather than sums them up. Replacing SUMIF with COUNTIF unfortunately doesnt work.

    Also I need to amend the formula after that to count the number of items that are in I18:I190 (instead of G18:G190) that have the word “Bound” in it.

    Any thoughts?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sumproduct to count items over multiple sheets

    Hi

    Please upload the workbook. Then it will be clearer what 'tabs' refers to.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Sumproduct to count items over multiple sheets

    tabs is a dynamic named entry i created that refers to all of the worksheets in my spreadsheet that I want analysed by the formula. They are all in the format MMM YYYY (not that that helps!)

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sumproduct to count items over multiple sheets

    Hi,

    I'd still like to see the workbook!

  5. #5
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Sumproduct to count items over multiple sheets

    am trying i cant seem to edit my workbook to remove sensitive data without breaking the code!

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

    Re: Sumproduct to count items over multiple sheets

    Based on your formula it looks like G18:G190 contains numeric values so you can simply use a COUNT function like this:

    =COUNT(Sheet1:Sheet10!G18:G190)

    Use the appropriate sheet names.

    Try this for the COUNTIF "Bound":

    =SUMPRODUCT(COUNTIF(INDIRECT("'"&tabs&"'!I18:I190"),"Bound"))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Sumproduct to count items over multiple sheets

    ok

    Please see the "Start" sheet.
    As you can see the formulas in K8 and L8 pick up the right numbers and work really well.
    I need a formula in I8 that returns the (count of) all numbers of entries in the worksheets.
    Another formula is needed in J8 for the count of the entries that have the word "Bound" in range I18:I190 of each sheet.

    Finally I need formulas in I9 to L11 that does all that but with an added condition of meeting the criteria in Colomn H which features in range B18:B190 of every sheet.

    Phew! hope that can be followed, I can hardly follow it!
    Attached Files Attached Files

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

    Re: Sumproduct to count items over multiple sheets

    Your file is too big so I'm going to pass on this one.

  9. #9
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Sumproduct to count items over multiple sheets

    Why does this formula not work???? (i solved the count ones)

    =SUMPRODUCT(SUMIFS(INDIRECT("'"&tabs&"'!E18:E190"),$H10,INDIRECT("'"&tabs&"'!B18:B190"),$H11,INDIRECT("'"&tabs&"'!g18:g190")))

    Get a value error.

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

    Re: Sumproduct to count items over multiple sheets

    The syntax for SUMIFS is:

    SUMIFS(sum_range,criteria_range1,criteria1,
    criteria_range2,criteria2,etc.,etc.)

    In your formula you have the sum_range as the last argument.

+ 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