计算工时的公式

工作hrs.jpg


大家好!

请参阅附上的照片上面

我正在寻找一种方法来计算我的员工每天的工作时间。

Col名称(Shift Start和Shift End)在24小时内按下菜单

(小时和分钟用冒号分隔)

我需要一个公式列(工作/小时),计算员工的工作时间的数量,并考虑24小时格式的情况下,在两个不同的日子的转变。

例如:

员工在18:00(晚上)开始轮班,03:00(早上)结束轮班。我们需要计算工作小时数和分钟数的公式,即(8小时50分钟)

如果相反,计算相同的时间(晚上开始和第二天早上结束)

谢谢你的帮助

希望有一天SmartSheet能够开发出一种列式的日期/时间功能和带有自动化功能的时间功能,我已经等了很多年,希望在SmartSheet上看到这个功能

标签:

答案

帮助文章参考资料欧宝体育app官方888

想要直接在智能表中练习使用公式吗?

请查看公式手册模板!
@Kirsteen Leckie<\/a> <\/p>

I made some tweaks to the formula, please try below<\/p>

=IF([Client review Required]@row = \"Yes\", IF([Actual Submit Date]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"Pending\", (IF([Actual Compete date]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"Internal Review\", (IF([Actual Date to Client]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"Send To Client\", (IF([Actual Client comments]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"Client Review\", (IF([Actual Piramal Response]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"Addressing Comments\", (IF([Actual Final Client Approval]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"Client Approval\", (IF([Actual submission to QA]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"QA Review\", (IF([Actual Final or QA Approval]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"QA Review\", \"Approved\"))))))))))))))), IF([Client review Required]@row = \"No\", IF([Actual Final or QA Approval]@row = \"//www.santa-greenland.com/community/discussion/104920/\", \"QA Review\", \"Approved\")))\n<\/pre>"}]}},"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":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":106601,"type":"question","name":"Please can someone help with this formula","excerpt":"I am trying to calculate how many \"qualification\" stages there are in a given fiscal period for example Q4-2023, I know I am missing something but every variation of Count if formulas I have tried do not seem to work, it will be something really simple, that I am trying to make to complicated, but any help will be…","categoryID":322,"dateInserted":"2023-06-19T15:46:15+00:00","dateUpdated":"2023-06-19T15:48:22+00:00","dateLastComment":"2023-06-19T15:54:15+00:00","insertUserID":150472,"insertUser":{"userID":150472,"name":"Mel C","url":"https:\/\/community.smartsheet.com\/profile\/Mel%20C","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T18:04:03+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":150472,"lastUserID":144360,"lastUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T22:11:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":28,"score":null,"hot":3374380230,"url":"https:\/\/community.smartsheet.com\/discussion\/106601\/please-can-someone-help-with-this-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106601\/please-can-someone-help-with-this-formula","format":"Rich","lastPost":{"discussionID":106601,"commentID":381177,"name":"Re: Please can someone help with this formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381177#Comment_381177","dateInserted":"2023-06-19T15:54:15+00:00","insertUserID":144360,"insertUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T22:11:33+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\/MRW4VGYRA7HG\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-19T17:03:50+00:00","dateAnswered":"2023-06-19T15:54:15+00:00","acceptedAnswers":[{"commentID":381177,"body":"

It needs to be a countifs instead of countif<\/p>

=COUNTIFS([column4]2:[column4]5,\"Qualification\",[column5]2:[column5]5,\"Q4-2023\")<\/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":106590,"type":"question","name":"Helper checkbox not working on reference sheet","excerpt":"I have multiple line items for a order in one sheet(Request Sheet) and in another sheet (Order sheet) where I have clubbed all the items in single row, based on the order ID from request sheet to order sheet I want to check the Quantity checkbox and update in the Order sheet, I tried index match formula but its not working…","categoryID":322,"dateInserted":"2023-06-19T11:07:26+00:00","dateUpdated":null,"dateLastComment":"2023-06-19T16:56:49+00:00","insertUserID":153826,"insertUser":{"userID":153826,"name":"Domnic Victor","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Domnic%20Victor","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T15:46:33+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":144360,"lastUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T22:11:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":43,"score":null,"hot":3374368455,"url":"https:\/\/community.smartsheet.com\/discussion\/106590\/helper-checkbox-not-working-on-reference-sheet","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106590\/helper-checkbox-not-working-on-reference-sheet","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106590,"commentID":381185,"name":"Re: Helper checkbox not working on reference sheet","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381185#Comment_381185","dateInserted":"2023-06-19T16:56:49+00:00","insertUserID":144360,"insertUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T22:11:33+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\/TUXJPHZT569J\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-19T16:01:16+00:00","dateAnswered":"2023-06-19T13:27:24+00:00","acceptedAnswers":[{"commentID":381141,"body":"

The issue is it doesn't know whether to check the box or not check the box because there are multiple ORD0241 on the Request sheet and one is checked and one is not checked. If I am understanding correctly you want the box checked if any of the ORD0241 are checked on the request sheet. If that is correct you would need to use a countifs formula with an If formula<\/p>

=IF(COUNTIFS({Order ID reference from request sheet},[Order ID]@row,{Quantity Helper reference from request sheet},1)>=1,1,0)<\/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":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

公式和函数趋势