按月安排的工时公式
答案
-
吉纳维芙P。 员工管理
我的方法是,首先找出每个月的工作天数,然后乘以“每天的小时数”。
我们可以使用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 "))))
让我知道这是否对你有效!
欢呼,
吉纳维芙
0 -
保罗新来的 ✭✭✭✭✭✭
除了@Genevieve P。的解决方案……
因为SS没有EOM函数,我们基本上找到了下个月的第一天,并从中减去1天。
=IFERROR(DATE(YEAR([起始日期]@row), MONTH([起始日期]@row) + 1,1), DATE(YEAR([起始日期]@row) + 1,1)) - 1
thinkspi.com
1 -
保罗新来的 ✭✭✭✭✭✭
@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
1 -
吉纳维芙P。 员工管理0
-
哇,你们都是巫师!它工作!
然而,我只是在寻找返回工作时间的公式,这样我们就可以合计每个月所有工作的小时数。能否提供修改后的配方?
我的歉意。我的例子不清楚。我写出了天数和小时数,以显示如何用公式分割当月的工作天数,以得到当月的计划小时数。
0 -
吉纳维芙P。 员工管理
你每天有固定的工作时间吗?例如:每天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)+ "小时")))
这就是你要找的东西吗?
0 -
@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))))
或者我们可以用另一种方法。也许可以用当月生产的工时除以项目的总工时得到当月生产的工时的百分比然后乘以总工时?
0 -
保罗新来的 ✭✭✭✭✭✭
您是否为2月、3月、4月等等提供了额外的专栏?
你是如何使用这些总数的?它们是严格意义上的信息,还是你将它们放入图表的指标表中?
你可能需要考虑的最长时间是多少?
thinkspi.com
0 -
嗨@Paul新来的!是的,我每个月有一个专栏。从那里,我们将把每月的总数拉到生产仪表板上的度量表中,这样我们就可以看到我们这个月的预订情况。ob欧宝娱乐app手机下载最长的时间是4-5个月。谢谢你的介入。感觉我们很接近了!
0 -
保罗新来的 ✭✭✭✭✭✭
嗯…好的。我觉得我们应该很快就能找到解决办法了。
我们知道我们需要工作日。函数的开始日期要么是每月的第一天,要么是操作的开始日期,这取决于行的开始日期(和结束日期)是什么时候。我会坚持一月份的公式,因为其他月份只需要做一些基本的调整。
=净工作日(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
0 -
保罗新来的 ✭✭✭✭✭✭
看起来我漏掉了两个方括号,我添加了一个=(测试公式是当前月份的)。
=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
0
帮助文章资源欧宝体育app官方888
You would use<\/p>
=PARENT([Focus Area]@row)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"reasonUpdated":"","dateUpdated":"2022-08-05 20:21:04","updateUser":{"userID":120623,"name":"Umesh Shah","url":"https:\/\/community.smartsheet.com\/profile\/Umesh%20Shah","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!B_DAgW7inuQ!GutBH5L31vo!a4sw_iKY2Cf","dateLastActive":"2022-08-05T20:19:13+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":[]},{"discussionID":93984,"type":"question","name":"Multiselect Dropdown Parsing","excerpt":"Hello all, I have 3 columns in a sheet. 1 is a multi-select dropdown (\"MSD\"), 1 is a single contact (\"SC\"), and 1 is a multi-select contact (\"MSC\"). In the SC, I want to take the first dropdown value from the MSD and use it to index match a value from another sheet. In the MSC, then I want to take the remaining values from…","categoryID":322,"dateInserted":"2022-08-05T17:28:01+00:00","dateUpdated":null,"dateLastComment":"2022-08-05T19:48:02+00:00","insertUserID":151077,"insertUser":{"userID":151077,"name":"Allen M Vance","url":"https:\/\/community.smartsheet.com\/profile\/Allen%20M%20Vance","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wvjQf0zrtpU!HVPSXzyfi_0!-X5Gyhg_Kh5","dateLastActive":"2022-08-05T22:14:05+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2022-08-05T20:10:09+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":10,"score":null,"hot":3319449963,"url":"https:\/\/community.smartsheet.com\/discussion\/93984\/multiselect-dropdown-parsing","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/93984\/multiselect-dropdown-parsing","format":"Rich","lastPost":{"discussionID":93984,"commentID":338850,"name":"Re: Multiselect Dropdown Parsing","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/338850#Comment_338850","dateInserted":"2022-08-05T19:48:02+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2022-08-05T20:10:09+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-08-05T22:14:17+00:00","dateAnswered":"2022-08-05T19:48:02+00:00","acceptedAnswers":[{"commentID":338850,"body":"
Technically yes. You can pull these values in based on the multi-select dropdown, but...<\/p>
<\/p>
We cannot currently use formulas to populate multiple USABLE contacts in a single cell even if the column is set to allow multiple. It will simply generate a text string and won't be usable in automations for notifications, update requests, etc..<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"reasonUpdated":"","dateUpdated":"2022-08-05 22:14:17","updateUser":{"userID":151077,"name":"Allen M Vance","url":"https:\/\/community.smartsheet.com\/profile\/Allen%20M%20Vance","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wvjQf0zrtpU!HVPSXzyfi_0!-X5Gyhg_Kh5","dateLastActive":"2022-08-05T22:14:05+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":[]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">