6个月后(当日)

cpo1
cpo1
编辑12/09/19 公式和函数

各位同事、各位来宾好!我想学习一个公式来检索比已知日期晚六个月的日期;即1月1日至7月1日,2月4日至8月4日。目前,我用的是182天,很接近,但不准确。我也是刚来SS的,所以我现在正在学习语法等,关于函数和公式。帮助是值得感激的。

评论

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

    是的。这是很可能的。最基本的方法是将DATE函数与YEAR、MONTH和DAY函数结合使用,并在月数上加上6。

    =日期(年)([已知日期列]@row)月份([已知日期栏]@row)+ 6,日([已知日期栏])@row))

    然而……这只适用于1月到6月。DATE函数的月份部分中任何大于12的数字都会抛出错误。

    超过12的月份的公式是在年份上加1,然后在月份上减6。

    =日期(年份([已知日期栏]@row)+ 1月份([已知日期栏]@row)- 6,日([已知日期栏])@row))

    有两种方法可以将它们结合起来。一种是使用IF语句,另一种是使用IFERROR语句。它们在上下文中几乎完全相同,只是在语法上略有不同。

    对于IF语句,我们会说:如果已知日期的月份小于或等于6,运行第一个公式否则用第二个公式

    =IF(月([已知日期列])@row)< = 6,日期(年)([已知日期栏]@row),月([已知日期列])@row)+ 6, DAY([已知日期栏])@row))日期(年份([已知日期栏]@row)+ 1,月([已知日期列])@row)- 6日([已知日期栏])@row))

    IFERROR非常相似。基本上说:做,但如果有一个错误,然后做

    = IFERROR (日期(年)([已知日期栏]@row),月([已知日期列])@row)+ 6, DAY([已知日期栏])@row))日期(年份([已知日期栏]@row)+ 1,月([已知日期列])@row)- 6日([已知日期栏])@row))

    thinkspi.com

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭
    编辑06/05/19

    也……为了帮助构建公式和学习语法,您可以使用相当多的资源。欧宝体育app官方888显然你已经找到了社区。我个人从这里学到了很多。

    在解决方案中心中还有一个名为“Smartsheet Formula Examples”的模板(参见附件中的截图,它在解决方案中心中的样子)。您可以下载这个模板,其中包含所有不同的函数以及它们的语法和使用它们的交互式示例。如果您不小心弄乱了工作表中的某些内容,您可以删除它并重新下载模板。

    另一个非常有用的是这个网页在这里.它列出了您可以收到的所有不同的错误消息、它们的含义、原因以及一些基本的故障排除。

    公式Examples.PNG

    thinkspi.com

  • 保罗,谢谢你的帮助。我很感激。我已经说到年份不喜欢改变的部分了,所以你的解释很有帮助。我很快就会解决的。我找到并打开了“智能表格公式示例”,这是一个很大的帮助,我使用了年,月,日(日期功能)。它工作得很好,直到需要改变年份,因为你很清楚。此外,感谢您的帮助参考。我很快也会去看的。

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

    很乐意帮忙!是的

    告诉我结果如何。如果不行,我很乐意继续和你合作。

    thinkspi.com

  • 你好,我想在执行摘要中添加5个月的EOM期。我使用的公式几个月有效,但其他几个月出现了错误。下面是我使用的公式:

    =IFERROR(DATE(YEAR([Period EOM的摘要]@row), MONTH([Period EOM的摘要]@row) + 5, DAY([Period EOM的摘要]@row)), DATE(YEAR([Period EOM的摘要]@row) + 1, MONTH([Period EOM的摘要]@row) - 5, DAY())))

    image.png


  • 凯利摩尔
    凯利摩尔 ✭✭✭✭✭✭

    你好,丹尼尔

    看起来方程中的最后一项是问题所在。它不指向细胞。尝试添加您的列(电子邮件保护), [EOM期间的执行摘要]@row,到日期括号。

    凯利

  • 凯利,

    非常感谢!这就是解决办法:)

  • @Paul新来的嗨,保罗,我希望你不介意我问你一个关于旧话题的问题。我正在使用您发布的以下公式,该公式非常适合在日期上添加10个月,但我似乎无法获得IFERROR部分的工作。你能帮我看一下我哪里出错了吗?

    "=IFERROR(DATE(YEAR([收到的价目表日期]@row), MONTH([收到的价目表日期]@row) + 10, DAY([收到的价目表日期]@row)), DATE(YEAR([收到的价目表日期]@row) + 1, MONTH([收到的价目表日期]@row) - 2, DAY([收到的价目表日期]@row)) "是公式工作正常,但在收到的价目表日期中没有数据时,会出现"无效数据类型"错误。我希望将公式更改为以下内容:

    "=IFERROR(DATE(YEAR([收货价格表日期]@row), MONTH([收货价格表日期]@row) + 10, DAY([收货价格表日期]@row)), DATE(YEAR([收货价格表日期]@row) + 1, MONTH([收货价格表日期]@row) - 2, DAY([收货价格表日期]@row)), "")"

    但现在我收到一个错误的“不正确的参数集”。你能告诉我应该放在哪里,“”的值iferror请?

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

    @EimearC如果希望在没有日期时输出空白,则需要使用第二个IFERROR。


    =IFERROR (IFERROR(日期(年(收到价目表日期)@行),月(收到价目表日期)@行)+ 10,日(收到价目表日期)@行),日期(年(收到价目表日期)@行)+ 1,月(收到价目表日期)@行)- 2,日(收到价目表日期)@行)))”、“)

    thinkspi.com

  • @Paul新来的你真是个天才!我没有意识到这是可以做到的,非常感谢!

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

","excerpt":"Hello, I appreciate your help in fixing this formula. I want to exclude from counting any blank cell for one column & any cell with \"Center\" from another column. The one for excluding \"Center\" is not working. =COUNTIFS(AND([Deliverable(s)]3:[Deliverable(s)]137, <>\"//www.santa-greenland.com/community/discussion/49826/\", [Responsible Party]3:[Responsible Party]147,…","categoryID":322,"dateInserted":"2022-09-27T19:17:55+00:00","dateUpdated":null,"dateLastComment":"2022-09-27T22:53:36+00:00","insertUserID":152547,"insertUser":{"userID":152547,"name":"maltaee","title":"","url":"https:\/\/community.smartsheet.com\/profile\/maltaee","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jKEmI3fEzHs!GlknHye32Ts!sXOmDxmK2Wo","dateLastActive":"2022-09-27T22:50:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":152547,"lastUser":{"userID":152547,"name":"maltaee","title":"","url":"https:\/\/community.smartsheet.com\/profile\/maltaee","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jKEmI3fEzHs!GlknHye32Ts!sXOmDxmK2Wo","dateLastActive":"2022-09-27T22:50:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":18,"score":null,"hot":3328626691,"url":"https:\/\/community.smartsheet.com\/discussion\/95965\/countifs-and","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95965\/countifs-and","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":95965,"commentID":345142,"name":"Re: COUNTIFS & AND + <>","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/345142#Comment_345142","dateInserted":"2022-09-27T22:53:36+00:00","insertUserID":152547,"insertUser":{"userID":152547,"name":"maltaee","title":"","url":"https:\/\/community.smartsheet.com\/profile\/maltaee","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jKEmI3fEzHs!GlknHye32Ts!sXOmDxmK2Wo","dateLastActive":"2022-09-27T22:50:15+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-27T22:50:32+00:00","dateAnswered":"2022-09-27T21:25:51+00:00","acceptedAnswers":[{"commentID":345134,"body":"

@maltaee<\/a> Not the right syntax. Needs range and range criterion pairs. All you have is one AND statement.<\/p>


<\/p>

Get rid of the AND(). COUNTIFS() will ensure all the criteria are true before counting. COUNTIFS()<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-27 22:50:32","updateUser":{"userID":152547,"name":"maltaee","title":"","url":"https:\/\/community.smartsheet.com\/profile\/maltaee","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jKEmI3fEzHs!GlknHye32Ts!sXOmDxmK2Wo","dateLastActive":"2022-09-27T22:50:15+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":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":95963,"type":"question","name":"Workday formula not working","excerpt":"I have a date linked in from a separate schedule smartsheet and want to use the WORKDAY formula to calculate 10 business days from that date, but am getting an error and can't figure out what I'm doing wrong. The following formula is returning an #INVALID DATA error: =WORKDAY([IDTF START]1, 10) What am I doing wrong?","categoryID":322,"dateInserted":"2022-09-27T18:58:32+00:00","dateUpdated":"2022-09-27T19:02:34+00:00","dateLastComment":"2022-09-27T19:31:57+00:00","insertUserID":152901,"insertUser":{"userID":152901,"name":"ljbmhe","url":"https:\/\/community.smartsheet.com\/profile\/ljbmhe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-27T19:29:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":152901,"lastUserID":152901,"lastUser":{"userID":152901,"name":"ljbmhe","url":"https:\/\/community.smartsheet.com\/profile\/ljbmhe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-27T19:29:37+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":26,"score":null,"hot":3328614629,"url":"https:\/\/community.smartsheet.com\/discussion\/95963\/workday-formula-not-working","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95963\/workday-formula-not-working","format":"Rich","lastPost":{"discussionID":95963,"commentID":345099,"name":"Re: Workday formula not working","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/345099#Comment_345099","dateInserted":"2022-09-27T19:31:57+00:00","insertUserID":152901,"insertUser":{"userID":152901,"name":"ljbmhe","url":"https:\/\/community.smartsheet.com\/profile\/ljbmhe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-27T19:29:37+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\/7JC80SX1M4R9\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-09-27T19:32:04+00:00","dateAnswered":"2022-09-27T19:23:45+00:00","acceptedAnswers":[{"commentID":345097,"body":"

\n \n https:\/\/community.smartsheet.com\/discussion\/6349\/dates-dont-act-as-dates-if-linked-from-another-smartsheet\n <\/a>\n<\/div>\n


<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-27 19:32:05","updateUser":{"userID":152901,"name":"ljbmhe","url":"https:\/\/community.smartsheet.com\/profile\/ljbmhe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-27T19:29:37+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":95958,"type":"question","name":"Checkmark from another value","excerpt":"Hi, What is the formula to have my checkmark checked with my status is changed to a certain value? i.e. when the completed status is selected, I want the checkmark to be checked. thank you.","categoryID":322,"dateInserted":"2022-09-27T18:06:11+00:00","dateUpdated":null,"dateLastComment":"2022-09-27T18:28:40+00:00","insertUserID":152624,"insertUser":{"userID":152624,"name":"David G","url":"https:\/\/community.smartsheet.com\/profile\/David%20G","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-27T18:29:16+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/pictures\/f4\/d4\/nf4d40b307033e1c1fd4cfe2ab2c10220.jpg","dateLastActive":"2022-09-27T23:26:47+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":18,"score":null,"hot":3328607091,"url":"https:\/\/community.smartsheet.com\/discussion\/95958\/checkmark-from-another-value","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95958\/checkmark-from-another-value","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":95958,"commentID":345090,"name":"Re: Checkmark from another value","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/345090#Comment_345090","dateInserted":"2022-09-27T18:28:40+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/pictures\/f4\/d4\/nf4d40b307033e1c1fd4cfe2ab2c10220.jpg","dateLastActive":"2022-09-27T23:26:47+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-27T18:16:23+00:00","dateAnswered":"2022-09-27T18:12:13+00:00","acceptedAnswers":[{"commentID":345086,"body":"

Hi @David G<\/a> <\/p>

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

Try something like this.<\/p>

=IF(Status@row = \"Completed\", 1)<\/p>

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

I hope that helps!<\/p>

Be safe, and have a fantastic week!<\/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","log":{"dateUpdated":"2022-09-27 18:16:23","updateUser":{"userID":152624,"name":"David G","url":"https:\/\/community.smartsheet.com\/profile\/David%20G","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-27T18:29:16+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":254,"urlcode":"Formulas","name":"Formulas"}]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">