按月安排的工时公式

ob欧宝娱乐app手机下载生产跟踪Question.png

根据项目的开始和结束日期,我们试图确定一个月为特定项目安排了多少小时。没有EOM功能,我不太清楚如何设置最大/最小值。有人能帮忙吗?

答案

  • 吉纳维芙P。
    吉纳维芙P。 员工管理

    @SarahALLBRiGHT

    我的方法是,首先找出每个月的工作天数,然后乘以“每天的小时数”。

    我们可以使用MONTH函数来确定Start Date是否在您要查找的月份中,如果是,则使用净工作日功能以找出开始日期至月尾的工作日数。

    =IF(MONTH([起始日期]@行)= 3,NETWORKDAYS([起始日期]@行,日期(2022,03,31))

    注意我是如何使用的日期函数来确定月底的时间。


    然后我们可以把这个数字加上小时数,用*乘以每天的小时数:

    =IF(MONTH([开始日期]@行)= 3,NETWORKDAYS([开始日期]@行,日期(2022,03,31))+ " days & " + (NETWORKDAYS([开始日期]@行,日期(2022,03,31))*[每天的小时数]@行)+ " Hours "


    但是如果开始日期不是在那个月,我们需要检查是否结束日期就在那个月。如果是,我们可以找到指定的从三月初到结束日期的工作日数:

    如果(月(结束@row = 3, NETWORKDAYS(日期(2022年03 01),结束日期]@row)

    再加上工作时间:

    IF(MONTH([结束日期]@行)= 3,NETWORKDAYS(Date(2022, 03,01),[结束日期]@行)+ " days & " + (NETWORKDAYS(Date(2022, 03,01),[结束日期]@行)*[每天的小时数]@行)+ " Hours "


    否则,如果两个日期都不在Month中,我们需要查看Start是否在Month中早些时候比我们的月,和结束是晚些时候比我们的月,意味着整个月都在我们的范围内:

    IF(AND([开始日期]@行< Date(2022, 03,01),[结束日期]@行> Date (2022, 03,31)), NETWORKDAYS(Date (2022, 03,01), Date (2022, 03,31)) + " days & " + (NETWORKDAYS(Date (2022, 03,01), Date(2022, 03,31)) *[每天的小时]@行)+ " Hours "


    完整的公式所有3种可能性:

    =如果(月(开始日期@row) = 3,工作日(开始日期@row,日期(2022年03,31))+“&”+(工作日(开始日期@row,日期(2022年03,31))*(小时/天)@row) +“小时”,如果月([结束日期]@row) = 3,工作日(日期(2022、03 01),[结束日期]@row) +“&”+(工作日(日期(2022、03 01),[结束日期]@row) *(小时/天)@row) +“小时”,如果(和((开始日期)@row <日期(2022、03 01),(结束日期)@row >日期(2022年03,31)),工作日(日期(2022、03 01),日期(2022年0331)) + " days & " + (NETWORKDAYS(DATE(2022, 03,01), DATE(2022, 03,31)) *[每天的小时]@row) + " Hours "))))


    让我知道这是否对你有效!

    欢呼,

    吉纳维芙

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    除了@Genevieve P。的解决方案……


    因为SS没有EOM函数,我们基本上找到了下个月的第一天,并从中减去1天。

    =IFERROR(DATE(YEAR([起始日期]@row), MONTH([起始日期]@row) + 1,1), DATE(YEAR([起始日期]@row) + 1,1)) - 1

    thinkspi.com

  • 吉纳维芙P。
    吉纳维芙P。 员工管理

    哈哈,@Paul新来的用一个更简洁的公式挽救了局面。谢谢你!

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    @Genevieve P。哦。这绝对不能取代整个公式。这就是如何严格执行Smartsheet中的EOM功能。哈哈。这会让公式变长因为它会自动计算月的最后一天。


    =IF(MONTH([开始日期]@行)= 3,NETWORKDAYS([开始日期]@行,IFERROR(DATE(YEAR([Start DATE]@row), MONTH([Start DATE]@row) + 1,1), DATE(YEAR([Start DATE]@row) + 1,1)) - 1) + " days & " + (NETWORKDAYS([开始日期]@row,IFERROR(DATE(YEAR([Start DATE]@row), MONTH([Start DATE]@row) + 1,1), DATE(YEAR([Start DATE]@row) + 1,1)) - 1) *[每天的小时]@行)+ " Hours ", IF(MONTH([结束日期]@行)= 3,NETWORKDAYS(Date(2022, 03,01),[结束日期]@行)+ " days & " + (NETWORKDAYS(Date(2022, 03,01),[结束日期]@行)*[每天的小时]@行)+ " Hours ", IF(AND([开始日期]@行< Date(2022, 03,01),[结束日期]@行>IFERROR(DATE(YEAR([Start DATE]@row), MONTH([Start DATE]@row) + 1,1), DATE(YEAR([Start DATE]@row) + 1,1)) - 1),净工作日(日期(2022,03,01),IFERROR(DATE(YEAR([Start DATE]@row), MONTH([Start DATE]@row) + 1,1), DATE(YEAR([Start DATE]@row) + 1,1)) - 1) +“天&”+(工作日(日期(2022,03,01),IFERROR(DATE(YEAR([Start DATE]@row), MONTH([Start DATE]@row) + 1,1), DATE(YEAR([Start DATE]@row) + 1,1)) - 1*[每天的小时数]@行)+ "小时")))

    thinkspi.com

  • 哇,你们都是巫师!它工作!

    然而,我只是在寻找返回工作时间的公式,这样我们就可以合计每个月所有工作的小时数。能否提供修改后的配方?

    我的歉意。我的例子不清楚。我写出了天数和小时数,以显示如何用公式分割当月的工作天数,以得到当月的计划小时数。

  • 吉纳维芙P。
    吉纳维芙P。 员工管理

    @SarahALLBRiGHT

    你每天有固定的工作时间吗?例如:每天8小时?如果你这样做了,我们可以用NETWORKDAYS乘以你设定的小时数来计算那个月的工作时间。

    在我们的例子中,我们乘以[Hours per Day]@row,但你可以直接在公式中使用8。

    我们还可以去掉“# days”位,使其更短。

    =IF(MONTH([开始日期]@行)= 3,(NETWORKDAYS([开始日期]@行),IFERROR(Date (YEAR([开始日期]@行),MONTH([开始日期]@行)+ 1,1),Date (YEAR([开始日期]@行)+ 1,1))- 1)* 8)+ " hours", IF(MONTH([结束日期]@row) = 3, (NETWORKDAYS(Date(2022, 03,01),[结束日期]@row)* 8)+ " hours", IF(AND([开始日期]@行< Date(2022, 03,01),[结束日期]@行> IFERROR(Date (YEAR([开始日期]@行),MONTH([开始日期]@行)+ 1,1),Date (YEAR([开始日期]@行)+ 1,1)- 1),(NETWORKDAYS(Date (2022, 03,01), IFERROR(Date (YEAR([开始日期]@行),MONTH([开始日期]@行)+ 1,1),Date (YEAR([开始日期]@行)+ 1,1))- 1)*8)+ "小时")))


    这就是你要找的东西吗?

  • @Genevieve P。不完全是,我们可能每天都有很多人在做这个项目。所以生产的小时数是全体人员人数乘以一天8小时。下面是带有实际列名的工作表布局。如果你能帮我算出每个月生产/预订的小时数,我会很感激。

    我试图适应你以前的公式,但你可以看到它返回更多的小时预定比总工时。不知道如何纠正。

    =IF(MONTH([Ops开始日期]@row) = 1, (NETWORKDAYS([Ops开始日期]@row, Date(2022, 1,31)) *[每天生产的工时]@row), IF(MONTH([完成日期]@row) = 1, (NETWORKDAYS(Date(2022, 1,1),[完成日期]@row) *[每天生产的工时]@row), IF(AND([Ops开始日期]@row < Date(2022, 1,1),[完成日期]@row > Date (2022, 1,31)), (NETWORKDAYS(Date (2022, 1,1), Date(2022, 1,31)) *[每天生产的工时]@row))))

    每个月的工时和收入。jpg

    或者我们可以用另一种方法。也许可以用当月生产的工时除以项目的总工时得到当月生产的工时的百分比然后乘以总工时?

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    您是否为2月、3月、4月等等提供了额外的专栏?


    你是如何使用这些总数的?它们是严格意义上的信息,还是你将它们放入图表的指标表中?


    你可能需要考虑的最长时间是多少?

    thinkspi.com

  • @Paul新来的!是的,我每个月有一个专栏。从那里,我们将把每月的总数拉到生产仪表板上的度量表中,这样我们就可以看到我们这个月的预订情况。ob欧宝娱乐app手机下载最长的时间是4-5个月。谢谢你的介入。感觉我们很接近了!

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    嗯…好的。我觉得我们应该很快就能找到解决办法了。


    我们知道我们需要工作日。函数的开始日期要么是每月的第一天,要么是操作的开始日期,这取决于行的开始日期(和结束日期)是什么时候。我会坚持一月份的公式,因为其他月份只需要做一些基本的调整。

    =净工作日(IF(MONTH([Ops Start Date]@row) = 1, [Ops Start Date]@row, IF(AND(MONTH([Ops Start Date]@row) < 1, MONTH(Complete Date]@row) >= 1), Date (202,01,01)))



    函数的结束日期要么是完成日期,要么是当月的最后一天。

    =NETWORKDAYS(IF(MONTH([Ops Start Date]@row) = 1, [Ops Start Date]@row, IF(AND(MONTH([Ops Start Date]@row) < 1, MONTH(Complete Date]@row) >= 1), Date (202,01,01)),IF(MONTH([完成日期]@行)= 1,[完成日期]@行,IF(AND(MONTH([操作开始日期]@行)< 1,MONTH(完成日期]@行)>= 1),Date (202,01,31)))


    然后,如果没有正确填充日期(因为在1月份内没有时间),则使用IFERROR输出零,并乘以每天生产的小时数。

    IFERROR (NETWORKDAYS(IF(MONTH([Ops Start Date]@row) = 1, [Ops Start Date]@row, IF(AND(MONTH([Ops Start Date]@row) < 1, MONTH(MONTH([Ops Start Date]@row) >= 1), Date (2022, 01,01)), IF(MONTH([Ops Start Date]@row) = 1, [completion Date]@row, IF(AND(MONTH([Ops Start Date]@row) < 1, MONTH(MONTH([Ops Start Date]@row) >= 1), Date (2012,01,31))))*[每天生产的小时数]@行



    这个怎么样?要对每个不同的月份进行调整,您应该能够更新我们要比较的月份的数字以及每个DATE函数的月份部分。


    不过我还没有机会测试这个。如果我在你之前有机会,我会回答,它对我有用或一个不同的公式。

    thinkspi.com

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭
    编辑04/14/22

    看起来我漏掉了两个方括号,我添加了一个=(测试公式是当前月份的)。


    =IFERROR(NETWORKDAYS(IF(MONTH([Ops Start Date]@row) = 4, [Ops Start Date]@row, IF(AND(MONTH([Ops Start Date]@row) < 4, MONTH([Ops Start Date]@row) >= 4), Date (22,4,1)), IF(AND(MONTH([Ops Start Date]@row) = 4, [completion Date]@row), IF(AND(MONTH([Ops Start Date]@row) <= 4, MONTH([Ops Start Date]@row) >= 4), Date(22,4,30)))), 0) *[每天生产的小时数]@row


    还要记住…如果开始日期或结束日期在不同的年份,这将不起作用。如果你需要适应这一点,那么我的建议是稍微调整一下。如果是这样的话,请让我知道,如果有兴趣的话,我很乐意帮助您了解。

    thinkspi.com

帮助文章资源欧宝体育app官方888

@Dan B_ID<\/a> <\/p>

Try this.<\/p>

=<\/p>

IF(Month@row = \"Jan\", 1, <\/p>

IF(Month@row = \"Feb\", 2, <\/p>

IF(Month@row = \"Mar\", 3, <\/p>

IF(Month@row = \"Apr\", 4, <\/p>

IF(Month@row = \"May\", 5, <\/p>

IF(Month@row = \"Jun\", 6, <\/p>

IF(Month@row = \"Jul\", 7, <\/p>

IF(Month@row = \"Aug\", 8, <\/p>

IF(Month@row = \"Sep\", 9, <\/p>

IF(Month@row = \"Oct\", 10,<\/p>

IF(Month@row = \"Nov\", 11,<\/p>

IF(Month@row = \"Dec\", 12)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-29 22:27:49","updateUser":{"userID":150538,"name":"Preston P.","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Preston%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/nWVKDFTEFOKBN.png","dateLastActive":"2022-09-29T22:27:52+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"}}},"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":96072,"type":"question","name":"Using \"Current User\" as a filter in reports","excerpt":"Can you use \"Current User\" as a filter if the \"Assigned To\" field has more than one person assigned? Thanks!","categoryID":322,"dateInserted":"2022-09-29T20:25:32+00:00","dateUpdated":null,"dateLastComment":"2022-09-29T20:32:09+00:00","insertUserID":141331,"insertUser":{"userID":141331,"name":"deb_63_hydracor","url":"https:\/\/community.smartsheet.com\/profile\/deb_63_hydracor","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AATXAJzYn23TqUOGU8A4PW0HalCwzLK5YNQsVxHwYcgL=s96-c","dateLastActive":"2022-09-29T20:48:31+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":123243,"lastUser":{"userID":123243,"name":"A Rose","title":"","url":"https:\/\/community.smartsheet.com\/profile\/A%20Rose","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-29T21:19:26+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":20,"score":null,"hot":3328967261,"url":"https:\/\/community.smartsheet.com\/discussion\/96072\/using-current-user-as-a-filter-in-reports","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/96072\/using-current-user-as-a-filter-in-reports","format":"Rich","tagIDs":[265],"lastPost":{"discussionID":96072,"commentID":345430,"name":"Re: Using \"Current User\" as a filter in reports","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/345430#Comment_345430","dateInserted":"2022-09-29T20:32:09+00:00","insertUserID":123243,"insertUser":{"userID":123243,"name":"A Rose","title":"","url":"https:\/\/community.smartsheet.com\/profile\/A%20Rose","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-29T21:19:26+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/W3RIFP1RIXF6\/screen-shot-2022-09-29-at-4-24-34-pm.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Screen Shot 2022-09-29 at 4.24.34 PM.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-09-29T20:49:18+00:00","dateAnswered":"2022-09-29T20:32:09+00:00","acceptedAnswers":[{"commentID":345430,"body":"

Yes, that works,<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-29 20:49:18","updateUser":{"userID":141331,"name":"deb_63_hydracor","url":"https:\/\/community.smartsheet.com\/profile\/deb_63_hydracor","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AATXAJzYn23TqUOGU8A4PW0HalCwzLK5YNQsVxHwYcgL=s96-c","dateLastActive":"2022-09-29T20:48:31+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}}},"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":[{"tagID":265,"urlcode":"Reports","name":"Reports"}]},{"discussionID":96058,"type":"question","name":"How to subtract quantities from one sheet via forms to another sheet with total quantities","excerpt":"My issue is this: I have a master sheet with material types (A1,A2,A3 etc..) and total material quantities (#'s). The other sheet I am using is updated via forms. The form is used for distributing materials and requires a material type, and material quantity before submission. Once submitted I would like the quantity to be…","categoryID":322,"dateInserted":"2022-09-29T18:02:41+00:00","dateUpdated":"2022-09-29T18:08:24+00:00","dateLastComment":"2022-09-29T18:59:37+00:00","insertUserID":153001,"insertUser":{"userID":153001,"name":"phildyche","url":"https:\/\/community.smartsheet.com\/profile\/phildyche","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ALm5wu0OX5MsVCXQo1l0JPa_g5_ouK6_DwPZmv9ZQM41=s96-c","dateLastActive":"2022-09-29T18:55:18+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":153001,"lastUserID":153001,"lastUser":{"userID":153001,"name":"phildyche","url":"https:\/\/community.smartsheet.com\/profile\/phildyche","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ALm5wu0OX5MsVCXQo1l0JPa_g5_ouK6_DwPZmv9ZQM41=s96-c","dateLastActive":"2022-09-29T18:55:18+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":24,"score":null,"hot":3328953738,"url":"https:\/\/community.smartsheet.com\/discussion\/96058\/how-to-subtract-quantities-from-one-sheet-via-forms-to-another-sheet-with-total-quantities","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/96058\/how-to-subtract-quantities-from-one-sheet-via-forms-to-another-sheet-with-total-quantities","format":"Rich","tagIDs":[204,231,254,319,334],"lastPost":{"discussionID":96058,"commentID":345412,"name":"Re: How to subtract quantities from one sheet via forms to another sheet with total quantities","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/345412#Comment_345412","dateInserted":"2022-09-29T18:59:37+00:00","insertUserID":153001,"insertUser":{"userID":153001,"name":"phildyche","url":"https:\/\/community.smartsheet.com\/profile\/phildyche","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ALm5wu0OX5MsVCXQo1l0JPa_g5_ouK6_DwPZmv9ZQM41=s96-c","dateLastActive":"2022-09-29T18:55:18+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2022-09-29T22:20:20+00:00","dateAnswered":"2022-09-29T18:21:02+00:00","acceptedAnswers":[{"commentID":345405,"body":"

Hello, sounds like you're in need of a SUMIF<\/a> formula. <\/p>

Your master sheet could have a [Quantity Used] column with the formula written below. You'll need to create cross sheet references to your 'material request' form sheet. One for the material type column and another for the quantity. <\/p>

=SUMIF( {material type}, \"A1\", {quantity} )<\/code> <\/p>


<\/p>

This could then be used to calculate a [Current Quantity] column with a formula like so<\/p>

= [Start Quantity]@row - [Quantity Used]@row<\/code><\/p>


<\/p>

Hope this points you in the right direction!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-29 22:20:21","updateUser":{"userID":150538,"name":"Preston P.","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Preston%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/nWVKDFTEFOKBN.png","dateLastActive":"2022-09-29T22:27:52+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"}}},"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":[{"tagID":204,"urlcode":"Forms","name":"Forms"},{"tagID":231,"urlcode":"Cell linking","name":"Cell linking"},{"tagID":254,"urlcode":"Formulas","name":"Formulas"},{"tagID":319,"urlcode":"functionality","name":"functionality"},{"tagID":334,"urlcode":"automations","name":"Automations"}]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">