# If statement with dates based in order

#### ramosca

##### New Member
I am trying to figure out how to calculate an if statement using dates.

A2 = promised date
B2 = completion date
C2 = status

If the completion date is before the promise date then the status should equal = "on time"
If the completion date is after the promise date then the status should equal = "late"
if the completion date is blank the status should equal = "late"

### Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Like this?

=IF(ISNUMBER(A3),IF(A3<=A2,"On time","Late"),"")

Let's assume you actually mean

"If the completion date is before OR THE SAME AS the promise date then the status should equal = "on time" "

=if(or(b2="",b2>a2),"late","on time")

Thank you so much it works like a charm.
Sorry for not being clearer.

Replies
13
Views
466
Replies
0
Views
255
Replies
1
Views
219
Replies
5
Views
146
Replies
3
Views
191

1,196,259
Messages
6,014,290
Members
441,813
Latest member
elevate

### 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.

### Which adblocker are you using?

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

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