Forum Discussion
if statement for multiple date conditions
- Apr 30, 2021
The problem was that Excel expects a space before AM/PM. I have converted the values for you - see attached.
The main problem is that columns A and B contain text values that look like dates, not real dates. A tell-tale sign is that they are left-aligned.
Once you have corrected that, you can use the formula
=IF([@[Actual Delivery]]="",IF([@[Target Delivery (Late)]]>NOW(),"In Transit","Unconfirmed Late"),IF([@[Actual Delivery]]<=[@[Target Delivery (Late)]],"On Time","Confirmed Late"))
- ncstleApr 29, 2021Copper Contributor
Hi thanks for the insight, I've corrected the dates! The formula provided seems to get me most of the way there but appears to miss the "unconfirmed late" piece.
The highlighted fields in the screenshot are returning as In Transit but should flag as Unconfirmed late because it is now after the Target Delivery Date.
- HansVogelaarApr 29, 2021MVP
The dates are still left-aligned, so I suspect they are still text values instead of dates.
- ncstleApr 29, 2021Copper Contributor
HansVogelaar the dates aren't text values, they're in date format. I've attached the file for reference.