Evaluate Dates across multiple columns and conditions

BillTony

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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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)),"")
 
Upvote 0
Solution
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"),"")
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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