# Evaluate Dates across multiple columns and conditions

#### BillTony

##### Board Regular
I have 4 columns "usually" containing dates that I must evaluate using VBA.

Column A is the Driver and if is blank the remaining conditions are irrelevant.

So given a valid date is present in column A - columns B, C or D could potentially be blank.

If there IS a date in columns B, C or D - the date found in column A must be within 90 days PRIOR to any of those dates.

As always - any insight is greatly appreciated!

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

#### shknbk2

##### Board Regular
Try this:
Excel Formula:
``=IF(NOT(ISBLANK(A1)),OR(AND(DAYS(B1,A1)<=90,DAYS(B1,A1)>0),AND(DAYS(C1,A1)<=90,DAYS(C1,A1)>0),AND(DAYS(D1,A1)<=90,DAYS(D1,A1)>0)),"")``

#### BillTony

##### Board Regular
Thanks a bunch - this works great!

#### BillTony

##### Board Regular
Could this be adjusted to display a "Pass" or "Fail" instead of True/False?

#### shknbk2

##### Board Regular
Sure, by adding another nested IF:

Excel Formula:
``=IF(NOT(ISBLANK(A1)),IF(OR(AND(DAYS(B1,A1)<=90,DAYS(B1,A1)>0),AND(DAYS(C1,A1)<=90,DAYS(C1,A1)>0),AND(DAYS(D1,A1)<=90,DAYS(D1,A1)>0)),"Pass","Fail"),"")``

#### BillTony

##### Board Regular
Awesome - thanks!

Replies
7
Views
370
Replies
7
Views
304
Replies
6
Views
242
Replies
7
Views
125
Replies
3
Views
144

1,127,347
Messages
5,624,136
Members
416,012
Latest member
rockermom59

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

### Which adblocker are you using?

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

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