+ Reply to Thread
Results 1 to 13 of 13

Conditional Formula for time window to include a buffer zone

  1. #1
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Conditional Formula for time window to include a buffer zone

    I am trying to update this formula in column 'J' to account for a buffer time or 5 mins (more of less) i.e so if the arrival time is 5 mins late or early it will still account for the 'On time' status.


    I keep getting an error when I use 'AND"
    is there a proper way to account for this. I need this only in column "J" so it will still work even If I dont have column K
    Last edited by sonny.thind; 08-23-2011 at 11:46 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formula for time window to include a buffer zone

    Possibly?

    =IF(C2="","",IF(C2<H2,"Early",IF(C2>I2+TIME(0,5,0),"Late","On Time")))

    copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    Hi Mate,
    I updated the Formula but it doesnt seem to work.. no change..
    see attached..thx..
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formula for time window to include a buffer zone

    If I put 6:20 PM in C2, I get "On Time" even though I2 is 6:15 PM, so it is allowing for the 10 minute grace.

    I am not sure what good it does to add the TIME(0,10,0) C2<H2, part though, as as long as it is before H2, it is early... no? unless you mean?

    =IF(C2="","",IF(C2+TIME(0,10,0)<H2,"Early",IF(C2>I2+TIME(0,10,0),"Late","On Time")))

  5. #5
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    OK thanks Mate-- now it works..

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formula for time window to include a buffer zone

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  7. #7
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    OK so I am trying to do this current report from a web query which refreshes every hour. but when I set up the formula for a new sheet--Web Query and into Sheet 1 and then refer the 'C2' into sheet 2 where I carry out my analysis.But The blank cells in 'C2' (orders with no arrival time)show up as 12:00AM which shows up as "early" in J2. I tried the clear zero values option but it doesn't change the formula. is there another way to do this?
    Attached Files Attached Files

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formula for time window to include a buffer zone

    Try:

    =IF(C2=0,"",IF(C2<H2+TIME(0,5,0),"Early",IF(C2>I2+TIME(0,5,0),"Late","On Time")))

  9. #9
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    But is there a macro to send an email with the entire row when the value in 'J2' changes to Say "Early" or "Late"?

  10. #10
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    Quote Originally Posted by NBVC View Post
    Try:

    =IF(C2=0,"",IF(C2<H2+TIME(0,5,0),"Early",IF(C2>I2+TIME(0,5,0),"Late","On Time")))
    Thanks This works mate!!

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formula for time window to include a buffer zone

    Quote Originally Posted by sonny.thind View Post
    But is there a macro to send an email with the entire row when the value in 'J2' changes to Say "Early" or "Late"?
    Please post that question separately in the Excel Programming forum.

  12. #12
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    Quote Originally Posted by NBVC View Post
    Please post that question separately in the Excel Programming forum.
    No problem! I will

  13. #13
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Conditional Formula for time window to include a buffer zone

    Quote Originally Posted by NBVC View Post
    Try:

    =IF(C2=0,"",IF(C2<H2+TIME(0,5,0),"Early",IF(C2>I2+TIME(0,5,0),"Late","On Time")))
    Thanks Bro! it works.. I cannot add more to your reputation as I already did once.. but Thank you this really helps..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1