Please help calculate if date falls within a range in Excel?

zacharie101

New Member
Joined
Sep 13, 2015
Messages
2
<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:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; 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 {font-size:11.0pt; font-family:Calibri; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:"mm\/dd\/yy"; text-align:center; border:.5pt solid silver; white-space:normal;}.xl64 {font-size:11.0pt; font-weight:700; font-family:Calibri, sans-serif; mso-font-charset:0; text-align:center; border:.5pt solid silver; white-space:normal;}.xl65 {font-size:11.0pt; font-weight:700; font-family:Calibri, sans-serif; mso-font-charset:0; text-align:center; border-top:none; border-right:.5pt solid silver; border-bottom:none; border-left:.5pt solid silver; white-space:normal;}.xl66 {font-size:11.0pt; font-weight:700; font-family:Calibri, sans-serif; mso-font-charset:0; text-align:center; border:.5pt solid silver; background:#E2EFDA; mso-pattern:black none; white-space:normal;}.xl67 {font-size:11.0pt; font-family:Calibri; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:"mm\/dd\/yy"; text-align:center; border:.5pt solid silver; background:#E2EFDA; mso-pattern:black none; white-space:normal;}.xl68 {font-size:11.0pt; font-family:Calibri; mso-generic-font-family:auto; mso-font-charset:0; text-align:center; border:.5pt solid black; background:#00B0F0; mso-pattern:black none;}--></style>[TABLE="width: 261"]
<!--StartFragment--> <colgroup><col width="87" span="3" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl68, width: 87"]Name[/TD]
[TD="class: xl68, width: 87"]From Date[/TD]
[TD="class: xl68, width: 87"]To Date[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]A[/TD]
[TD="class: xl67, width: 87"]07/30/18[/TD]
[TD="class: xl67, width: 87"]08/23/18[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]A[/TD]
[TD="class: xl67, width: 87"]06/21/18[/TD]
[TD="class: xl67, width: 87"]07/30/18[/TD]
[/TR]
[TR]
[TD="class: xl64, width: 87"]B[/TD]
[TD="class: xl63, width: 87"]08/01/18[/TD]
[TD="class: xl63, width: 87"]08/23/18[/TD]
[/TR]
[TR]
[TD="class: xl64, width: 87"]B[/TD]
[TD="class: xl63, width: 87"]06/30/18[/TD]
[TD="class: xl63, width: 87"]08/01/18[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]C[/TD]
[TD="class: xl67, width: 87"]06/25/18[/TD]
[TD="class: xl67, width: 87"]07/23/18[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]C[/TD]
[TD="class: xl67, width: 87"]07/23/18[/TD]
[TD="class: xl67, width: 87"]08/21/18[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]C[/TD]
[TD="class: xl67, width: 87"]08/09/18[/TD]
[TD="class: xl67, width: 87"]08/21/18[/TD]
[/TR]
[TR]
[TD="class: xl64, width: 87"]D[/TD]
[TD="class: xl63, width: 87"]06/30/18[/TD]
[TD="class: xl63, width: 87"]08/09/18[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]E[/TD]
[TD="class: xl67, width: 87"]08/02/18[/TD]
[TD="class: xl67, width: 87"]08/21/18[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]E[/TD]
[TD="class: xl67, width: 87"]06/30/18[/TD]
[TD="class: xl67, width: 87"]08/02/18[/TD]
[/TR]
[TR]
[TD="class: xl64, width: 87"]F[/TD]
[TD="class: xl63, width: 87"]06/11/18[/TD]
[TD="class: xl63, width: 87"]06/11/18[/TD]
[/TR]
[TR]
[TD="class: xl64, width: 87"]F[/TD]
[TD="class: xl63, width: 87"]08/08/18[/TD]
[TD="class: xl63, width: 87"]08/21/18[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 87"]F[/TD]
[TD="class: xl63, width: 87"]08/08/18[/TD]
[TD="class: xl63, width: 87"]08/21/18[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]


If the name of the cell matches, I want to calculate if the From and To date falls within range? Can you please help? I'm trying to make sure no date overlaps

For example, for the name "A" I want to check to see if the 2nd "A" From and To dates 6/21/18-7/30/18 falls within the dates of 7/30/18-8/23/18
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hello,

In cell D3, you can test following :

Code:
=MAX(MIN(C3,C2)-MAX(B2,B6)+1,0)

HTH
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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