+ Reply to Thread
Results 1 to 12 of 12

My Countifs formula doesn't work; Always showing "0".

  1. #1
    Registered User
    Join Date
    08-05-2022
    Location
    Indonesia
    MS-Off Ver
    2019
    Posts
    6

    Talking My Countifs formula doesn't work; Always showing "0".

    Hi guys, I need your help. Can you guys detect error in my countifs formula? I have 4 categories and this same formula works on 2 categories but failed on the other 2. The result keeps showing "0".
    Please Kindly Help me

    =COUNTIFS(Rating!$I$2:$I$10454,'Answer Rating 1'!A3,Rating!$H$2:$H$10454,'Answer Rating 1'!$D$2)

    Thank you for your help, I really appreciate it!
    Last edited by elizabethmayac; 08-05-2022 at 06:46 AM. Reason: It has been solved

  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,780

    Re: My Countifs formula doesn't work; Always showing "0".

    Welcome to the forum.

    There is nothing inherently wrong with the formula, so it is the data that is the issue.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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 Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: My Countifs formula doesn't work; Always showing "0".

    As we don't know what is in columns I and H, nor what is in the Answer Rating cells, it's hard to guess.

    As Ali says, doesn't look to be anything wrong with the formula so it must be the data. So, it could be that there are trailing spaces. Or, maybe, you have text values that look like numbers but won't match true numbers. That could be the result of using CONCATENATE, LEFT, RIGHT, or MID functions.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    08-05-2022
    Location
    Indonesia
    MS-Off Ver
    2019
    Posts
    6

    Unhappy Re: My Countifs formula doesn't work; Always showing "0".

    yes, I've been using MID function as one of the dataset for criteria_range2. But there seems to be no problem with the other 2 categories (the dataset also used MID function). What did I miss? Please help me, here I attached a little mock up
    Last edited by elizabethmayac; 08-05-2022 at 07:31 AM.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: My Countifs formula doesn't work; Always showing "0".

    In H2 copied down:

    =MID(G2,FIND(" ",G2)+1,10)

    Does this make the table return the expected results?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-05-2022
    Location
    Indonesia
    MS-Off Ver
    2019
    Posts
    6

    Talking Re: My Countifs formula doesn't work; Always showing "0".

    OMG It works! thank you so much, I will learn more about this formula. Thank youuuu!

  7. #7
    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,780

    Re: My Countifs formula doesn't work; Always showing "0".

    The one you were using left leading spaces.

    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 those who have helped you 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 all those who offered help.

  8. #8
    Registered User
    Join Date
    08-05-2022
    Location
    Indonesia
    MS-Off Ver
    2019
    Posts
    6

    Re: My Countifs formula doesn't work; Always showing "0".

    already marked the thread as SOLVED and already gavee everyone in this thread a reputation. You guys really help me. Thank you! <3 <3

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: My Countifs formula doesn't work; Always showing "0".

    You're welcome. Thanks for the rep.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: My Countifs formula doesn't work; Always showing "0".

    Just one point that you might find helpful: if you remove the Centre formatting on columns G and H, you can immediately see the misalignment caused by the leading space (from the MID function).

  11. #11
    Registered User
    Join Date
    08-05-2022
    Location
    Indonesia
    MS-Off Ver
    2019
    Posts
    6

    Re: My Countifs formula doesn't work; Always showing "0".

    Thank you for the helpful input! Well noted! Thank you so much for your help. This is a new and great lesson for me! ^^

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: My Countifs formula doesn't work; Always showing "0".

    You're welcome.

+ 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] Custom data validation with formula doesn't work & acts as if it was "any value"
    By MikeBlazej in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-04-2021, 08:29 AM
  2. Replies: 3
    Last Post: 11-19-2020, 08:30 PM
  3. [SOLVED] Rank function using "array IF" formula as ref doesn't seem to work
    By vizzkid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 09:47 AM
  4. Replies: 2
    Last Post: 09-17-2014, 09:17 AM
  5. [SOLVED] "Find" doesn't work when cell has formula in it
    By Xx7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2014, 10:19 PM
  6. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  7. vba doesn't work with "iferror()" and formula autofill problem
    By lkim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2012, 07:47 AM

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