RYG自动化复公式
出于项目管理的目的,我根据Smartsheet网格的几个列自动化了RYG圈。逻辑如下:
如果[建议产品上市日期]ob欧宝娱乐app手机下载<今天,“灰色”
如果[建议产品上市日期]ob欧宝娱乐app手机下载>=今天和[与计划发射日期的偏差]<100,“绿色”
如果[建议产品上市日期]ob欧宝娱乐app手机下载>=今天和[与建议发射日期的偏差]= 31 - 100和[完成]<75,"黄”
如果[建议产品上市日期]ob欧宝娱乐app手机下载>=T的奥和[与建议发射日期的偏差]>100和[完成]< 75,“红色”
最终公式为:内容概述
=IF([预计项目启动日期])@row>=今日(),“灰色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row< 100),“绿色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row> 31、[与建议上市日期的偏差]@row< 100年(电子邮件保护)< 75),“黄色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row> = 100,(电子邮件保护)< 75),“红色”))))
但是现在,我想为“红色”和“黄色”添加另一个选项。
如果[建议产品上市日期]ob欧宝娱乐app手机下载>=今天和[与建议发射日期的偏差]= 31 - 100和[完成]< 75,或[%剩欧宝体育app官方888余资源]< 5,"黄”
如果[建议产品上市日期]ob欧宝娱乐app手机下载>=T的奥和[与建议发射日期的偏差]>100和[完成]<75,或[剩余资源%]<0,欧宝体育app官方888“红色”
我试过下面的公式,但没有用。
=IF([预计项目启动日期])@row>=今日(),“灰色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row< 100),“绿色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row> 31、[与建议上市日期的偏差]@row< 100年(电子邮件保护)< 75%),或([剩余资源百分比]欧宝体育app官方888@row< 5),“黄色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row> = 100,(电子邮件保护)< 75%),或([剩余资源百分比]欧宝体育app官方888@row< 0),“Red”))))
知道我哪里做错了吗?在“%剩余资源”中具有负百分比的行返回为不正确的参数集。欧宝体育app官方888
评论
-
安德鲁•斯图尔特 ✭✭
要使这些复合公式在语法上正确是件棘手的事。我发现,通过将value_if_false语句替换为下一个if语句(可以在不同的单元格中单独测试),一次一步地构建它们,可以更容易地跟踪罪魁祸首。无论如何,这或多或少就是你正在做的事情。最后一个If语句间隔显示Condition, value_if_true, value_if_false):
如果(
AND([预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row> = 100,(电子邮件保护)< 75),
OR([%剩余资源]欧宝体育app官方888@row< 0),
“红色”)
有一个OR函数作为value_if_true,只有一个参数(它至少需要两个参数)。其实OR的工作原理和AND一样,这部分需要重写为
如果(
或(
AND([预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row> = 100,(电子邮件保护)< 75),
[剩余资源%]欧宝体育app官方888@row< 0),
“红”,value_if_false)
在哪里value_if_false可以用所需的其余逻辑替换(但要注意,公式前面还有一个只有一个参数的OR)。
希望这是有意义的!
-
嗨,安德鲁,
我不再得到不正确的参数错误,但现在我似乎不能得到正确的顺序。不管我怎么设置,总有一种颜色不行。
=IF([预计项目启动日期])@row>=今日(),“灰色”,如果(或(及)[预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row>= 100,[完成]@row< 75%),[剩余资源%]欧宝体育app官方888@row< 0)、“红色”、IF(或)(及([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row> 31、[与建议上市日期的偏差]@row< 100,[完成]@row< 75%),[剩余资源%]欧宝体育app官方888@row< 5),“黄色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row< 100),“绿色”))))
绿色不行。
=IF([预计项目启动日期])@row>=今日(),“灰色”,如果(或(及)[预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row>= 100,[完成]@row< 75%),[剩余资源%]欧宝体育app官方888@row< 0),“红色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row< 100),“绿色”,IF(或)(和)([预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row> 31、[与建议上市日期的偏差]@row< 100,[完成]@row< 75%),[剩余资源%]欧宝体育app官方888@row< 5),“黄色”))))
黄色不行。
=IF([预计项目启动日期])@row>=今日(),“灰色”,IF(AND([预计项目启动日期])@row<今日(),[与建议上市日期的偏差]@row< 100),“绿色”,IF(或)(和)([预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row> 31、[与建议上市日期的偏差]@row< 100,[完成]@row< 75%),[剩余资源%]欧宝体育app官方888@row< 5),“黄色”,IF(或)和([预计项目启动日期]@row<今日(),[与建议上市日期的偏差]@row>= 100,[完成]@row< 75%),[剩余资源%]欧宝体育app官方888@row< 0),“Red”))))
红色不行。
我已经按你的建议分解了。我不知道我还能怎么做。我知道有一种方法可以做到这一点,因为这种公式对于项目管理目的的RYG自动化至关重要(例如,一种颜色与项目是否已经开始(灰色),是否按时并符合预算(绿色),落后或没有多少预算(黄色),或非常落后或超支(红色))。
-
安德鲁•斯图尔特 ✭✭
恭喜你!那你一定松了一口气。
另一个建议,我必须使它更容易遵循逻辑,从而减少出错的机会,是避免多次相同的测试,并写出它与断行和缩进,你可以删除之后,所以它更容易匹配括号。
例如,第一个条款测试[预计项目启动日期]@row>TODAY(),如果为真,则停止对Gray的处理。因此不需要在value_if_false中测试相反的情况。
=IF([预计项目启动日期])@row>今天(),“灰色”,
如果(或(及)[与建议推出日期的偏差]@row>= 100,[完成]@row< .5),[剩余资源%]欧宝体育app官方888@row< 0),“红色”,
IF(AND([与建议上市日期的偏差]@row< 31,[剩余资源%]欧宝体育app官方888@row>= .05),“绿色”,
“黄色”
)))我屏幕上的格式不太整齐,希望你们能看清楚。
最后,如果可能的话,我喜欢在同一子句中消除AND和OR的混合,因为很容易将括号放在错误的位置并最终产生意想不到的结果。所以我会这样写,还有两个不相关的红色原因:
=IF([预计项目启动日期])@row>今天(),“灰色”,
IF(AND([与建议上市日期的偏差]@row>= 100,[完成]@row< .5),“红色”,
IF([%剩余资源])欧宝体育app官方888@row< 0,“红色”,
IF(AND([与建议上市日期的偏差]@row< 31,[剩余资源%]欧宝体育app官方888@row>= .05),“绿色”,
“黄色”
))))
帮助文章参考资料欧宝体育app官方888
You can set up a flag type column. The formula to flag rows where there is no sent date but the approval date is more than 7 days in the past would be:<\/p>
=IF(AND([PO Sent Date]@row = \"\", [LN Approval Date]@row< TODAY(-7)), 1)<\/p>
<\/p>
Then you would set up your automation to rn based on when this column gets flagged.<\/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":106720,"type":"question","name":"Percentage complete based on Y or N for six categories.","excerpt":"Hello I am trying to develop a formula that would provide percentage complete triggering on Y for each category. So, in short, if one Y is seen, display 18, if two Y's are seen, display 36, if three Y's are seen, display 54, if four Y's are seen, display 72, if five Y's are seen, display 90, and if six Y's are seen,…","categoryID":322,"dateInserted":"2023-06-21T18:24:22+00:00","dateUpdated":null,"dateLastComment":"2023-06-22T12:12:35+00:00","insertUserID":155082,"insertUser":{"userID":155082,"name":"Cristian","url":"https:\/\/community.smartsheet.com\/profile\/Cristian","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtcKDnyq8FmYjuhOFCk_LYZQ2zWK_KI0waOp6i093w=s96-c","dateLastActive":"2023-06-22T13:14:05+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-22T16:36:21+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":6,"countViews":38,"score":null,"hot":3374811417,"url":"https:\/\/community.smartsheet.com\/discussion\/106720\/percentage-complete-based-on-y-or-n-for-six-categories","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106720\/percentage-complete-based-on-y-or-n-for-six-categories","format":"Rich","lastPost":{"discussionID":106720,"commentID":381703,"name":"Re: Percentage complete based on Y or N for six categories.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381703#Comment_381703","dateInserted":"2023-06-22T12:12:35+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-22T16:36:21+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-22T10:16:30+00:00","dateAnswered":"2023-06-21T19:37:55+00:00","acceptedAnswers":[{"commentID":381599,"body":"
If all rows are next to each other, you can use<\/p>
=MAX(COUNTIFS(TestOne@row:TestSix@row, @cell = \"Y\") * 18, 100)<\/p>
<\/p>
If they are not next to each other, you will need to \"add\" your IFs together instead of nesting them.<\/p>
=MAX(IF(TestOne@row = \"Y\", 18, 0) + IF(TestTwo@row = \"Y\", 18, 0) + IF(TestThree@row = \"Y\", 18, 0) + .................., 100)<\/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":[]}">