• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Working with Early and late arrivals

Hello I have a formula
=IF(OR(J4="",I4=J4),"",IF(0>((MOD(J4-I4,1)>0.5)-MOD(J4-I4,1)),"LATE","EARLY"))

if the vehicle arrives on time ie 23:30 the cell shows blank instead of Early

how can I stop this happening please its driving me mad
upload_2018-4-20_11-9-19.png
 
It is in your formula: IF(OR(J4="",I4=J4),""
Per your expectations that part is wrong, because when equal you consider it early.
this seems to work as you want it to do
=IF(J4="","",IF(0>((MOD(J4-I4,1)>=0,5)-MOD(J4-I4,1)),"LATE","EARLY"))
 
With only a screenshot at hand, I can't help but think this simplified formula could also work:
=if(J4="","",IF(J4>I4,"Late","early"))
 
I did have it simplified but when a truck arrives past midnight it shows early ie 23:55 expected time but arrives at 00:15 shows early

thanks
 
It is in your formula: IF(OR(J4="",I4=J4),""
Per your expectations that part is wrong, because when equal you consider it early.
this seems to work as you want it to do
=IF(J4="","",IF(0>((MOD(J4-I4,1)>=0,5)-MOD(J4-I4,1)),"LATE","EARLY"))
I tried this and it will not work sorry getting this upload_2018-4-20_12-13-18.png
 
Back
Top