Need help calculating estimated completion date for production while excluding weekends
Hello Smartsheet Community!
I have a project I am working on for work, and I am struggling with a formula to calculate the expected date of completion for our production orders based on a few criteria. A few things are missing that are confidential, but I have attached a picture of a practice spreadsheet:
Please note: a lot of this is me playing around trying to make it work, so it's a little messy. The two entries highlighted in yellow are in the column I am trying to make work. What I need to do is determine when our order SHOULD finish up, based on the 'Expected Days Until Completion' column which is currently set to this:
=(([Work Order QTY]@row - [Current FG Units]@row) / [Planned QTY/Hour]@row) / [Hours Per Day]@row
The dates are off right now, but, the way I need it to work is I need to make a formula that calculates the expected date of completion, excluding weekends, by using the expected days until completion (or some other column(s) which would work more intuitively) to let me know what the estimated completion date is, which will go in the highlighted column.
I currently have this formula in that column, but it doesn't exclude weekends:
=TODAY() + [Expected Days Until Completion]@row
我也试着用第二个制定a that kicks out 'incorrect argument set' which is probably due to the fact that the 'end_date' is not actually a date:
=TODAY() + NETWORKDAY(TODAY(), NETWORKDAYS([Expected Days Until Completion]@row))
If someone could help me work this out, I would really appreciate it! I have already figured out how to pull this data into a secondary sheet with Index/Match and Index/Collect, but I am struggling with this and it should be simple. I think I am making it harder than it needs to be. Thank you in advance for your time!!!
Best Answer
-
JamesB ✭✭
I believe this will work based on your ask.
In your Expected Days to Completion, you need to use a round formula to make it a whole number.
=Round([Work Order QTY]@row - [Current FG Units]@row) / [Planned QTY/Hour]@row) / [Hours Per Day]@row,0)
Then in your Est Completion Date, you should be able to use
=WORKDAY([Scheduled FPA]@row, [Expected Days Until Completion]@row)
Answers
-
JamesB ✭✭
I believe this will work based on your ask.
In your Expected Days to Completion, you need to use a round formula to make it a whole number.
=Round([Work Order QTY]@row - [Current FG Units]@row) / [Planned QTY/Hour]@row) / [Hours Per Day]@row,0)
Then in your Est Completion Date, you should be able to use
=WORKDAY([Scheduled FPA]@row, [Expected Days Until Completion]@row)
-
Taylor Mauzy ✭✭
Hello@JamesB,
Thank you for taking the time to reply. I tried what you showed above and was able to get it working, however, rounding the days will lead to overestimation/underestimation since rounding ends up meaning more/less depending on the value. If I can find a way to use hours, as opposed to days, then I will be able to achieve exactly what I set out to do. Do you have any thoughts for how to do this using hours? I will wait to see if I can any other answers from you or others, but I will make sure to close out the question once I figure it out.
-
JamesB ✭✭
@Taylor MauzyWouldn't you then just take your Expected Days Until Completion and multiply it by the number of working hours in the day?
=([Expected Days Until Completion]@row*8)
-
Taylor Mauzy ✭✭
@JamesBI tried that and a few other things, but when it's in hours, it adds those as days. I think that is probably a limitation of the WORKDAY formula. I tried looking at NETWORKDAY(S) and that appears to have the same issue. I will have to try and think of a creative way to solve this using other formulas, but I will give you the answer based off your first response. It has gotten me very close to where I am needing to be, I just need to find a way around the rounding leading to the days being short/long. Thank you for your help!
Help Article Resources
Categories
Check out theFormula Handbook template!
I figured it out! Updated formula to get the 2 decimal places as well.<\/p>
=\"We are at \" + IFERROR(ROUND([% closed rate]@row * 100, 2), \"//www.santa-greenland.com/community/discussion/108747/\") + \"% closed rate on ticket status for the month of \" + Month@row<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":108861,"type":"question","name":"IF\/AND Formula","excerpt":"Formulas are the bane of my existence and I really need to take a class! Today I'm trying to set up a formula to throw a flag when 2 conditions are met. I want a red ball when I have not received an invoice and the invoice due date is within 30 days. I know I'm close since I've gone from \"unparsable\" to \"incorrect…","snippet":"Formulas are the bane of my existence and I really need to take a class! Today I'm trying to set up a formula to throw a flag when 2 conditions are met. I want a red ball when I…","categoryID":322,"dateInserted":"2023-08-11T16:27:44+00:00","dateUpdated":null,"dateLastComment":"2023-08-11T17:49:45+00:00","insertUserID":120231,"insertUser":{"userID":120231,"name":"Pamela Wagner","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Pamela%20Wagner","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T17:47:38+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":null,"lastUserID":120231,"lastUser":{"userID":120231,"name":"Pamela Wagner","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Pamela%20Wagner","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T17:47:38+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":54,"score":null,"hot":3383549849,"url":"https:\/\/community.smartsheet.com\/discussion\/108861\/if-and-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108861\/if-and-formula","format":"Rich","lastPost":{"discussionID":108861,"commentID":390268,"name":"Re: IF\/AND Formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/390268#Comment_390268","dateInserted":"2023-08-11T17:49:45+00:00","insertUserID":120231,"insertUser":{"userID":120231,"name":"Pamela Wagner","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Pamela%20Wagner","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T17:47:38+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-11T17:48:48+00:00","dateAnswered":"2023-08-11T17:12:43+00:00","acceptedAnswers":[{"commentID":390261,"body":"
You were, indeed, very close.<\/p>
=IF([Invoice Received?]@row = 0, IF(AND([Renewal Date]@row >= TODAY(), [Renewal Date]@row <= TODAY(+30)), \"Red\"))<\/p>"},{"commentID":390264,"body":"