+ Reply to Thread
Results 1 to 16 of 16

Listing of data with CountIFS formula

  1. #1
    Forum Contributor
    Join Date
    04-18-2016
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    178

    Red face Listing of data with CountIFS formula

    Hello All,

    I'm using the 'COUNTIFS' formula to obtain the total number of tickets assigned per region. I aim to extract data based on the result of the 'COUNTIFS' function. I have attached a sample Excel sheet indicating the expected outcome. The list should dynamically adjust based on the selected dates (C2 & E2).

    Regards,
    Gem
    Attached Files Attached Files

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    You cannot extract data using COUNTIFS. Try this in H15:

    =FILTER(Data!A2:E113,(Data!B2:B113>=C2)*(Data!B2:B113<=E2)*(Data!D2:D113=C4)*(Data!C2:C113=C5))

    Sort ascending:

    =LET(f,FILTER(Data!A2:E113,(Data!B2:B113>=C2)*(Data!B2:B113<=E2)*(Data!D2:D113=C4)*(Data!C2:C113=C5)),SORTBY(f,INDEX(f,,5),1))
    Attached Files Attached Files
    Last edited by AliGW; 11-01-2023 at 03:34 AM.
    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
    Forum Contributor
    Join Date
    04-18-2016
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    178

    Re: Listing of data with CountIFS formula

    Thank you Ali.. I'm not expecting the list to be done through COUNTIFS.. any suitable formula to extract the data..

    What if I wanted to display only selected columns.. instead of 5 column data I want only 2 columns (Column A & Column B)
    Last edited by AliGW; 11-01-2023 at 03:39 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,029

    Re: Listing of data with CountIFS formula

    With Power Query as an alternative

    Count by Region and Priority 3
    Please Login or Register  to view this content.
    for the Tickets

    Please Login or Register  to view this content.
    Excel 2016 (Windows) 64 bit
    H
    I
    J
    K
    L
    4
    Region Priority Count
    5
    EMEA
    P3
    6
    6
    INDIA
    P3
    4
    7
    NAM
    P3
    1
    8
    SAM
    P3
    2
    9
    APAC
    P3
    2
    10
    11
    12
    Ticket No. Creation date Priority Ticket Type Region
    13
    CR-A1230439
    9/8/2023
    P3 CR INDIA
    14
    CR-A1230282
    9/8/2023
    P3 CR EMEA
    15
    CR-A1230274
    9/8/2023
    P3 CR INDIA
    16
    CR-A1229885
    9/7/2023
    P3 CR EMEA
    17
    CR-A1229715
    9/6/2023
    P3 CR NAM
    18
    CR-A1229652
    9/6/2023
    P3 CR EMEA
    19
    CR-A1229553
    9/6/2023
    P3 CR SAM
    20
    CR-A1229422
    9/6/2023
    P3 CR APAC
    21
    CR-A1229099
    9/5/2023
    P3 CR SAM
    22
    CR-A1228815
    9/4/2023
    P3 CR EMEA
    23
    CR-A1228556
    9/4/2023
    P3 CR INDIA
    24
    CR-A1228442
    9/1/2023
    P3 CR INDIA
    25
    CR-A1228366
    9/1/2023
    P3 CR APAC
    26
    CR-A1228087
    9/1/2023
    P3 CR EMEA
    Sheet: Regions
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    What if I wanted to display only selected columns.. instead of 5 column data I want only 2 columns (Column A & Column B)
    =LET(f,FILTER(Data!A2:E113,(Data!B2:B113>=C2)*(Data!B2:B113<=E2)*(Data!D2:D113=C4)*(Data!C2:C113=C5)),s,SORTBY(f,INDEX(f,,5),1),CHOOSECOLS(s,1,2))

    Your title specifically stated that you wanted to list data with COUNTIFS!!!

    Glad to have helped.

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,029

    Re: Listing of data with CountIFS formula

    Missed that you wanted this to be dynamic. Have updated the Mcode to recognize the dates shown. The updated code is reflected in the attached file. If you change the dates, then click on Refresh All to update the results.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    04-18-2016
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    178

    Re: Listing of data with CountIFS formula

    @AliGW

    Thank you Ali.. Let me check..
    Last edited by AliGW; 11-01-2023 at 03:58 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  8. #8
    Forum Contributor
    Join Date
    04-18-2016
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    178

    Re: Listing of data with CountIFS formula

    @alansidman

    Not working if I change the Priority to P4 or any other priority in C5
    Last edited by AliGW; 11-01-2023 at 03:59 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  9. #9
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    This will deal with no records found:

    =LET(f,FILTER(Data!A2:E113,(Data!B2:B113>=C2)*(Data!B2:B113<=E2)*(Data!D2:D113=C4)*(Data!C2:C113=C5)),s,SORTBY(f,INDEX(f,,5),1),IFERROR(CHOOSECOLS(s,1,2),"No Records Found"))

    Alan's solution requires you to REFRESH the data (which is why I rarely use PQ these days if Excel 365 is on the table).

  10. #10
    Forum Contributor
    Join Date
    04-18-2016
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    178

    Re: Listing of data with CountIFS formula

    Hello Ali,
    Thanks for fine tuning the formula..
    I missed to mention one more requirement.. My Column C4 has data validation drop down to select 'CR' or 'Incident' or Blank. If I select CR then CR related data should be listed.. If I select Blank then both CR & as well Incident data should be listed..
    Like wise for Column C5 (P1 to P5 and blank)

    You response will be highly appreciated..
    Last edited by AliGW; 11-01-2023 at 04:42 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    You have been a member long enough to know that these critical requirements should NOT be forgotten!

    I shall have a nother look, but please STOP quoting unnecessarily!!!
    Last edited by AliGW; 11-01-2023 at 04:47 AM. Reason: Typo fixed.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    Try this:

    =LET(f,FILTER(Data!A2:E113,(Data!B2:B113>=C2)*(Data!B2:B113<=E2)*IF(C4="",1,Data!D2:D113=C4)*IF(C5="",1,Data!C2:C113=C5)),s,SORTBY(f,INDEX(f,,5),1),IFERROR(CHOOSECOLS(s,1,2),"No Records Found"))

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  13. #13
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    Seen, but no response ...

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  14. #14
    Forum Contributor
    Join Date
    04-18-2016
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    178

    Re: Listing of data with CountIFS formula

    Thanks for your help.. It solved my requirement.
    Last edited by AliGW; 11-01-2023 at 11:28 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  15. #15
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,813

    Re: Listing of data with CountIFS formula

    Good to know - thanks.

  16. #16
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,029

    Re: Listing of data with CountIFS formula

    Not working if I change the Priority to P4 or any other priority in C5
    Your original request only indicated variables for dates. See the attached file which has been amended to make the priority a variable also in the parameter query.

    Thanks for the REP.
    Attached Files Attached Files

+ 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. Listing Data from a formula into separate columns
    By CarlJacks in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-09-2022, 06:18 AM
  2. [SOLVED] converting a countifs referencing part of the formula to a indirect countifs
    By DEEARO in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2021, 03:17 PM
  3. [SOLVED] Use of formula (e.g countifs) to count (without counting repeated data)
    By saugut in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-25-2020, 09:13 AM
  4. [SOLVED] Sumifs/Countifs formula for data table?
    By manny88 in forum Excel General
    Replies: 10
    Last Post: 01-14-2017, 03:34 PM
  5. when i click the cell where i used Countifs formula it should return the data ?
    By uttam.mothe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2014, 11:19 AM
  6. [SOLVED] how to write COUNTIFS formula for testing only FILTERED data
    By aaaaa34 in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 03-09-2014, 07:40 AM
  7. [SOLVED] COUNTIFS not reading cell with formula in it (rather than hard data)
    By Aquarock in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-14-2013, 06:18 PM

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