Dispatch Formula Between Dates

RD1982

New Member
Joined
Nov 10, 2022
Messages
39
Office Version
  1. 365
Platform
  1. Windows
Hi Mr Excels Gurus - Could you please help with the below? This will cover the above message template which I think was a bit confused. Thanks.

1688106293662.png

Expected PGI DatePGI DatePGI Status
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/20230/01/1900Late
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202327/06/2023On Time
27/06/202328/06/2023Late
27/06/202328/06/2023Late
27/06/202326/06/2023Expedited
27/06/202326/06/2023Expedited
27/06/202326/06/2023Expedited
27/06/202326/06/2023Expedited
3/07/20230/01/1900On Time
1688106414347.png
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Assuming columns are A, B and C

Try this in C2 and below -

Excel Formula:
=IFS(B2=0,"Late",B2>A2,"Expedited",True,"On Time")
 
Upvote 0
@SanjayGMusafir Thank you for your feedback. I haven't used IFS before great to know this one....But it seems not capturing the correct results when PGI date occurred 1D after expected PGI Date as this should be "Late". Also, when PGI Date is = 0 but Expected PGI Date = future (not past due) this should be tagged as "On Time".

What do you recommend to adjust the below?


1688438319092.png
1688438463490.png
 

Attachments

  • 1688438442894.png
    1688438442894.png
    14.7 KB · Views: 2
Upvote 0
But it seems not capturing the correct results when PGI date occurred 1D after expected PGI Date as this should be "Late". Also, when PGI Date is = 0 but Expected PGI Date = future (not past due) this should be tagged as "On Time".
Try this and revert...
Excel Formula:
=IFS(And(U2="0/01/1900",T2<Today()),"Late",T2>U2,"Expedited",True,"On Time")
 
Upvote 0
@SanjayGMusafir - Apologies I cannot find the reason of below is still not capturing the correct result. The dates are all formatted as date so why is not picking the 1st condition of formula you shared?

1688441437288.png
 
Upvote 0
The dates are all formatted as date so why is not picking the 1st condition of formula you shared?
Ideally it should work with this too... Try again and update...

Excel Formula:
=IFS(And(U2=0,T2<Today()),"Late",T2>U2,"Expedited",True,"On Time")
 
Upvote 0
@SanjayGMusafir I don't know what else I can try and I thank you for trying to help but something is not working I cannot find where the problem is...


1688451865628.png
 
Upvote 0
I cannot find where the problem is...
At times it can some effort as there can be some ambiguity in understanding the need or the formats...

Try this and revert...

Excel Formula:
=IFS(And(U2=0,T2<Today()),"Late",T2>U2,"Expedited",T2=U2,"On Time",True,"")
 
Upvote 0
@SanjayGMusafir - you're so patient and amazing in trying to help me....I couldn't thank you enough! Please find below. Could we amend the "late" to pick up the first blank line as "Late" ...we're almost there.

May I understand better the concept of "True" at the end?


1688453000203.png
 

Attachments

  • 1688452765151.png
    1688452765151.png
    11.6 KB · Views: 2
Upvote 0
Could we amend the "late" to pick up the first blank line as "Late" ...we're almost there
I couldn't understand the above. Can you explain it better.

May I understand better the concept of "True" at the end?
The purpose of True in this formula is if none of the predefined conditions are met then what should it reply. Here I have used a "" (Blank) but that can be amended.

The benefit of using IFS function is that it allows you to add or reduce conditions without worrying about the closing or opening brackets. All you need to remember is the order in which excel should process the conditions. IFS function stops at the first criteria that is met. so order is important.

Anyhow, if you can better explain the above first thing, I would try to help on that too.
 
Upvote 0

Forum statistics

Threads
1,215,650
Messages
6,126,017
Members
449,280
Latest member
Miahr

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