Evaluate Dates across multiple columns and conditions

BillTony

Board Regular
Joined
May 3, 2017
Messages
64
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!
 

Some videos you may like

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
Joined
Mar 5, 2016
Messages
248
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)),"")
 
Solution

BillTony

Board Regular
Joined
May 3, 2017
Messages
64
Could this be adjusted to display a "Pass" or "Fail" instead of True/False?
 

shknbk2

Board Regular
Joined
Mar 5, 2016
Messages
248
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"),"")
 

Watch MrExcel Video

Forum statistics

Threads
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.
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
Top