# Flag if DATE A > DATE B

Options
✭✭✭

I'm working on a formula for a project tracker in my organization. The request is to flag a row if "Received Date" is greater than "Actual Date" for 3 separate dates - PO Received, Start Date, and End Date. I currently have a formula that works only if all dates are filled out:

=IF(OR([PO Received Date]@row > [PO Needed by Date]@row), OR([Actual Start Date]@row > [Projected Start Date]@row, OR([Actual End Date]@row > [Projected End Date]@row, 1, 0)))

Since it's a working tracker, not all 6 cells will be filled out. I'm working on this formula to try to flag the row based on cells with dates:

=IF(OR(NOTBLANK([PO Received Date]@row > [PO Needed by Date]@row, (NOTBLANK([Actual Start Date]@row > [Projected Start Date]@row, (NOTBLANK([Actual End Date]@row > [Projected End Date]@row, 1, 0)))))))

Screen shot for reference:

Tags:

## Answers

• ✭✭✭✭✭✭
Options

I'm not sure I follow... Are you trying to flag the row if any one of the "Projected" dates is less than the corresponding "Actual" date or only the latest set of dates to be filled out?

• ✭✭✭
Options

Thanks for your quick response and I apologize for not being clear. I've been running around in circles with this sheet! I'm trying to flag the row if actual date is less than projected date for any of the 3 sets of dates.

• ✭✭✭✭✭✭
Options

Try this...

=IF(OR([PO Received Date]@row > [PO Needed by Date]@row, [Actual Start Date]@row > [Projected Start Date]@row, [Actual End Date]@row > [Projected End Date]@row), 1)

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!