+ Reply to Thread
Results 1 to 3 of 3

Count dates in multiple colums IF meets criteria

  1. #1
    Registered User
    Join Date
    11-14-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    2

    Count dates in multiple colums IF meets criteria

    Hi there,

    I am really struggling with this one and I am not sure what I am doing wrong. Anyway, I need to count the number of days in the last 30 days that belong to a particular location. (Example attached.)
    This is a scaled down version and there are over 1000 staff in the actual document.

    Anyway the formula I am using to count all the dates under 30 days is: =COUNTIFS(D1:CC24,">="&TODAY()-30)

    And that works fine.

    For everything older than 3 years I am using: =COUNTIFS(D1:CC24,">="&TODAY()-1095)

    And that also works fine.

    However when I need to add additional criteria I run into some issues. In theory I would have thought that I could simply add another criteria to count them by location: =COUNTIFS(D1:CC24,">="&TODAY()-30,$A$2:$A$24,"AAA")

    But excel cries and hides in the corner when I put that in and I cannot figure out what is wrong with the formula.

    I would be very thankful if someone could show me what I have stuffed up in the formula.
    Attached Files Attached Files

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

    Re: Count dates in multiple colums IF meets criteria

    countifs needs a single range for the criteria, not an array like you have

    =COUNTIFS(D1:CC24,">="&TODAY()-1095)
    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

  3. #3
    Registered User
    Join Date
    11-14-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: Count dates in multiple colums IF meets criteria

    Quote Originally Posted by FDibbins View Post
    countifs needs a single range for the criteria, not an array like you have

    =COUNTIFS(D1:CC24,">="&TODAY()-1095)
    That was about as helpful as Yahoo answers. Thanks for helping me fix my issue. 5 stars.

+ 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. COUNTIF trying to make a count if it meets criteria in two colums, how to?
    By FinGhost in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-16-2015, 01:36 PM
  2. [SOLVED] Countif (or maybe it's Sumproduct?) meets two criteria and between two dates
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-14-2014, 12:50 PM
  3. Replies: 4
    Last Post: 02-17-2014, 04:05 AM
  4. frequency count that meets another columns criteria
    By pardimix in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2013, 04:12 AM
  5. Trying to count every second cell in a column that meets certain criteria
    By RalphCr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2012, 08:40 AM
  6. Replies: 1
    Last Post: 02-16-2012, 09:57 AM
  7. how can i count a number that meets a criteria?
    By oakm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-11-2005, 03: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