+ Reply to Thread
Results 1 to 10 of 10

Count with multiple criteria from a closed workbook

  1. #1
    Registered User
    Join Date
    02-25-2014
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    7

    Count with multiple criteria from a closed workbook

    Hi all,

    I am currently using the COUNTIFS formula to get the information I need when the workbook is open but I would like to be able to pull these counts without opening the workbook. Here is the formula that is working correctly while the workbook is open:

    =COUNTIFS([TT_Output_All.xlsx]Sheet1!$C:$C,D$1,[TT_Output_All.xlsx]Sheet1!$F:$F, "2014",[TT_Output_All.xlsx]Sheet1!$I:$I,$A17,[TT_Output_All.xlsx]Sheet1!$L:$L, "production: am owner")


    If someone could please help me convert this formula to an array that doesnt require me to open the workbook to get the counts it would be greatly appreciated.


    Thanks in advance!

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Count with multiple criteria from a closed workbook

    try using the sumproduct instead

    =SUMPRODUCT((range="condition")*(range="condition")*(range="condition"))
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    02-25-2014
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Count with multiple criteria from a closed workbook

    I tried that solution earlier today and it worked when the workbook was open but when I closed it the count changed to "0" (Correct count is 4). Any idea why that might have happened? I will try the SUMPRODUCT formula again and see if I entered it incorrectly earlier.

    Oh and I tried it with and without CTRL+SHIFT+ENTER

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Count with multiple criteria from a closed workbook

    can you post the sumproduct you tried.

  5. #5
    Registered User
    Join Date
    02-25-2014
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Count with multiple criteria from a closed workbook

    =SUMPRODUCT(('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$C:$C=D$1)*('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$F:$F="2014")*('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$I:$I=$A17)*('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$L:$L="production: am owner"))

    (using CTRL+SHIFT+ENTER also)

    Here is the formula that is giving me "0" when the workbook is closed. Does it have something to do with the fact that some of the criteria is text and not numbers?

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Count with multiple criteria from a closed workbook

    just regular "enter"
    the issue i just notice is the range. you cannot use whole column range i.e. C:C in sumproduct. try putting specific range say C1:C1000 then try it again.

    check also the years in column F:F if really text since you used "2014" in your condition.

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

    Re: Count with multiple criteria from a closed workbook

    Quote Originally Posted by vlady View Post
    you cannot use whole column range i.e. C:C in sumproduct.
    You CAN in Excel 2007 and later.

    However, I recommend NOT using the entire columns and using smaller specific ranges.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    02-25-2014
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Count with multiple criteria from a closed workbook

    Updated the Formula but I am still getting 0.

    =SUMPRODUCT(('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$C$1:$C$10000=D$1)*('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$F$1:$F$10000=2014)*('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$I$1:$I$10000=$A17)*('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$L$1:$L$10000="production: am owner"))

  9. #9
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Count with multiple criteria from a closed workbook

    how about
    =SUMPRODUCT(--(range="condition"),--(range="condition"),--(range="condition"))

  10. #10
    Registered User
    Join Date
    02-25-2014
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Count with multiple criteria from a closed workbook

    updated the formula again. Still getting "0"

    =SUMPRODUCT(--('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$C:$C=D$1),--('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$F:$F=2014),--('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$I:$I=$A17),--('Z:\Operations\Reporting\DataWarehouse\Production Quality\[TT_Output_All.xlsx]Sheet1'!$L:$L="production: am owner"))

+ 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. Transfer Data from one workbook to worksheets in a closed workbook by criteria
    By jftapel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-21-2012, 05:23 AM
  2. GetValues from a Closed Workbook with a conditions/criteria
    By cmarenco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2012, 05:37 PM
  3. retrieve object from multiple closed workbook and paste into open workbook.
    By niailmar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2012, 12:31 AM
  4. Replies: 5
    Last Post: 03-13-2012, 06:05 AM
  5. Using SUMPRODUCT to count values in closed workbook
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 02:34 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