+ Reply to Thread
Results 1 to 5 of 5

Excel Formula to Calculate Leadtime minus Weekend

  1. #1
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Excel Formula to Calculate Leadtime minus Weekend

    Hello,

    I am really stuck on a formula to calculate leadtime for jobs in my shop. The formula I have been using seems to work ok but when the job takes less than 1 day it gives me negative numbers. Any help would be greatly appreciated.

    Here is what I use now:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Excel Formula to Calculate Leadtime minus Weekend

    I can't quite figure out what you're working with so here's a mock-up
    Col_A contains job references
    Col_B contains Due Dates
    Col_C contains number of effort days to complete the work
    and
    J1:J10 contains a list of holiday dates.

    This regular formula returns the start date that will result in the work being completed on the due date, taking holidays into consideration:
    D2: =WORKDAY(B2,-C2+1,$J$1:$J$10)

    Example:
    Job: Alpha0123
    DueDate: 16-Jan-2012
    EffortDays: 7
    StartDate: 05-Jan-2012 (I had Jan 10th as a randomly placed holiday)

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Excel Formula to Calculate Leadtime minus Weekend

    Hi Ron,

    Thanks for the reply, I am sorry for the lack of information.... Yes, you are on the right track with what I need. I just have a start date and finish date to calculate the total leadtime. The formula I have been using takes out 2 days if the weekend happens to fall in between. The biggest problem I have is that if the job finishes on the same day it started, I get a negative number returned. For example I have one that finished in 0.19 days but the leadtime shows -1.81 so it seems to be accounting for the subtraction of 2 days if it is less than 1.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Excel Formula to Calculate Leadtime minus Weekend

    If you can post some representative sample data, we'll see what we can do to help.

  5. #5
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Excel Formula to Calculate Leadtime minus Weekend

    Hi Ron,

    Sorry for the delay, I have been gone for an extended Holiday weekend. I think I figured out what had happened to the code I was using. In my line of code, I needed to take out the "=" in ">=WEEKDAY". Thanks very much for your time, greatly appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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