+ Reply to Thread
Results 1 to 19 of 19

Countifs total

  1. #1
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Countifs total

    Hi
    I would need some help with the count function on the attached sample. I need to count on worksheet2 tab, the number of tickets opened by john and mike based on the input in column J which I have highlighted in green. The count would have to also by seperated by site which is in column A.

    I have the below formula which I just need help on the missing function to count by site, tickets opened by john and mike in cell C3 and to amend the same formula to count the tickets not opened by john and mike in cell C4

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Shamz41; 07-09-2017 at 02:51 AM. Reason: Attach spreadsheet

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    You have not attached the workbook.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Countifs total

    I think you forgot to attach the file?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Countifs total

    looking again, have you tried to just include the extra criteria in the countifs?

  5. #5
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Countifs total

    Hmm have reattached the file.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    Try this in C3:

    =SUM(COUNTIFS(worksheet1!$J:$J,{"Mike","John"},worksheet1!$B:$B,C$2,worksheet1!$A:$A,SUBSTITUTE(B$2," ","")))

    and this in C4:

    =SUM(COUNTIFS(worksheet1!$B:$B,C$2,worksheet1!$A:$A,SUBSTITUTE(B$2," ","")))-C3

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Countifs total

    edit: Ali beat me to it

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    Sorry, Ford.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Countifs total

    Not a problem, I was way late anyway lol

  10. #10
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Countifs total

    Hi this worked but I realised that if there is a 0 value in C3, the value in C4 turns negative if there is a count. Is there any way I can fix that.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    How can the count turn negative if you are subtracting zero from it??? Don't understand. However ...

    How about this?

    =MAX(0,SUM(COUNTIFS(worksheet1!$B:$B,C$2,worksheet1!$A:$A,SUBSTITUTE(B$2," ","")))-C3)

    assuming you want the count to stop at zero.
    Last edited by AliGW; 07-09-2017 at 03:32 AM.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    On reflection, maybe this is what you need?

    =ABS(SUM(COUNTIFS(worksheet1!$B:$B,C$2,worksheet1!$A:$A,SUBSTITUTE(B$2," ","")))-C3)

  13. #13
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Countifs total

    That worked perfectly. Thank you.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    You're welcome - was it the second one that worked?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  15. #15
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Countifs total

    Actually both formulas worked. Thank you. I've marked the thread as solved.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    Thanks for clarifying. Glad to have helped!

  17. #17
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Countifs total

    Corrected: all solved apparently!

  18. #18
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Countifs total

    Hi Sry another road block. On my actual spreadsheet The reference value is located in another external file. So when i closed the file the formulas turned into error value #value. How would I amend the formula?

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,876

    Re: Countifs total

    You will need to keep the other file open. However, this really is a separate issue: the original query, as posed, has been solved here, so you should mark it as such and start a new thread for the new issue, which is related to the use of an external file.

+ 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] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  2. How can I run CountIfs + CountIfs without double counting?
    By hiitsjessie in forum Excel General
    Replies: 1
    Last Post: 02-06-2017, 04:49 PM
  3. [SOLVED] countifs to find the total count between this year and last year for series of data
    By maher2014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2016, 02:39 AM
  4. [SOLVED] Combining COUNTIFs with SUM IF FREQUENCY MATCH to work out a total
    By acillatem in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-27-2013, 03:36 AM
  5. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  6. Replies: 5
    Last Post: 09-22-2012, 09:53 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 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