Help with Date formula

mmjones31

New Member
Joined
Feb 8, 2022
Messages
5
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I have 2 date columns I was trying to write an IF statement for;
actual (U)
plan (W)

IF(actual<plan,”early”)
IF(actual=plan, “on time”)
IF(plan>actual, “over due”)

One problem I’m having is the data set I’m using if a delivery hasn’t been created then the actual date is represented in the cell as 00/00/00, but other rows have a valid dates.

How can I combine the above to get these results?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi MMJones31,

Does this do what you want?

MMJones31.xlsx
UVWXY
1ActualPlanResult
21/1/20221/1/2022On time
31/1/202212/31/2021Overdue
41/1/20222/2/2022Early
51/1/2022 
61/1/2022 
Sheet1
Cell Formulas
RangeFormula
Y2:Y6Y2=IF((OR(U2<1,W2<1)),"",IF(W2-U2=0,"On time",IF(W2-U2<0,"Overdue","Early")))
 
Upvote 0
Thanks. That formula is giving me a #value error in some rows where the cell in column U is 00/00/0000and is not working exactly right.

Example:
Actual (column U)
00/00/0000
2/2/2022
00/00/2022
2/1/2022
1/28/2021
12/1/2021

Plan (column W)
3/9/2022
2/1/2022
3/21/2022
2/2/2022
1/31/2021
11/29/2021
 
Upvote 0
I'm guessing the non-date Actuals are text so see if this works.

MMJones31.xlsx
UVWXY
1ActualPlanResult
200/00/00003/9/2022 
32/2/20222/1/2022Overdue
400/00/20223/21/2022 
52/1/20222/2/2022Early
61/28/20211/31/2021Early
712/1/202111/29/2021Overdue
2nd
Cell Formulas
RangeFormula
Y2:Y7Y2=IF(N(U2)<1,"",IF(W2-U2=0,"On time",IF(W2-U2<0,"Overdue","Early")))
 
Upvote 0
Solution
I'm guessing the non-date Actuals are text so see if this works.

MMJones31.xlsx
UVWXY
1ActualPlanResult
200/00/00003/9/2022 
32/2/20222/1/2022Overdue
400/00/20223/21/2022 
52/1/20222/2/2022Early
61/28/20211/31/2021Early
712/1/202111/29/2021Overdue
2nd
Cell Formulas
RangeFormula
Y2:Y7Y2=IF(N(U2)<1,"",IF(W2-U2=0,"On time",IF(W2-U2<0,"Overdue","Early")))
Yes, this works! Yes, unfortunately the non-date are text. Is there anyway for the non date to reflect maybe as “no delivery”?
I appreciate your help immensely- this really had me stumped.
 
Upvote 0
Yes, this works! Yes, unfortunately the non-date are text. Is there anyway for the non date to reflect maybe as “no delivery”?
I appreciate your help immensely- this really had me stumped.
Sorry I figured that out!! It’s been a long day!!! Thank you so very much!!!!
 
Upvote 0
You're welcome.
...but I'd appreciate you marking my post as the solution of you're OK with that.
 
Upvote 0

Forum statistics

Threads
1,215,761
Messages
6,126,735
Members
449,333
Latest member
Adiadidas

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