Formula that returns 1 if dates falls in date Range

simplyc

New Member
Joined
Dec 1, 2014
Messages
11
Hello All,
I am in need of a formula that returns "1" if the start date is before or on the active date and if the close date is before or equal to the active date. I am trying to determine how many project are active in that month. If the project is not active, I would like a 0 returned.
Here is an example of what the spreadsheet would look like:
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Column BM
Start Date[/TD]
[TD]Column BN
Close Date[/TD]
[TD]Column BP
Active
1/15/2015[/TD]
[TD]Column BQ
Active
2/15/2015[/TD]
[TD]Column BR
Active
3/15/2015

[/TD]
[/TR]
[TR]
[TD]1/26/2015[/TD]
[TD]3/1/2016[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I tried the formula below and it did not work:
[TABLE="width: 71"]
<tbody>[TR]
[TD="class: xl63, width: 71"]=IF(OR(BM6<=BP4,BO6<=BP4),"1","0")[/TD]
[/TR]
</tbody>[/TABLE]

Any Help would be greatly appreciated !
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hello All,
I am in need of a formula that returns "1" if the start date is before or on the active date and if the close date is before or equal to the active date. I am trying to determine how many project are active in that month. If the project is not active, I would like a 0 returned.
Here is an example of what the spreadsheet would look like:
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Column BM
Start Date[/TD]
[TD]Column BN
Close Date[/TD]
[TD]Column BP
Active
1/15/2015[/TD]
[TD]Column BQ
Active
2/15/2015[/TD]
[TD]Column BR
Active
3/15/2015

[/TD]
[/TR]
[TR]
[TD]1/26/2015[/TD]
[TD]3/1/2016[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I tried the formula below and it did not work:
[TABLE="width: 71"]
<tbody>[TR]
[TD="class: xl63, width: 71"]=IF(OR(BM6<=BP4,BO6<=BP4),"1","0")[/TD]
[/TR]
</tbody>[/TABLE]

Any Help would be greatly appreciated !
First, I note you show BO6... your table shows Column BO not used, so I assume you meant BN6. See if this formula does what you want...

=IF(AND(BM6<=BP4,BP4<=BN6),1,0)
 
Upvote 0
Thank you both, for your fast responses!

These formulas are close to what I wanted. I used =IF(AND(BM5<=BO4,BN5<=BO4),1,0) and got zero in column BQ. I also tried =AND($BM5<=BO$4,$BN5<=BO$4)+0 and got zeros.
I would like to return a One for when the project is still active in that time frame. If the start date is before or on the active date and the close date is before or on the active date then I would like it to return a 1.
Like this :
What should I do differently to return these results?
[TABLE="width: 481"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: cms_table_outer_border, width: 500"]
<tbody>[TR]
[TD]Column BM
Start Date[/TD]
[TD]Column BN
Close Date[/TD]
[TD]Column BP
Active
1/15/2015[/TD]
[TD]Column BQ
Active
2/15/2015[/TD]
[TD]Column BR
Active
3/15/2015
[/TD]
[/TR]
[TR]
[TD]1/26/2015[/TD]
[TD]3/1/2016[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Thank you both, for your fast responses!

These formulas are close to what I wanted. I used =IF(AND(BM5<=BO4,BN5<=BO4),1,0) and got zero in column BQ. I also tried =AND($BM5<=BO$4,$BN5<=BO$4)+0 and got zeros.
Then I think your dates may be Text values instead of real dates. Assuming there is a "date" in cell BM5, what does this formula show...

=ISNUMBER(BM5)
 
Upvote 0
Thank you both, for your fast responses!

These formulas are close to what I wanted. I used =IF(AND(BM5<=BO4,BN5<=BO4),1,0) and got zero in column BQ. I also tried =AND($BM5<=BO$4,$BN5<=BO$4)+0 and got zeros.
I would like to return a One for when the project is still active in that time frame. If the start date is before or on the active date and the close date is before or on the active date then I would like it to return a 1.
Like this :
What should I do differently to return these results?
[TABLE="width: 481"]
<tbody>[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: cms_table_outer_border, width: 500"]
<tbody>[TR]
[TD]Column BM
Start Date[/TD]
[TD]Column BN
Close Date[/TD]
[TD]Column BP
Active
1/15/2015[/TD]
[TD]Column BQ
Active
2/15/2015[/TD]
[TD]Column BR
Active
3/15/2015[/TD]
[/TR]
[TR]
[TD]1/26/2015[/TD]
[TD]3/1/2016[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]8/2/2013[/TD]
[TD]8/15/2015[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]

These are the results that I get with my formula. As Rick mentioned earlier, did you really skip column BO or was that a typo?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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