Getting a Project Count for Days in a Month

Written by Allen Wyatt (last updated October 31, 2026)

Dennis has a worksheet where each row contains information about a project, including a start date and end date for the project. He would like a summary that shows a count of projects active during each date of a particular month. If the start dates are in column C, the end dates in column D, and the date for the month in question is in cell S1, Dennis wonders how he can get a project count for each day in that month starting in cell S5.

There are two parts to what Dennis needs. The first is to generate the list of dates for the month and the second is to generate the actual project counts for those dates. Dennis can generate the first day of the month by using this formula in cell S5:

=S1+1-DAY(S1)

Then, in cell S6, Dennis would enter the following formula to come up with the second day of the month:

=IF(MONTH($S$5+ROW()-ROW($S$5))=MONTH($S$5),$S$5+ROW()-ROW($S$5),"")

Note that a simple increment of the date in S5 could have worked, but the much more complex IF statement is helpful when copying the formula down into the range S7:S35. The formula will display every date for the month, leaving the remaining cells in the range blank. You'll then want to format the range S5:S35 to display dates in the format you prefer.

If you are using Excel 2021 or a later version, you can make the date generation even easier. Place the following formula into cell S5:

=SEQUENCE(DAY(EOMONTH(S1,0)),1,EOMONTH(S1,-1)+1)

The formula spills all the dates in the month downward. You'll still need to select the cells, however, and format them as dates.

With the month's dates in place, you can then generate the desired counts. Consider the date in cell S5. You want a count of any project whose start date is on or before that date and whose end date is on or after that date. The following formula, entered in cell T5, will work great for this purpose:

=COUNTIFS($C:$C,"<="&S5,$D:$D,">="&S5)

Before copying the formula down through cell T35, you will probably want to wrap it in an IF statement, like this:

=IF(S5="","",COUNTIFS($C:$C,"<="&S5,$D:$D,">="&S5))

This checks to make sure that the date in column S is actually there before attempting to do a count.

If you used the SEQUENCE function, described earlier, to spill the month's dates in cell S5, and you are using Excel 2024 or Microsoft 365, you can build on the SEQUENCE formula by using the following formula in cell T5:

=MAP(S5#,LAMBDA(d,COUNTIFS($C:$C,"<="&d,$D:$D,">="&d)))

This uses the spilled dates beginning in cell S5 (those generated by the SEQUENCE formula) to do a count based on each date.

Finally, there is a caveat that should be mentioned. The solutions presented for Dennis in this tip are only as good as the data on which those formulas are based. If, for instance, there are any blanks in the end-dates for projects, that will cause errors. Also, it is assumed that the end date for a project will always be after the start date. (In other words, the dates for a given project are in the proper chronological order.)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (14016) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Stubborn Highlighting

When you make extensive edits to a document and those edits include changing the formatting of numbered or bulleted ...

Discover More

Stable Layout on Different Printers

Want your document to print out the same on printers other than your own? This may be an elusive quest, as explained in ...

Discover More

Deleting Rows where a Column is Empty

When working with data in a worksheet, it is not unusual to need to delete rows of that data. This tip provides three ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Monthly Close-Out Dates

If your company closes out its accounting months at the end of each calendar quarter, figuring out the proper closing ...

Discover More

Determining If a Year is a Leap Year

Need to figure out if a given year is a leap year? It's not as easy as you think! This tip provides a plethora of ways ...

Discover More

Date for Next Wednesday

When working with dates, it is often helpful to be able to calculate some date in the future based on a starting date. ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 1?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.