更新“%完成”时更改状态和运行状况

你好,

我正在努力尝试根据日期的变化自动更改我的状态和健康栏。以下是可行的吗?

如果%完成= 100%,则状态变为“完成”,我的生命值符号变为蓝色

如果完成百分比< 100%,并且我的完成日期大于7天,那么状态将变为“进行中”,我的健康列符号将变为绿色

如果%完成率< 50%,并且我的完成日期在5天内,那么状态将变为“有风险”,我的健康栏符号将变为黄色

如果完成百分比< 100%,并且我的完成日期已经过去,那么状态将变为“延迟”,我的健康列符号将变为红色

我愿意接受你的任何建议!!


提前谢谢你!

最佳答案

  • kjex1970
    kjex1970
    ✓回答

    另外,我如何添加“未启动”?我试过了:

    =IF([百分比完成]@row = 1,“完成”,IF([百分比完成]@row = 0,“未开始”,IF(AND([百分比完成]@row < 1,[完成日期]@row <今天()),“延迟”,IF(AND([百分比完成]@row < 0.5,[完成日期]@row <=今天(5)),“有风险”,IF(AND([百分比完成]@row < 1,[完成日期]@row >今天(7)),“正在进行中”,IF(AND([百分比完成]@row > 0.5,[完成日期]@row <今天(7)),“正在进行中”,“”))))))

    因此,根据上述情况,假设我不能有5种颜色,我如何解释“未开始”?我在用你的公式:

    =如果((电子邮件保护)= "Complete", "Blue", IF((电子邮件保护)= "危险","黄色",IF((电子邮件保护)= "延迟","红色",IF((电子邮件保护)= "进展中","绿色","))))

    每当我尝试添加一个条件时,我就会变得不可解析,我不知道我做错了什么?


    谢谢你给的任何帮助!!

答案

  • 迈克电视
    迈克电视 ✭✭✭✭✭✭

    差不多了。您遗漏了一个变量,超过50%的完成和少于少于7天的完成日期。然而,对于你所提供的,这里是你的答案:

    image.png

    状态栏公式:

    =IF([百分比完成]@row = 1,“完成”,IF(AND([百分比完成]@row < 1,[完成日期]@row <今天()),“延迟”,IF(AND([百分比完成]@row < 0.5,[完成日期]@row <=今天(5)),“有风险”,IF(AND([百分比完成]@row < 1,[完成日期]@row >今天(7)),“正在进行中”,“”))))

    健康栏公式:

    =如果((电子邮件保护)= "Complete", "Blue", IF((电子邮件保护)= "危险","黄色",IF((电子邮件保护)= "延迟","红色",IF((电子邮件保护)= "进展中","绿色","))))

  • 嗨,第一个有点作用,但是它把不应该开始或有风险的事情放在进行中,我只是不知道如何添加这些,加上你建议的那个。我想如果我能把第一题做对,第二题就没问题了。还有,我可以要红的、蓝的、绿的、黄的和灰的吗?如果不是,我如何改变公式,使用绿、黄、黄、黄、红五个箭头?

  • kjex1970
    kjex1970
    ✓回答

    另外,我如何添加“未启动”?我试过了:

    =IF([百分比完成]@row = 1,“完成”,IF([百分比完成]@row = 0,“未开始”,IF(AND([百分比完成]@row < 1,[完成日期]@row <今天()),“延迟”,IF(AND([百分比完成]@row < 0.5,[完成日期]@row <=今天(5)),“有风险”,IF(AND([百分比完成]@row < 1,[完成日期]@row >今天(7)),“正在进行中”,IF(AND([百分比完成]@row > 0.5,[完成日期]@row <今天(7)),“正在进行中”,“”))))))

    因此,根据上述情况,假设我不能有5种颜色,我如何解释“未开始”?我在用你的公式:

    =如果((电子邮件保护)= "Complete", "Blue", IF((电子邮件保护)= "危险","黄色",IF((电子邮件保护)= "延迟","红色",IF((电子邮件保护)= "进展中","绿色","))))

    每当我尝试添加一个条件时,我就会变得不可解析,我不知道我做错了什么?


    谢谢你给的任何帮助!!

  • 迈克电视
    迈克电视 ✭✭✭✭✭✭

    您需要设置“未启动”的参数,并进一步定义“正在进行中”。对于“未启动”,进度是0%吗?对于那些被错误地标记为“有风险”的项目,它们的完成百分比是多少,它们的完成日期是多少,以及它们应该被标记为什么状态?对于我上面的例子,有90%的完成率,完成日期为05/05/2022,没有状态,它应该在什么状态下完成?

    最后,对于工作表上的状态颜色,右键单击状态列,然后进入编辑列属性,并确保将其设置为符号类型。向下滚动到Status部分,查看彩色圆圈选项。这些都是你的选择。蓝色的没有灰色的,灰色的也没有蓝色的。你需要选择你想要的工作。不可能两者都是。

  • 迈克电视
    迈克电视 ✭✭✭✭✭✭

    我猜您希望完成%大于50%,并在接下来的7天内将状态设置为“进行中”。考虑到这一点,它给了我这个:

    image.png

    状态的公式:

    =如果([百分比完成]@row = 0,“未开始”,如果([百分比完成]@row = 1,“完成”,如果(和([百分比完成]@row < 1,[完成日期]@row <今天()),“延迟”,如果(和([百分比完成]@row < 0.5,[完成日期]@row <=今天(5)),“有风险”,如果(和([百分比完成]@row < 1,[完成日期]@row >今天(7)),“正在进行中”,如果(和([百分比完成]@row > 0.5,[完成日期]@row <=今天(7)),“正在进行中”,“))))))”

    对于“未开始”的生命值符号,只有4种颜色的符号可以玩。因为你已经为这四个元素分配了符号,所以我使用的现有公式只将“未开始”作为其Health的空白单元格。这应该行得通,不是吗?

    保健配方(和以前一样):

    =如果((电子邮件保护)= "Complete", "Blue", IF((电子邮件保护)= "危险","黄色",IF((电子邮件保护)= "延迟","红色",IF((电子邮件保护)= "进展中","绿色","))))

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

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

请查看公式手册模板!
It would look something like this:<\/p>

=COUNTIFS({状態 Status}, OR(@cell = \"未着手 Not Started\", @cell = \"進行中 In Progress\", @cell = \"現場確認 Field Review\", @cell = \"保留中(予算)On Hold (Funding)\", @cell = \"保留中 On Hold\"), {エリア Area}, @cell = \"Example1\")<\/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":105974,"type":"question","name":"Help creating a formula that generates the current fiscal year","excerpt":"The following formula is #UNPARSEABLE. I'm not sure why. Please help. =IF(MONTH(TODAY())>=7, YEAR(TODAY())&\"-\"&(YEAR(TODAY())+1), (YEAR(TODAY())-1)&\"-\"&YEAR(TODAY()))","categoryID":322,"dateInserted":"2023-06-02T19:06:56+00:00","dateUpdated":null,"dateLastComment":"2023-06-02T19:46:15+00:00","insertUserID":161705,"insertUser":{"userID":161705,"name":"Christina S.","url":"https:\/\/community.smartsheet.com\/profile\/Christina%20S.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-02T19:44:40+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":161705,"lastUser":{"userID":161705,"name":"Christina S.","url":"https:\/\/community.smartsheet.com\/profile\/Christina%20S.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-02T19:44:40+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":27,"score":null,"hot":3371469191,"url":"https:\/\/community.smartsheet.com\/discussion\/105974\/help-creating-a-formula-that-generates-the-current-fiscal-year","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/105974\/help-creating-a-formula-that-generates-the-current-fiscal-year","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":105974,"commentID":378672,"name":"Re: Help creating a formula that generates the current fiscal year","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/378672#Comment_378672","dateInserted":"2023-06-02T19:46:15+00:00","insertUserID":161705,"insertUser":{"userID":161705,"name":"Christina S.","url":"https:\/\/community.smartsheet.com\/profile\/Christina%20S.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-02T19:44:40+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":"2023-06-02T19:45:43+00:00","dateAnswered":"2023-06-02T19:21:45+00:00","acceptedAnswers":[{"commentID":378667,"body":"

The concatenate operator in Smartsheet is + instead of &.<\/p>


<\/p>

=IF(MONTH(TODAY())>=7, YEAR(TODAY())+\"-\"+(YEAR(TODAY())+1), (YEAR(TODAY())-1)+\"-\"+YEAR(TODAY()))<\/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":105970,"type":"question","name":"Trying to evaluate multiple columns with an IF statement","excerpt":"I keep getting a syntax error for some reason but can't figure out why. I am basically trying to set a status icon of 'Sunny\" if the status of the risk is \"closed\" and if not closed, i am using the other icons based on the level of the risk. here is the formula: =IF([Status]@row = “Closed”, “sunny”, IF([Risk Score]@row <=…","categoryID":322,"dateInserted":"2023-06-02T17:58:00+00:00","dateUpdated":null,"dateLastComment":"2023-06-02T19:19:11+00:00","insertUserID":162035,"insertUser":{"userID":162035,"name":"Drew N.","title":"Program Manager","url":"https:\/\/community.smartsheet.com\/profile\/Drew%20N.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-02T19:20:11+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-02T20:54:24+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":25,"score":null,"hot":3371464031,"url":"https:\/\/community.smartsheet.com\/discussion\/105970\/trying-to-evaluate-multiple-columns-with-an-if-statement","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/105970\/trying-to-evaluate-multiple-columns-with-an-if-statement","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":105970,"commentID":378663,"name":"Re: Trying to evaluate multiple columns with an IF statement","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/378663#Comment_378663","dateInserted":"2023-06-02T19:19:11+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-02T20:54:24+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":"2023-06-02T18:44:44+00:00","dateAnswered":"2023-06-02T18:24:38+00:00","acceptedAnswers":[{"commentID":378641,"body":"

I think you are overcomplicating it. Try this instead:<\/p>

=IF([Status]@row = \"Closed\", \"sunny\", IF([Risk Score]@row <= 25, \"partly sunny\", IF([Risk Score]@row <= 50, \"cloudy\", IF([Risk Score]@row <= 90, \"rainy\", \"stormy\"))))<\/p>


<\/p>

It also looks like some of your quotes are slanted and others are straight up and down. The slanted ones are called \"Smart Quotes\" which (ironically enough) are not recognized as valid characters in Smartsheet formulas. You will need to either retype them here in the Community (which I did above already), directly in Smartsheet, or in a text editor such as Notepad (not Word).<\/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"}]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

公式和函数趋势