Count occurrence of individual date within dates in range

mhessnm

New Member
Joined
Apr 12, 2019
Messages
45
Office Version
  1. 365
Platform
  1. Windows
I have a set of data in which two columns define a start date and end date - I'll call it my Census data. I have another dataset, call it my Day of Month data with one column that has individual dates of a month, i.e. 7/1/22, 7/2/22....7/31/22.

In the range of start dates and end dates in my census data, I want to count the number of instances that each individual date in my Day of Month data falls within the Start Date and End Date in my census data.

I'm sorry I had to attach an image as I can't get XL2BB to install as a tab in my Excel.

I have racked my brain on this. I haven't made COUNTIFS with OR logic work, and I've tried SUMPRODUCT. In the image I've provided you the count of 7/1/22 should be 19 (Row 89 through Row 107), 7/2/22 should be 19, 7/3/22 should be 15....

I know it's probably something simple that I'm missing. Any enlightenment appreciated.
 

Attachments

  • MrExcel datashot.jpg
    MrExcel datashot.jpg
    138.6 KB · Views: 21

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try putting this in cells G91 (assuming F91 has the 7/1/2022 date in it):
Excel Formula:
=COUNTIFS(A:A,"<=" & F91,B:B,">=" & F91)
and copy down for all rows.
 
Upvote 0
I have a set of data in which two columns define a start date and end date - I'll call it my Census data. I have another dataset, call it my Day of Month data with one column that has individual dates of a month, i.e. 7/1/22, 7/2/22....7/31/22.

In the range of start dates and end dates in my census data, I want to count the number of instances that each individual date in my Day of Month data falls within the Start Date and End Date in my census data.

I'm sorry I had to attach an image as I can't get XL2BB to install as a tab in my Excel.

I have racked my brain on this. I haven't made COUNTIFS with OR logic work, and I've tried SUMPRODUCT. In the image I've provided you the count of 7/1/22 should be 19 (Row 89 through Row 107), 7/2/22 should be 19, 7/3/22 should be 15....

I know it's probably something simple that I'm missing. Any enlightenment appreciated.
 
Upvote 0
Thank you! That was the problem. It's been a long week...I needed to exchange the operators to the other side and I just couldn't see my way through the haze.
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

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