+ Reply to Thread
Results 1 to 8 of 8

COUNTIFS returning 0 for every row

  1. #1
    Registered User
    Join Date
    10-18-2021
    Location
    London
    MS-Off Ver
    MS 2013
    Posts
    6

    COUNTIFS returning 0 for every row

    Hello

    I am trying to see how many pop-test results my students have returned to me over the last year, part of that analysis is to see how many they've returned within a 1 month period and a 3 month period. This is a formula that was suggested to me to use for the one month period:

    =COUNTIFS(INDEX($S$9:$LX$500,MATCH(A9,$A$9:$A$500,0),0),">0",$S$8:$LX$8,">="&TODAY()-31,$S$8:$LX$8,"<="&TODAY())

    $S$8:$LX$8 is every date between 01/01/2021 and 31/12/2021 (students can return a result on any date of the year as they're assigned randomly)

    $A$9:$A$500 is my list of student names

    $S$9:$LX$500 is the range of test results relating to the date and student name.

    All the responses in the rows are 0 and I don't understand why. They results are numbers with no gaps or random commas or dashes in.

    Is anyone able to see what could be causing my issues?

    Thanks

    S

  2. #2
    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,447

    Re: COUNTIFS returning 0 for every row

    Is anyone able to see what could be causing my issues?
    Being realistic, we'd need to see a sample workbook.
    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


  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: COUNTIFS returning 0 for every row

    We can't see your data so it is difficult to diagnose the particular problem. It might be that your numbers are text values, or that your dates are text values.

    Attach a sample Excel workbook by following the guidelines in the yellow banner at the top of the screen.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    10-18-2021
    Location
    London
    MS-Off Ver
    MS 2013
    Posts
    6

    Re: COUNTIFS returning 0 for every row

    Apologies, I've hopefully attached a version with dummy data in this time.

    It's the blue columns that have the offending formulas in. As far as I can tell the cells are all correctly numbers or dates.

    Thanks so much in advance!

    S
    Attached Files Attached Files

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: COUNTIFS returning 0 for every row

    Most of the dates in row 8 are actually text.
    Rory

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

    Re: COUNTIFS returning 0 for every row

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new here, I will do it for you this time: https://www.mrexcel.com/board/thread...range.1184789/)
    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.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: COUNTIFS returning 0 for every row

    Put this formula in T8:

    =S8+1

    then copy it across as far as you need to go.

    Then you can use these simplified formula in the blue areas:

    K9: =COUNTIFS($S9:$LX9,">0",$S$8:$LX$8,">="&TODAY()-31,$S$8:$LX$8,"<="&TODAY())

    L9: =COUNTIFS($S9:$LX9,">0",$S$8:$LX$8,">="&TODAY()-93,$S$8:$LX$8,"<="&TODAY())

    Copy these down as required. You will get zeros in column K as you have no data within the last month. However, you will get some results for column L.

    Hope this helps.

    Pete

  8. #8
    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 returning 0 for every row

    Dates in CG,CH and CI are not contiguous ????
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] COUNTIFs not working - returning 0
    By rayted in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-05-2022, 03:34 AM
  2. [SOLVED] Countifs not returning value on >=
    By shuddle in forum Excel General
    Replies: 3
    Last Post: 08-31-2020, 05:15 PM
  3. Countifs returning Zero
    By MikeSham in forum Excel General
    Replies: 5
    Last Post: 07-20-2016, 05:53 PM
  4. [SOLVED] CountIfs returning 0
    By jsmilke in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-19-2015, 04:59 PM
  5. countifs returning value error
    By ammartino44 in forum Excel General
    Replies: 2
    Last Post: 10-03-2014, 06:22 PM
  6. COUNTIFs formula returning a #VALUE!
    By GanbareGoemon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2014, 10:46 AM
  7. [SOLVED] COUNTIFS returning #VALUE!
    By photoryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2013, 01:07 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