# If Statement with today's date minus due date for a delay calculation

1. ## If Statement with today's date minus due date for a delay calculation

Hello all,

I need your help with an IF Statement to show delays in number of days. What I have so far-

=IF(F2="Complete","None",IF(F2="In Progress", "InProgressStatus", IF(F2="On Hold", "On HoldStatus", IF(F2="Not Started", "NotStartedStatus", IF(F2="Not Required", "")))))

What I want to happen is when F2=In Progress, excel goes takes the current date, subtracts the due date (given in a cell) and displays a number in days that represents the delay.

=DAYS360(>>DueDateCell<<,TODAY()) works in a separate cell but not in the statement.

Does that make sense? TIA  Register To Reply

2. ## Re: If Statement with today's date minus due date for a delay calculation

Try

=IF(F2="Complete","None",IF(F2="In Progress",DAYS360(>>DueDateCell<<,TODAY()), IF(F2="On Hold", "On HoldStatus", IF(F2="Not Started", "NotStartedStatus", IF(F2="Not Required", "")))))

This will replace the "InProgressStatus" to the delay in days  Register To Reply

3. ## Re: If Statement with today's date minus due date for a delay calculation

Awesome, it works. I had the parenthesis in the wrong place on the Days360 formula.  Register To Reply