countifs function with date range

msvoboda27

New Member
Joined
Feb 9, 2018
Messages
30
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello,

I have a large data table with "create date" and "status" fields. How can I count the number of statuses within a date range using cell references?
Specifically, I would like to count the number of "closed," "resolved," etc. statuses from the date range specified in cells D2 through E2. I will need to update the values in row 2 with the new date range next month.
Thank you!

Date Range Table.png
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Show us the data you want to count. Also better to post the actual data instead of a screenshot.
 
Upvote 0
Something like:

Excel Formula:
=COUNTIFS($G$1:$G$100,D3,$H$1:$H$100,">="&$D$2,$H$1:$H$100,"<="&$E$2)

assuming your status is in range $G$1:$G$100 and the date is in $H$1:$H$100. Put that formula in E3 and drag down.
 
Upvote 0
Hello
Below is the table of data I like to have count by status
.
Data Range Table2.png
 
Upvote 0
Hi, Can someone please look at this request now that I added an excel table? Thank you
 
Upvote 0
My previous formula will work fine. Here it is adjusted to your ranges:

Excel Formula:
=COUNTIFS($B$11:$B$100,D3:D6,$C$11:$C$100,">="&$D$2,$C$11:$C$100,"<="&$E$2)

Put this in E3. I made it a Spill formula so you don't need to drag it down. Change the bottom row (100 in this formula) to whatever your actual bottom row is.
 
Upvote 0
Hello,

Thank you once again for your response.

I diligently used the formula you provided to update the file, but I kept encountering the "Spill" error. I confirmed that the create date field is indeed a date field, and I have included a screenshot for your reference.
Additionally, I ensured that all 100 rows had no missing data in any of the cells. I am using MS Excel 365
What am I missing?
Updated Table with Formula and Spill Error.png


Date Field Confirmed.png
 
Upvote 0
Clear the cells E4, E5 & E6 just leaving the formula in E3
 
Upvote 0
I removed the formulas in cells E4, E5, E6, I continue to get the spill error. I have to be doing something wrong but unsure what.

Updated Table with Formula and Spill Error Remove Formaul in other Cells.png


Here is the spill error
Spill error.png
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top