计算工作日,不包括周末(经过的天数)

我找到了解决办法。”如何计算机票的开放/关闭天数,但是,我需要的公式只计算工作日,不包括周末。我尝试了几种不同的方法,但不能让它正常工作。

任何帮助将非常感激!

这是一个有效的公式,但我只需要计算工作日

=IF([项目完成日期]@row <> "",[项目完成日期]@row -[项目开始日期]@row, IF([项目开始日期]@row <> "",今天()-[项目开始日期]@row))


image.png"height=


最佳答案

  • 卡森Penticuff"class=
    ✓回答

    这两种方法都可以。他们只是从不同的方向接近逻辑。


    =IF([项目完成日期]@row <> "", NETWORKDAYS([项目开始日期]@row,[项目完成日期]@row), NETWORKDAYS([项目开始日期]@row, TODAY()))


    =IF([项目完成日期]@row = "", NETWORKDAYS([项目开始日期]@row, TODAY()), NETWORKDAYS([项目开始日期]@row,[项目完成日期]@row))

答案

  • 保罗新来的"class=
    保罗新来的 ✭✭✭✭✭✭
  • 你好Paul,谢谢你的反馈,但是,我不想“返回工作天数”两次约会之间

    这是经过的天数(还没有结束日期)。正如你在上面的截图中所看到的,没有项目完成日期,但它仍然会计算天数。

    我上面展示的公式工作得很好,我确实注意到我的SmartSheet中的天数从昨天到今天自动增加了一天,但我不想算周末。

    再次感谢你,希望你能帮上忙!

    如果你有解决方案,你能告诉我怎么写吗?我不擅长创建公式,但我擅长发现它们:)并根据它们的复杂程度进行相应的调整。

  • 保罗新来的"class=
    保罗新来的 ✭✭✭✭✭✭

    正确的。您可以使用NETWORKDAYS函数代替Date减去Date。其中的另一个“日期”可以是今天。


    因此,不是说[完成日期]-[开始日期]或今天-[开始日期]取决于IF的真/假,你会说[完成日期]和[开始日期]之间的NETWORKDAYS或今天()和[开始日期]之间的NETWORKDAYS。

    thinkspi.com

  • 谢谢,保罗,但我完全迷路了。就像我说的,我不擅长写公式,我擅长找公式和调整,但我还是不明白这个公式应该是什么样子。我从上面尝试了你的信息,但它不起作用,因为我知道我没有在正确的上下文中插入正确的信息。


    不管怎样,谢谢你

  • 卡森Penticuff"class=
    ✓回答

    这两种方法都可以。他们只是从不同的方向接近逻辑。


    =IF([项目完成日期]@row <> "", NETWORKDAYS([项目开始日期]@row,[项目完成日期]@row), NETWORKDAYS([项目开始日期]@row, TODAY()))


    =IF([项目完成日期]@row = "", NETWORKDAYS([项目开始日期]@row, TODAY()), NETWORKDAYS([项目开始日期]@row,[项目完成日期]@row))

  • 谢谢你,卡森,他们都做得很好!

    哦吼!

    这么多年来,我一直在研究不同情况下的公式,并进行相应的调整,但这个公式把我难住了。

    再次感谢!

Might be you need to move the first )<\/p>

try this<\/p>

=INDEX(COLLECT({OPK Monthly Report 22-23 Unfilled 0-3}, {OPK Monthly Report 22-23 Month}, \"April\", {OPK Monthly Report 22-23 Grantee Name}, Grantee@row), 1)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":106563,"type":"question","name":"Embed Smartsheet fields into Automation emails","excerpt":"It would be great if we could embed Smartsheet fields into the body of an automation email. For example, I have several emails going to different departments and if the auto email could be set-up like below, it would save time, clicks, confusion, etc.: <> has submitted a new request. The request…","categoryID":321,"dateInserted":"2023-06-16T18:25:31+00:00","dateUpdated":"2023-06-19T08:27:13+00:00","dateLastComment":"2023-06-16T18:54:24+00:00","insertUserID":156053,"insertUser":{"userID":156053,"name":"jl.furstenberg","url":"https:\/\/community.smartsheet.com\/profile\/jl.furstenberg","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-16T18:52:38+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":91566,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-06-19T12:08:16+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":33,"score":1,"hot":3373883695,"url":"https:\/\/community.smartsheet.com\/discussion\/106563\/embed-smartsheet-fields-into-automation-emails","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106563\/embed-smartsheet-fields-into-automation-emails","format":"Rich","tagIDs":[334,510],"lastPost":{"discussionID":106563,"commentID":381070,"name":"Re: Embed Smartsheet fields into Automation emails","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381070#Comment_381070","dateInserted":"2023-06-16T18:54:24+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-06-19T12:08:16+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Using Smartsheet","url":"https:\/\/community.smartsheet.com\/categories\/using-smartsheet"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-19T08:27:32+00:00","dateAnswered":"2023-06-16T18:49:50+00:00","acceptedAnswers":[{"commentID":381065,"body":"

Hi @jl.furstenberg<\/a> <\/p>

I hope you're well and safe!<\/p>

It's already possible with the Placeholder feature.<\/p>

\n \n https:\/\/help.smartsheet.com\/articles\/2479256-customize-the-content-of-your-alerts-and-requests\n <\/a>\n<\/div>

Would that work\/help? <\/p>

I hope that helps!<\/p>

Be safe, and have a fantastic weekend!<\/p>

Best,<\/p>

Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p>

Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":1},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":334,"urlcode":"automations","name":"Automations"},{"tagID":510,"urlcode":"email-notifications","name":"Email Notifications"}]},{"discussionID":106543,"type":"question","name":"Automation and Email Recipient","excerpt":"Hello, Is the email notification through the automation criteria only available to recipients with Smartsheet accounts or to anyone whose email address was entered in the recipient field? Thank you.","categoryID":321,"dateInserted":"2023-06-16T03:56:51+00:00","dateUpdated":null,"dateLastComment":"2023-06-16T04:30:53+00:00","insertUserID":162449,"insertUser":{"userID":162449,"name":"CharMu","url":"https:\/\/community.smartsheet.com\/profile\/CharMu","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-16T04:56:20+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":162449,"lastUser":{"userID":162449,"name":"CharMu","url":"https:\/\/community.smartsheet.com\/profile\/CharMu","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-16T04:56:20+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":45,"score":null,"hot":3373778864,"url":"https:\/\/community.smartsheet.com\/discussion\/106543\/automation-and-email-recipient","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106543\/automation-and-email-recipient","format":"Rich","lastPost":{"discussionID":106543,"commentID":380961,"name":"Re: Automation and Email Recipient","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/380961#Comment_380961","dateInserted":"2023-06-16T04:30:53+00:00","insertUserID":162449,"insertUser":{"userID":162449,"name":"CharMu","url":"https:\/\/community.smartsheet.com\/profile\/CharMu","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-16T04:56:20+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Using Smartsheet","url":"https:\/\/community.smartsheet.com\/categories\/using-smartsheet"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-16T04:29:02+00:00","dateAnswered":"2023-06-16T04:24:16+00:00","acceptedAnswers":[{"commentID":380960,"body":"

Hi,<\/p>


<\/p>

You can send notifications to any valid email address. If you're planning to send alerts or reminders with a link to the sheet, the user will not be able to click the link and access it if they do not have a Smartsheet account and not shared to the sheet.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=341&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":5383,"limit":3},"title":"Trending in Using Smartsheet","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

使用Smartsheet的趋势