如何同步列中的日期与公式?

你好,

下面,我将向你解释合同到期前终止通知期限的计算方法,以及根据该通知期限向责任人发送提醒邮件的方法;

1-在第一步中,我每天输入合同的结束日期和通知期限。


image.png

2-“终止通知的截止日期”字段已根据通知期限制定。根据例子中的情况,它会提前6个月向负责人发送提醒邮件。

“终止通知截止日期”一栏的计算公式如下:

=[当前合同终止日期]@行-[终止通知期限(天)]@行


到目前为止一切都很正常。(通知等)。

如果您注意到,合同的截止日期是5.8.2024年。由于需要提前6个月通知,预计日期为5.2.22024。

但日期是2024年2月7日。

我试图取消周末来解决这个问题。但随后,它又推翻了“终止通知的截止日期”一栏中的公式。

image.png


如果你能在这件事上支持我,我会很高兴。


谢谢

最佳答案

  • 凯利摩尔
    凯利摩尔 ✭✭✭✭✭✭
    ✓回答

    你好@marcusben

    日期的不同在于,并非每个月都有30天。

    这里有一种方法可以使日期与合同结束日期相等。如果你是一个月一个月地工作,这个方法是有效的。例如,如果通知提前45天发出,那么这个公式可能就没有意义了。我们可以调整它,使它更健壮,但它会使它更复杂——而且它永远不可能百分百准确。

    =IF(DAY([当前合同结束日]@行)= DAY([当前合同结束日]@行- 180),[当前合同结束日]@行- 180,Date(年([当前合同结束日]@行- 180),MONTH([当前合同结束日]@行- 180),DAY([当前合同结束日]@行- 180))

    它查看的是日期,看减法乘积的结果是否与当天相同。ob欧宝娱乐app手机下载如果是,只需做减法。如果不匹配,则重新构造日期值,使之匹配。

    凯利

答案

  • 凯利摩尔
    凯利摩尔 ✭✭✭✭✭✭
    ✓回答

    你好@marcusben

    日期的不同在于,并非每个月都有30天。

    这里有一种方法可以使日期与合同结束日期相等。如果你是一个月一个月地工作,这个方法是有效的。例如,如果通知提前45天发出,那么这个公式可能就没有意义了。我们可以调整它,使它更健壮,但它会使它更复杂——而且它永远不可能百分百准确。

    =IF(DAY([当前合同结束日]@行)= DAY([当前合同结束日]@行- 180),[当前合同结束日]@行- 180,Date(年([当前合同结束日]@行- 180),MONTH([当前合同结束日]@行- 180),DAY([当前合同结束日]@行- 180))

    它查看的是日期,看减法乘积的结果是否与当天相同。ob欧宝娱乐app手机下载如果是,只需做减法。如果不匹配,则重新构造日期值,使之匹配。

    凯利

  • 你好@Kelly摩尔

    你说;

    日期的不同在于,并非每个月都有30天。


    是的,我想过这个问题。我只是不写。下面的公式试图奏效。所以谢谢你


    我只是做了一个小小的改变;

    我添加了“终止通知期限(天)”而不是180天。

    因为在某些情况下,不是180度,而是270度,320度等等。


    祝您有愉快的一天

  • 你好@Kelly摩尔

    我已经确定了一些情况,我想分享给你的帮助;


    1-如果在12月31日合同到期前6个月(180天)提出警告,则按7月计算,而不是6月。我想因为我猜琼不会在这里满31岁。但当这种情况发生时,它会延迟1个月。这意味着提醒邮件被延迟。

    image.png


    2-我已经确定了2024年2月21日到期的合同的720天的终止通知期。我期望它回到21.2.2022,但它是21.3.2022。如果我登录730天(正好2年),那么它会给出正确的日期。(周末除外)

    当我们看例b时,我看到它为720天提供了正确的回报。

    一个例子:

    image.png

    例b:

    image.png


    3-在这个例子中,我希望它到3月30日。但我不确定是不是推迟了1个月,因为正好是3月30日的周末。

    image.png


    谢谢你的帮助

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

    嘿,马克

    抱歉耽搁了。这需要一点时间来解决。关于如何添加月份的帖子有很多——它变得很复杂,因为人们必须考虑到不断变化的年份值,当将连续的天数添加到日期中时,这是自动管理的。我们可以试试这个,看看能不能拉近距离。smartsheet有很多功能都做得很好,还有一些功能仍在开发中。总的来说,时间的功能在智能表格中仍然是一个发展中的功能。

    我添加了两个新的辅助列——我们可以把这些公式合并到一个公式中,也许最后,但每当我有一个复杂的公式时,我会试着把它分解成步骤,这样我就可以更仔细地观察失败模式。这两个辅助列就是用于此目的的。

    [月数]

    =INT([终止通知期限(天)]@row / 30)

    [年数]

    =INT([月数]+ MONTH([开始日期]@row)) / 12)

    INT()函数将一个可能包含小数的值转换为整数。


    添加了辅助列之后,让我们试试这个公式。这个公式首先看日期是否跨越年份。如果是,则调整年份和月份。如果没有,它只是把几个月加在一起。

    =IF(OR(MONTH([开始日期]@行)+[月数]@行> 12,[月数]@行>= 12),Date (YEAR([开始日期]@行)+[月数]@行)- ((MONTH([开始日期]@行)),DAY([开始日期]@行),Date (YEAR([开始日期]@行)+[月数]@行,DAY([开始日期]@行)))

    这对你有用吗?

    凯利

  • @Kelly摩尔


    谢谢你上次寄来的配方……我在这里遇到了两个不同的问题;

    1 -

    “终止通知的截止日期”字段必须小于“开始日期”字段。应按“终止通知期限(天)”栏内的数值计算。

    例如,如图所示

    “终止通知期限(天)”= 60天

    所以

    “终止通知截止日期”栏内的日期应显示为60天前。


    image.png


    2-当我在“终止通知期限(天)”中输入240天或以上时,公式如下图所示。通常根据我这里拿到的合同信息720天、900天等都可以进入。


    image.png


    真的非常感谢你

    马库斯

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

    嘿,马库斯

    让我们看看能不能达到你想要的效果。我要再次提到的是,因为我们只是对一个月的天数和/或一年的天数做了一些假设,我们永远不会完全准确。

    我发现在我给你的年数中有一个错误-希望你已经改正了缺少的括号。

    = INT ([月数]@row + MONTH([开始日期]@row)) / 12)

    一旦这个问题解决了,这个原始公式就适用于我所有的日期*

    =IF(OR(MONTH([开始日期]@行)+[月数]@行> 12,[月数]@行>= 12),Date (YEAR([开始日期]@行)+[月数]@行)- ((MONTH([开始日期]@行)),DAY([开始日期]@行),Date (YEAR([开始日期]@行)+[月数]@行,DAY([开始日期]@行)))

    但是,我想我搞不清你要找的约会对象了。*我的公式是在开始日期上加上天数(终止通知天数)。你的意思是这个值应该从开始日期减去吗?

    这是我测试你配方时放的地方

    image.png

    请为我澄清哪些列是增加的和/或减去的,从哪一天开始。

    凯利

  • 你好@Kelly摩尔


    谢谢你的支持。

    我想澄清一个误会。也许我的陈述有误。我称之为“开始日期”的字段实际上是当前合同的结束日期。此字段触发“终止通知的截止日期”字段。所以;

    “终止通知的截止日期”一栏应在“开始日期”一栏中较小。因此,如果在“终止通知期限(天)”字段中输入90,如下例所示,我需要在“终止通知截止日期”字段中看到2022年5月31日之前的90天。比如2022年2月……等

    image.png


    谢谢

    马库斯

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

    嘿,马克

    你试过Workday()函数吗?

    =工作日([开始日期],0-[终止通知期限(天)]@行)

    这是你想要的吗?

    凯利

  • 你好,Kelly Moore,

    抱歉这些研究对我不起作用…:(

    谢谢,祝你今天过得愉快

    马库斯

帮助文章资源欧宝体育app官方888

想在Smartsheet中直接练习使用公式吗?

查看公式手册模板!
DATE(2020, 1, 1), [IRRF RECEIVED]@row = 0), [IMMUNISATION INCIDENT REPORT FORM SENT]@row + 10, IF(AND([IMMUNISATION INCIDENT REPORT FORM SENT]@row > DATE(2020, 1, 1), [IRRF…","categoryID":322,"dateInserted":"2022-12-05T10:10:21+00:00","dateUpdated":null,"dateLastComment":"2022-12-06T05:51:33+00:00","insertUserID":141269,"insertUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":141269,"lastUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":37,"score":null,"hot":3340543314,"url":"https:\/\/community.smartsheet.com\/discussion\/98394\/worday-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98394\/worday-formula","format":"Rich","lastPost":{"discussionID":98394,"commentID":353244,"name":"Re: WORDAY FORMULA","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/353244#Comment_353244","dateInserted":"2022-12-06T05:51:33+00:00","insertUserID":141269,"insertUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52: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-12-06T05:54:52+00:00","dateAnswered":"2022-12-05T19:01:39+00:00","acceptedAnswers":[{"commentID":353185,"body":"

You would drop it in in place of <\/p>

[Date Column]@row + 10<\/p>


<\/p>

Everything else should stay the same.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-06 05:54:52","updateUser":{"userID":141269,"name":"Fialko66","url":"https:\/\/community.smartsheet.com\/profile\/Fialko66","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-06T05:52: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":[]},{"discussionID":98409,"type":"question","name":"I have a formula that does not work now because of the new year.","excerpt":"This formula has been working just fine until the month of December and now returns #invalid Data Type\" I assume it is because it is looking for dates within this calendar year and not next calendar year? Does anyone have any suggestions on how I can fix this problem? The formula looks at the Determination Date and then…","categoryID":322,"dateInserted":"2022-12-05T16:45:56+00:00","dateUpdated":null,"dateLastComment":"2022-12-05T19:43:51+00:00","insertUserID":126337,"insertUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":null,"lastUserID":126337,"lastUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":27,"score":null,"hot":3340531187,"url":"https:\/\/community.smartsheet.com\/discussion\/98409\/i-have-a-formula-that-does-not-work-now-because-of-the-new-year","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98409\/i-have-a-formula-that-does-not-work-now-because-of-the-new-year","format":"Rich","lastPost":{"discussionID":98409,"commentID":353207,"name":"Re: I have a formula that does not work now because of the new year.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/353207#Comment_353207","dateInserted":"2022-12-05T19:43:51+00:00","insertUserID":126337,"insertUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+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-12-05T19:15:44+00:00","dateAnswered":"2022-12-05T19:11:41+00:00","acceptedAnswers":[{"commentID":353196,"body":"

@Christopher Flemings<\/a> <\/p>

=IF([CONDITIONAL LICENCE]@row, DATE(if(MONTH([Determination Date]@row)=12,YEAR([Determination Date]@row)+1,YEAR([Determination Date]@row)), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), \"//www.santa-greenland.com/community/discussion/comment/\")<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-05 19:15:44","updateUser":{"userID":126337,"name":"Christopher Flemings","url":"https:\/\/community.smartsheet.com\/profile\/Christopher%20Flemings","photoUrl":"https:\/\/lh3.googleusercontent.com\/-6uhStWCmgRc\/AAAAAAAAAAI\/AAAAAAAAAAA\/ACHi3rcm-Jq0CJqPMi7PAdar4X8wZHjMlw\/mo\/photo.jpg","dateLastActive":"2022-12-05T19:43:02+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":98391,"type":"question","name":"Help w\/multiple AND NOT ISBLANK date field formula","excerpt":"Hi team - I have 6 date column fields that are automatically formatted (record a date) when a Status field changes. Let's just call those columns: Date1 Date2 Date3 Date4 Date5 Date6 I created a check box \"helper column\" that I'd like to create a formula that looks across those fields to determine if ALL of them have a…","categoryID":322,"dateInserted":"2022-12-04T15:40:46+00:00","dateUpdated":null,"dateLastComment":"2022-12-05T14:52:40+00:00","insertUserID":118864,"insertUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":null,"lastUserID":118864,"lastUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":30,"score":null,"hot":3340422806,"url":"https:\/\/community.smartsheet.com\/discussion\/98391\/help-w-multiple-and-not-isblank-date-field-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98391\/help-w-multiple-and-not-isblank-date-field-formula","format":"Rich","lastPost":{"discussionID":98391,"commentID":353142,"name":"Re: Help w\/multiple AND NOT ISBLANK date field formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/353142#Comment_353142","dateInserted":"2022-12-05T14:52:40+00:00","insertUserID":118864,"insertUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+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-12-05T14:51:25+00:00","dateAnswered":"2022-12-04T15:45:20+00:00","acceptedAnswers":[{"commentID":353088,"body":"

Hey @jmo<\/a> <\/p>

Are your date fields contiguous (all side by side?). I'm assuming they are. If not, each date field will have to be added to the COUNTIFS individually<\/p>

=IF(COUNTIFS([Date1]@row:[Date6]@row, ISDATE(@cell))=6, 1)<\/p>

Will this work for you?<\/p>

Kelly<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-05 14:51:25","updateUser":{"userID":118864,"name":"jmo","title":"","url":"https:\/\/community.smartsheet.com\/profile\/jmo","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!g0lA5zVbOLw!-wfAd_lcHz4!voKaS5U1cZv","dateLastActive":"2022-12-05T14:51:27+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":[]}">