+ Reply to Thread
Results 1 to 5 of 5

IF Formula to calculate if product has been sent on time

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2007
    Posts
    77

    IF Formula to calculate if product has been sent on time

    Hi,

    I pull data from a system which gives me an order date and a shipment date.

    Thes data comes in this format:


    Order Date Shipment Date

    15/08/2012 17/08/2012

    I want to return a '1' in another column for items that have been shipped within 4 days, and a '0' for items that haven't been shipped within 4 days. However, weekends don't count in the turn around time. For example, if the order was received on Wednesday 15/08/2012 and shipped on the Monday 20/08/12 this would only be 3 days, rather than 5 days.


    Any help would be greatly appreciated.

    Thanks

    David

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,142

    Re: IF Formula to calculate if product has been sent on time

    hi David. assuming your data is in A2 & B2, try this formula:
    =IF(NETWORKDAYS(A2,B2)-1<=4,1,0)

    you can even have a list of holidays somewhere & refer to the list in the NETWORKDAYS formula. for eg. if i have a list of dates in G1:G10, then it'll be:
    =IF(NETWORKDAYS(A2,B2,$G$1:$G$10)-1<=4,1,0)
    Last edited by benishiryo; 09-06-2012 at 04:40 AM.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: IF Formula to calculate if product has been sent on time

    Hi

    Try

    =NETWORKDAYS(A1,B1)-1

    A1=Order Date
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    08-20-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: IF Formula to calculate if product has been sent on time

    Thanks guys, worked great!

    Greatly appreciated.

  5. #5
    Registered User
    Join Date
    11-28-2010
    Location
    India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    78

    Re: IF Formula to calculate if product has been sent on time

    Hi David,

    Assuming Order Date in Col A1 & Shipment Date in Col B1 just try simple If Function :-

    =IF((B1-A1)<4,1,0)

+ 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