+ Reply to Thread
Results 1 to 19 of 19

Excel Production Schedule and Time Forecasting

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Excel Production Schedule and Time Forecasting

    Hello,

    I am attempting to beef up my company's production schedule with a time forecasting formula. I have the following data to be included:
    Amount of Product to be Produced (lbs)
    Product's Output (lbs/hr)
    From that I calculate hours to complete the production run

    I want to take the hours to complete the production run and calculate the time the production run will be completed. I have a cell titled "Start of Present Run" which is the date and time of day the run starts.

    I should be able to simply add the "Hours to Complete" to the "Start of Present Run" and then to the time completed calculated for the run after that (to create a rolling schedule)

    The issue is we do not run 24/7. We have 3 machines, 2 run 6:00 AM-5:15 PM and another 6:00 AM -8:15 PM. If a production run takes more then 12 or 15 hours then run starts back up at 6:00 AM next day. I'd like the calculation to start back up the next day.

    How to I take that variable into my time complete forecasting?

    Thank you for any help. I hope I explained the problem well.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    I sort of get what you want. It would become a lot clearer with some actual data to play with. Below are the instructions and recommendations for attaching a workbook.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    Thank you for the response.

    Attached is a sample worksheet showing the calculations how excel does them and manually entered data showing the desired result.

    Thank you again for the help
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Excel Production Schedule and Time Forecasting

    Hi Kozbot and welcome back.

    The issue is we do not run 24/7. We have 3 machines, 2 run 6:00 AM-5:15 PM and another 6:00 AM -8:15 PM. If a production run takes more then 12 or 15 hours then run starts back up at 6:00 AM next day. I'd like the calculation to start back up the next day.
    Some of the proposed dates (sheet 'AFTER') include weekends, but ........
    Some of my date calculations may be wrong, apologize
    What is the workweek (M-F ?) and do we need to account for holidays?
    Dave

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    I thought this was what you were going to want. Fortunately I developed a UDF for this. It's called WorkHours and it's similar to the Excel Function WorkDays. The syntax is =WorkHours(Start Time, Number of Hours, Shift Start Time, Shift End Time, [Holidays]).

    Holidays is a range of cells containing the dates of holidays and it is an optional argument.. The function takes into account weekends and holidays.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    Thank you, this works!!

    Do you have a formula that doesn't take weekends into account? We sometimes run Saturdays and can manually enter in hours for weekends being down?

    Again, thank you!

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    This could get complicated really fast. I could add a flag to tell it not to count weekends. Do I then automatically also not count holidays? What if you wanted to work the Saturday of a holiday weekend? Also if you work on Saturday, does that mean that you also work on Sunday? Also are the weekend shifts the same length as the weekday shifts. This could possibly be done, but it would take a dozen or more parameters passed to the function to do it and quite a bit of coding.

    So the answer is, I think it's possible, but I'm not going to take the time to do it. The best I think I can offer is a flag to ignore both weekends and holidays and assume that the weekend shifts are the same as the weekday shifts.

  8. #8
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    Haha, yes, it is complicated. We sometimes work Saturday and have worked Sundays when REALLY busy and weekend shifts are usually half days

    I will manually adjust the formula with the length of weekend shifts to get an accurate forecast.

    Your VBA code can be copied and pasted to different worksheets, correct?

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    Yes, the code can be copied in anywhere. It's a "stand alone" function.

    Attached is a zip file. Uncompress it and the file ModWorkHouse.bas is contained within. Save the BAS file to a convenient place. Then when you need it in a workbook, open the vb editor (Alt-F11) and click on File -> Import and navigate to where you have the bas file stored. Click on it and it and the module will be imported. Excel should remember the last place you imported from, so navigation should be simpler after the first time.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    Thank you!

    I imported the VBA code and am encountering a problem when it calculates the result in the next day. The formula functions fine for adding hours within the day. But when the result goes into the next day I get a VALUE error.

    I did not encounter this with the example workbook

    Any insight?
    Last edited by Kozbot; 02-02-2017 at 05:32 PM.

  11. #11
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    Give me the parameters you are passing to the function and I'll see if I can reproduce the error.

  12. #12
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    So this is strange.

    The formula will calculate in my actual production schedule (the one I copied your VBA code too), but only when I have the example sheet you sent to me open. If I switch back to my production schedule sheet and try to use the formula, it reverts back to VALUE errors on BOTH my actual sheet and example sheets. I also noticed your example sheet is not macro enabled but my actual sheet is.

  13. #13
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    I've seen this behavior before. If you have a failed macro anywhere in the workbook, then functions will return #Value. That might not be the only cause of this error, but it's one of them.

  14. #14
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    I do not see a macro in any of my open workbooks. A "failed" macro would still appear in the macro list correct?

  15. #15
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    Yes, a failed macro should show up on the list.

  16. #16
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    I just thought of something else. Make sure you are passing good parameters to the function. In particular pay attention to shift start time and shift end time. Make sure these are actually times instead of date-times with just the time part showing.

  17. #17
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    It seems messing with the holidays parameter has made the code fail in the example workbook. I did not specify any holiday parameters in my actual sheet. When I remove the holidays parameter from the example sheet the code exhibits the same behavior (not calculating past the day)

    I have tried it with a new holiday parameter and with new sample data and it still fails.

  18. #18
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Production Schedule and Time Forecasting

    Unless you are in a position to post the actual book, I don't think I can help further. Change all the names to something nominal and maybe it would be safe to post.

  19. #19
    Registered User
    Join Date
    05-15-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Excel Production Schedule and Time Forecasting

    Quote Originally Posted by dflak View Post
    Unless you are in a position to post the actual book, I don't think I can help further. Change all the names to something nominal and maybe it would be safe to post.
    Hello,

    I would like to revisit this 3 year old thread. I am taking another look at the formula you posted and trying to get it to work after import.

    I will post an example file when complete. Just seeing if you are still posting here.

    Thank you!

+ 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. Importing and Viewing Production Schedule in Excel
    By mikebw in forum Excel General
    Replies: 1
    Last Post: 06-12-2015, 04:50 AM
  2. Excel based Production Schedule
    By sc3runner in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-25-2015, 06:42 PM
  3. Replies: 4
    Last Post: 08-15-2013, 07:23 PM
  4. How to Schedule a Production run using excel
    By puddles01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2013, 03:51 PM
  5. [SOLVED] Set Max Amount but Add Balance to Next Available Row - Production Forecasting
    By tsbuff in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-28-2012, 12:52 PM
  6. Schedule production help
    By liamsnodden in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-10-2012, 12:53 PM
  7. Replies: 0
    Last Post: 03-16-2005, 03:13 AM

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