# Condition Date between a range of dates

#### D87RFM

##### New Member
Hello,

I'm looking at the same formula since months and I can't solve it, maybe you can help me.

I want to create a condition that should be something like that:

If (data on cell A) is bigger or equal than (date cell B) and small or equal than (data cell C) so (new condition), if not "0".

Using ">=" and "<=" is not working Can you please help me?

Thanks!

Ex: target date: 31/01/2016

Validity period: 01/01/2015 - 01/05/2016

Because 31/01/2016 is between the validity period the second condition should copy the value, otherwise not.

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

#### Special-K99

##### Well-known Member
=if(and(a1>=b1,a1<=c1),true,false)

#### D87RFM

##### New Member
I tried this one, but for some reason, the second condition is affected when is not supposed to.

=IF(AND(\$BH\$1>=V36,\$BH\$1<=X36),IF(\$T36="CONTRACT",VLOOKUP(\$B36,'Cons DATA'!\$V:\$AX,15,FALSE)/1000,VLOOKUP(\$B36,'Cons DATA'!\$AZ:\$BN,15,FALSE)/1000),0)

The condition when is not contract returns automatically zero

Replies
5
Views
3K
Replies
1
Views
575
Replies
2
Views
474
Replies
2
Views
266
Replies
1
Views
369

1,191,687
Messages
5,988,024
Members
440,125
Latest member
vincentchu2369

### 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?

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