Count products in development for each month, 3 year date range from start/finish dates, not DATEDIF

Lisa1234

New Member
Joined
Dec 3, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi everyone.

I'm a project manager, developing online learning modules. I use Smartsheet, but have been unable to solve this problem within Ss, so I'm considering exporting to excel to manipulate the data there. Modules take 4 - 6 months to develop.

I have been asked to provide a total of how many modules will be in development in each month in 2021. Taking February 2021 as an example, the screenshot demonstrates that there will be 8 modules in development in February (lines 7 - 14). I need to do a similar count for every month in 2021. The formula would also need to loop in 2020 and 2022, as I have modules that start in 2020 and end in 2021, and start in 2021 and end in 2022.

1606999884354.png


I've been using this formula in Smartsheet, but it doesn't work properly.

=COUNTIFS(Status:Status, <>"Complete", Status:Status, <>"Not Required", [CD Module]:[CD Module], 1,
Start:Start, IFERROR(MONTH(@cell), 0) <= 2,
Start:Start, IFERROR(YEAR(@cell), 0) = 2021,
Finish:Finish, IFERROR(MONTH(@cell), 0) >= 2,
Finish:Finish, IFERROR(YEAR(@cell), 0) = 2021)
+ COUNTIFS(Status:Status, <>"Complete", Status:Status, <>"Not Required", [CD Module]:[CD Module], 1,
Start:Start, IFERROR(MONTH(@cell), 0) >= 2,
Start:Start, IFERROR(YEAR(@cell), 0) = 2020,
Finish:Finish, IFERROR(MONTH(@cell), 0) >= 2,
Finish:Finish, IFERROR(YEAR(@cell), 0) = 2021)
+ COUNTIFS(Status:Status, <>"Complete", Status:Status, <>"Not Required", [CD Module]:[CD Module], 1,
Start:Start, IFERROR(MONTH(@cell), 0) >= 2,
Start:Start, IFERROR(YEAR(@cell), 0) = 2021,
Finish:Finish, IFERROR(MONTH(@cell), 0) >= 2,
Finish:Finish, IFERROR(YEAR(@cell), 0) = 2022)

I would really appreciate any help that anyone could give, I'm absolutely stuck with this.

thanks in hopeful anticipation,
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi Lisa1234,

Does this do what you want?

Lisa1234.xlsx
ABCDEFGHIJKLMNOP
1CourseStartEndJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21
2ABC01-Dec-2009-Dec-20354442222111
3DBB03-Mar-2108-May-21
4SKE11-Nov-2021-Jun-21
5LLM02-Feb-2111-Feb-21
6XVX02-Feb-2105-May-21
7NZW07-Jul-2109-Sep-21
8MEP01-Jan-2103-Feb-21
9SDR04-Apr-2009-Sep-22
10
Sheet1
Cell Formulas
RangeFormula
F1:P1F1=EOMONTH(E1,0)+1
E2:P2E2=COUNTIFS($B$2:$B$9999,"<="&EOMONTH(E$1,0),$C$2:$C$9999,">="&E$1)
 
Upvote 0
Hi, thanks so much. I don't think it's quite right - it returns a total of 3 in January 21, but there are only 2 rows that are in progress in January 21 - row 4 and row 8. It's looks great though, I hope it's just a tweak to fix it.
 
Upvote 0
Toadstool's solutions looks correct to me.

T202012a.xlsm
ABCDEFGHIJ
1Courses in development by month
2CourseStartEndDec-20Jan-21Feb-21Mar-21Apr-21May-21Jun-21
3ABC1-Dec-209-Dec-203354442
4DBB3-Mar-218-May-21
5SKE11-Nov-2021-Jun-21
6LLM2-Feb-2111-Feb-21
7XVX2-Feb-215-May-21
8NZW7-Jul-219-Sep-21
9MEP1-Jan-213-Feb-21
10SDR4-Apr-209-Sep-22
2d
Cell Formulas
RangeFormula
D3:J3D3=COUNTIFS($B$3:$B$10,"<"&E2,$C$3:$C$10,">="&D$2)
 
Upvote 0
Hi, apologies! I've gone cross-eyed looking at dates for the last couple of days. This is a fantastic solution @Toadstool, thank you for the time you spent on it. Thank you also @Dave Patton for prompting me. Will this formula continue to work through 2022, and 2023?
 
Upvote 0
Yes. You can change cell E1 to the start date you want. You could also copy the formulae in P1 and P2 right as many columns as you want to extend the range.

Lisa1234.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMAN
1CourseStartEndJun-20Jul-20Aug-20Sep-20Oct-20Nov-20Dec-20Jan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21Jan-22Feb-22Mar-22Apr-22May-22Jun-22Jul-22Aug-22Sep-22Oct-22Nov-22Dec-22Jan-23Feb-23Mar-23Apr-23May-23
2ABC01-Dec-2009-Dec-20111112335444222211111111111100000000
3DBB03-Mar-2108-May-21
4SKE11-Nov-2021-Jun-21
5LLM02-Feb-2111-Feb-21
6XVX02-Feb-2105-May-21
7NZW07-Jul-2109-Sep-21
8MEP01-Jan-2103-Feb-21
9SDR04-Apr-2009-Sep-22
Sheet1
Cell Formulas
RangeFormula
F1:AN1F1=EOMONTH(E1,0)+1
E2:AN2E2=COUNTIFS($B$2:$B$9999,"<="&EOMONTH(E$1,0),$C$2:$C$9999,">="&E$1)
 
Upvote 0
I found that out - it's so easy and awesome! How did you get it to display the dates in that format? On mine, it's insisting on displaying 01/06/2021, which I know people will find confusing.
 
Upvote 0
custom format the dates mmm-yy

Control 1 Number Custom
 
Upvote 0
Perfect! Thanks once again, this is going to make life so much nicer. :giggle:
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,813
Members
449,469
Latest member
Kingwi11y

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