How to check if a date range passes through a month

Intexcel

New Member
Joined
Nov 10, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Dear Excel Community,

How can I check if a date range passes through a month and give out the number 1 if it does.

Im an intern at a company and every month i have to give a report for the workers council. In this report I have to count the number of interns and bachelor/Master thesis students for any given month. Any intern that is active in a month gets counted.

I already tried everything including chat gpt but its not working. The biggest problem is:

The trigger point for the count. Of course you can check if a date lies in a certain zone. but not if it passes through. Somebody who starts his internship in september and ends in november also gets counted in my report but excel doesnt notice it since neiter his start date nor his end date are in october.

It doesnt matter if somebody passes through the whole month or just "touches" it on its first or last day. They have to be counted.

Please help

I get a report that looks like this. I already showed the results for you on how it should look for the month of october in the end in the column named "Count towards total":

abbreviation of the corporate branch
Name Manager
Name Intern
Start of Internship
End of Internship
Count towards total
ASD​
(2/3)​
Manager A​
Intern a​
15.10.23​
20.02.24​
1​
Intern b​
01.02.23​
15.10.24​
1​
intern a (thesis)​
15.10.23​
20.02.24​
DSF​
(1/3)​
Manager B​
Intern h​
01.04.23​
01.09.23​
Intern l​
01.04.23​
01.08.23​
intern k​
01.04.23​
01.04.24​
1​
GFD​
(2/1)​
Manager C​
Intern b​
01.06.23​
01.05.24​
1​
Intern d​
01.04.23​
01.01.24​
1​
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I forgot to mention that the same student cant be counted twice even if he doesn an internship and also does his thesis in the same time...but thats not the biggest problem
 
Upvote 0
Try the below:
Book1
ABCDEFGHIJKLMN
1
2ASD(2/3)01-Oct31-Oct
3Manager AIntern a15.10.2320.02.2411
4Intern b01.02.2315.10.2411
5intern a (thesis)15.10.2320.02.241
61
7 
8 
9DSF(1/3) 
10Manager BIntern h01.04.2301.09.231
11Intern l01.04.2301.08.231
12intern k01.04.2301.04.2411
13 
14 
15 
16GFD(2/1) 
17Manager CIntern b01.06.2301.05.241 
18Intern d01.04.2301.01.2411
19
Sheet1
Cell Formulas
RangeFormula
I3:I18I3=IF(F3="","",IF(AND(OR(E3>=$L$2,E3<=$M$2,F3>=$L$2,F3<=$M$2),COUNTIF($D$3:D3,D3)<=1),1,""))
 
Upvote 0
Solution
THANK YOU SO MUCH!!!

It works. Thats genius. Im learning new things just by understanding your formular :D, youve helped me a lot!
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,124
Members
453,021
Latest member
Justyna P

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