+ Reply to Thread
Results 1 to 3 of 3

Delivery calculator not working (possibly a very specific issue, hard to title accurately)

  1. #1
    Registered User
    Join Date
    04-19-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    2

    Delivery calculator not working (possibly a very specific issue, hard to title accurately)

    Hello there,

    I'm trying to calculate if a delivery is late or not. I was wondering if you'd please be able to help with this.

    This is based on the date of the order, +1 (item is dispatched the next working day after being ordered).

    The delivery period is 5 working days and this is counted from the next working day after being ordered.

    The order date is entered into cell F21.

    Cell F27 checks if F21 is not empty - if true, it calculates the difference between F21 and today's date, excluding weekends and the specified holidays in range K12:K21.

    =IF(F21<>"", IF(NETWORKDAYS(F21+1, TODAY(), K12:K21)>5, "LATE", "NOT LATE"), "thinking")

    This test case identifies the problem:

    F21's date is entered as 12/04/15 (a Sunday).

    Today's date is 19/04/15 (a Sunday).

    F27 resolves to NOT LATE.

    I know that this is because my formula is counting the working days between 13/04/15-17/04/15, which equals 5. As the result is exactly 5 (and not greater than 5), the formula resolves to false (NOT LATE).

    But what if the delivery never arrived on the 17th and I query this on the 18th or 19th? The formula lies to me and tells me it's not late!

    I also know why this is, because the formula is only counting working days and won't resolve to true (LATE) until today's date is 20/04/15 or greater.

    So, I *think* I need to do something like this:

    Somehow get the date that NETWORKDAYS says is the 5th day (in this case, 17/04/15) from:

    =NETWORKDAYS(F21+1, TODAY(), K12:K21)=5

    Then check if today() is greater than that date (regardless of non-working days). In this scenario, as today is greater than 17/04/15, I would get my desired result (LATE).

    Assuming that I'm thinking on along the right lines here, is there any function that will do the same as NETWORKDAYS but return the 5th day as a date, so I can accomplish my master plan?!

    *befuzzled* I think it's time for coffee and biscuits...

    Oh yes, this is in Office 2013, Windows.

    thank you for any hints or help you can offer

  2. #2
    Registered User
    Join Date
    04-19-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    2

    Re: Delivery calculator not working (possibly a very specific issue, hard to title accurat

    I think it helped typing it all out and re-reading it back to myself. Apologies for wasting your time, sometimes it's good to just sound it out.

    For anyone who's had the same issue, here's the solution:

    In column C I set up a Delivery ETA of when the order should arrive:

    =IF(F21<>"", WORKDAY(F21, 5, K12:K21), "thinking")

    Then based the late/not late formula on the date in column C:

    =IF(F21<>"", IF(TODAY()>C27, "LATE", "NOT LATE"), "thinking")

    Please ignore this thread unless I reply after this still befuzzled
    Last edited by Bud Axemple; 04-19-2015 at 01:23 PM. Reason: Update the solution.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Delivery calculator not working (possibly a very specific issue, hard to title accurat

    Post Removed
    Quang PT

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula needed for planning chart - hard to explain in title !
    By chrisnewton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2013, 05:47 AM
  2. Formula for distributing cashflow accurately over months using specific dates
    By byjingo999 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2013, 01:52 PM
  3. Replies: 4
    Last Post: 05-01-2012, 01:35 PM
  4. Excel VBA problem - possibly ocx/dll issue
    By elsvieta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2009, 05:27 AM
  5. hard calculator
    By unclesilas in forum Excel General
    Replies: 3
    Last Post: 11-05-2008, 10:45 AM

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