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

  • cpo1
    cpo1 ✭✭

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

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

    很乐意帮忙!是的

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

    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,到日期括号。

    凯利

  • 凯利,

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

  • EimearC
    EimearC ✭✭

    @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

  • EimearC
    EimearC ✭✭

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

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

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

请查看公式手册模板!
TODAY(),…","categoryID":322,"dateInserted":"2023-06-22T01:59:46+00:00","dateUpdated":null,"dateLastComment":"2023-06-22T03:13:30+00:00","insertUserID":162138,"insertUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T03:41:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":161714,"lastUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-06-22T05:23:48+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":32,"score":null,"hot":3374804596,"url":"https:\/\/community.smartsheet.com\/discussion\/106749\/how-to-count-how-many-interviews-in-the-current-week","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106749\/how-to-count-how-many-interviews-in-the-current-week","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106749,"commentID":381670,"name":"Re: How to count how many interviews in the current week?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381670#Comment_381670","dateInserted":"2023-06-22T03:13:30+00:00","insertUserID":161714,"insertUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-06-22T05:23:48+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\/TNZRUD6K3A2N\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-22T03:41:21+00:00","dateAnswered":"2023-06-22T03:13:30+00:00","acceptedAnswers":[{"commentID":381670,"body":"

My apologies, I was counting interviews remaining in the current week. This will give you total interviews for the current week.<\/p>

=COUNTIFS([Interview Date]:[Interview Date], @cell <= TODAY(7 - WEEKDAY(TODAY())), [Interview Date]:[Interview Date], @cell > TODAY() - WEEKDAY(TODAY()), Fleet:Fleet, \"A220\")<\/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"}]},{"discussionID":106707,"type":"question","name":"How to count how many interviews in the current week?","excerpt":"I am currently trying to track how many interviews are scheduled in the current week per fleet type? The formula I have is counting 7 days from today but isn't including the current day. =COUNTIFS([Interview Date]:[Interview Date], @cell = TODAY(7), [Interview Date]:[Interview Date], @cell > TODAY(), Fleet:Fleet, \"A220\")","categoryID":322,"dateInserted":"2023-06-21T16:14:49+00:00","dateUpdated":null,"dateLastComment":"2023-06-21T20:20:41+00:00","insertUserID":162138,"insertUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T03:41:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":162138,"lastUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T03:41:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":42,"score":null,"hot":3374745330,"url":"https:\/\/community.smartsheet.com\/discussion\/106707\/how-to-count-how-many-interviews-in-the-current-week","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106707\/how-to-count-how-many-interviews-in-the-current-week","format":"Rich","lastPost":{"discussionID":106707,"commentID":381628,"name":"Re: How to count how many interviews in the current week?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381628#Comment_381628","dateInserted":"2023-06-21T20:20:41+00:00","insertUserID":162138,"insertUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T03:41:23+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\/TNZRUD6K3A2N\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-21T20:21:04+00:00","dateAnswered":"2023-06-21T19:39:48+00:00","acceptedAnswers":[{"commentID":381601,"body":"

@Louis.Smith<\/a>,<\/p>

Awesome, glad it worked! Please remember to click the Answer button if you don't mind. <\/p>

Re: \"Is there a way to create a formula for the current?\" - By this do you mean for the current week?<\/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":106700,"type":"question","name":"If Or Formula Help","excerpt":"My formula is working in Excel, but not in Smartsheet. I am still fairly new to smartsheet so any help would be appreciated. Basically its looking at the GLAcct column and find certain values and creating key terms for those values. Ex: If GLAcct = 710111 or 710121, then show Key Salary.","categoryID":322,"dateInserted":"2023-06-21T15:12:46+00:00","dateUpdated":null,"dateLastComment":"2023-06-21T17:02:32+00:00","insertUserID":162062,"insertUser":{"userID":162062,"name":"mragans23","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/mragans23","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-21T18:21:45+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":162062,"lastUser":{"userID":162062,"name":"mragans23","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/mragans23","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-21T18:21:45+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":27,"score":null,"hot":3374728518,"url":"https:\/\/community.smartsheet.com\/discussion\/106700\/if-or-formula-help","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106700\/if-or-formula-help","format":"Rich","lastPost":{"discussionID":106700,"commentID":381545,"name":"Re: If Or Formula Help","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381545#Comment_381545","dateInserted":"2023-06-21T17:02:32+00:00","insertUserID":162062,"insertUser":{"userID":162062,"name":"mragans23","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/mragans23","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-21T18:21:45+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\/WU7DXUC1MGJ2\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-21T18:54:42+00:00","dateAnswered":"2023-06-21T15:29:14+00:00","acceptedAnswers":[{"commentID":381516,"body":"

Hi @mragans23<\/a>,<\/p>

In Smartsheet you'd need to add @row to the GLAcct portion of your the formula. <\/p>

For example, the first section would be:<\/p>

=IF(OR(GLAcct@row = \"710111\", GLAcct@row = \"710121\"), \"Key Salary\")<\/p>

Once you've entered it for one row, you can then right click the cell and \"Convert to Column Formula\" to have it applied to all rows in the column. <\/p>

Other than that, I think everything should be OK once you add the @row in.<\/p>

Hope that helps; any questions etc. then just post! 😊<\/span><\/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":[]}],"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":[]}">

公式和函数趋势