Counting between date ranges

Sleepingsouls

New Member
Joined
Jan 22, 2018
Messages
20
<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl63 {mso-number-format:"\[$-C09\]dd\\-mmm\\-yy\;\@";}--></style>Hi Guys,

I work for a large company, we have a very fluid team dynamic and are often moving people between teams to get the best out of everyone. I have recently tried to set up an excel spreadsheet to let me know how many people will be on my team on any given day.

Below is a quick example of what I am trying to do - I want to give a date range people will be working for me and have that converted into a number of people I will have on a date.

Thanks in advance.

<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl63 {mso-number-format:"\[$-C09\]dd\\-mmm\\-yy\;\@";}--></style>
EmployeeStart DateEnd Date
a01-Jan-1801-Feb-1801-Jan-180
b01-Jan-1820-Jan-1802-Jan-180
c08-Jan-1801-Feb-1803-Jan-180
d20-Jan-1801-Feb-1804-Jan-180
e16-Jan-1829-Jan-1805-Jan-180
06-Jan-180
07-Jan-180
08-Jan-180
09-Jan-180
10-Jan-180
11-Jan-18
12-Jan-18
13-Jan-18
14-Jan-18
15-Jan-18
16-Jan-18
17-Jan-18

<!--StartFragment--> <colgroup><col width="87" span="6" style="width:65pt"> </colgroup><tbody>
<!--EndFragment--></tbody>
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Welcome to the Board!

Let's say that your Start Dates are in cells B2:B6
and your End Dates are in cells C2:C6
and dates you want to list/check are in column E starting in cell E2.

Then place this formula in F2 and copy down for all values in column E:
Code:
=SUMPRODUCT(--(B$2:B$6<=E2),--(C$2:C$6>=E2))
 
Upvote 0
Thank you so much! I was using Countifs - I spent hours trying to get it to work but just couldn't get any other value than 0.

Again Thank you :)
 
Upvote 0
Maybe you can also help me understand this formula. the -- what does that mean. (I thought I was pretty well versed in Excel... Apparently not)
 
Upvote 0

Forum statistics

Threads
1,214,656
Messages
6,120,762
Members
448,991
Latest member
Hanakoro

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