Share via

Using the COUNTIFS function in Excel with Date Ranges

Paul Proia 20 Reputation points
2025-08-25T16:10:09.2133333+00:00

I'm using the CountIFS function with four criteria, but two are date ranges.

I've used three criteria (Count of X in some column where Date in another column >1/1/2025 and Date in that second column < 2/1/2025) criteria with success, but when I did one with a fourth criteria, I get back zeroes.

=COUNTIFS('DETAILS'!$M$2:$M$5000, "Chewing Gum",'DETAILS'!$L$2:$L$5000, "Cinnamon",'DETAILS'!$B$2:$B$5000, ">7/11/2025",'DETAILS'!$B$2:$B$5000, "<8/11/2025")

Any help would be greatly appreciated! (My fear is it is a typo, but it works with just one date rather than a range.)

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

Answer accepted by question author

  1. HansV 462.6K Reputation points
    2025-08-25T16:25:09.18+00:00

    The formula looks OK - assuming that you use US date format MDY. Are you absolutely sure that there are rows that match all four conditions?

    If possible, could you create a stripped-down copy of the workbook demonstrating the problem (without sensitive information) and make it available through one of the websites that let you upload and share a file, such as OneDrive, Google Drive, FileDropper or DropBox. Then post a link to the uploaded and shared file here.

    Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. Paul Proia 20 Reputation points
    2025-08-25T16:22:27.6833333+00:00

    I figured it out - and it had to do with the format of the date column on that particular tab.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.