黄色RAG公式:在2个数字之间(大于小于)
问候Smartsheet社区:
我需要在我的公式中添加一个范围-9 & -1变成黄色。谢谢
当前的公式:
=IF(或([附表差异]@row > 0,[附表差异]@row = 0), "绿色",IF([附表差异]@row <= -10, "红色")))
最好的答案
答案
-
杰森的杜 ✭✭✭✭✭✭
=IF([附表差异]@row >= 0, "绿色",IF([附表差异]@row <= -10, "红色","黄色"))
-
Kaleb ✭✭
这是有效的,但我忘记添加如果日程变化是空白/空,那么结果应该是灰色的。
我的尝试失败了:
=IF([时间表差异]@row >= 0, "绿色",IF([时间表差异]@row <= -10, "红色","黄色",IF(ISBLANK([时间表差异]@row, "灰色"))))
-
杰森的杜 ✭✭✭✭✭✭
试试这个。我通常会先在嵌套的IF中检查ISBLANK,然后检查Schedule Variance的条件。IF语句中的逻辑可能有点奇怪,需要一些练习。我建议在他们的在线帮助中阅读IF函数。
对于IF语句和正在使用的任何其他函数(如ISBLANK),都必须小心括号的位置。
=IF(ISBLANK([附表差异]@row), "灰色",IF([附表差异]@row >= 0, "绿色",IF([附表差异]@row <= -10, "红色","黄色"))))
-
Kaleb ✭✭
太好了,成功了!谢谢
帮助文章参考资料欧宝体育app官方888
类别
Try this:<\/p>
=IF([Date of Site Survey (Product)]@row <> \"//www.santa-greenland.com/community/discussion/comment/\", IF(TODAY() > [Date of Site Survey (Product)]@row, \"yes\", \"no\"))<\/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":106249,"type":"question","name":"Modifying a date based on 2 variables","excerpt":"Hello Everyone! I would like to create a formula that says If the value in the \"Variable\" column is \"HIGH\" AND the date in \"Column 1\" has a year less than today's year, return that date with TODAY\"S year. Otherwise return that date unchanged. In other words, dates in the previous years are brought to this year, dates in…","categoryID":322,"dateInserted":"2023-06-08T23:28:09+00:00","dateUpdated":null,"dateLastComment":"2023-06-09T15:45:32+00:00","insertUserID":127672,"insertUser":{"userID":127672,"name":"Carroll Wall","url":"https:\/\/community.smartsheet.com\/profile\/Carroll%20Wall","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-09T15:44:11+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-09T15:55:57+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":9,"countViews":45,"score":null,"hot":3372597821,"url":"https:\/\/community.smartsheet.com\/discussion\/106249\/modifying-a-date-based-on-2-variables","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106249\/modifying-a-date-based-on-2-variables","format":"Rich","tagIDs":[216,234,249,254],"lastPost":{"discussionID":106249,"commentID":379864,"name":"Re: Modifying a date based on 2 variables","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/379864#Comment_379864","dateInserted":"2023-06-09T15:45:32+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-09T15:55:57+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\/3EAGX5UGDNCQ\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-09T15:44:08+00:00","dateAnswered":"2023-06-09T15:30:15+00:00","acceptedAnswers":[{"commentID":379858,"body":"
Sure, here is how it breaks down:<\/p>
=IF([Variable]@row <> \"High\", \"//www.santa-greenland.com/community/discussion/comment/\"\n<\/pre><> is a way of saying \"not equal to\". So, in this case, we are saying \"Do the following thing if [Variable] is not equal to \"High\". The double quotes, \"//www.santa-greenland.com/community/discussion/comment/\", is another way of saying \"blank\". So if our formula sees that [Variable] contains anything other than \"High\", it is going to set [Goal Column] as blank.<\/p>
IF(YEAR(TODAY()) > YEAR([First Column]@row), DATE(YEAR(TODAY()), MONTH([First Column]@row), DAY([First Column]@row)), [First Column]@row))\n<\/pre>This section of the formula applies to the \"else\" part of the original IF statement. The first part looked for [Variable] not equal to \"High\", so this part will apply to [Variable] that does equal \"High\". First, we are asking whether today's year, YEAR(TODAY(), is greater than the year of [First Column], YEAR([First Column]). If it is, we are going to build a date using the present year, combined with the month and day from [First Column], DATE(YEAR(TODAY()), MONTH([First Column]@row), DAY([First Column]@row)).<\/p>
[First Column]@row\n<\/pre>Lastly, if the current year is not greater than [First Column], i.e., they are the same, then we are simply going to set [Goal Column] to the same value as [First Column].<\/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":216,"urlcode":"Non-profit","name":"Non-profit"},{"tagID":234,"urlcode":"Health-care","name":"Healthcare"},{"tagID":249,"urlcode":"Education","name":"Education"},{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":106240,"type":"question","name":"How to make a manual Row ID based on conditions?","excerpt":"I'm not even sure if this is possible but I invite all the formula wizards to take a crack at it! I have this intake sheet with 10 rows, all that have a corresponding auto-generated Row ID from the system column. Row 1 is 23-001, row 2 is 23-002, row 3 is 23-003, etc. When a project gets approved, I want another column,…","categoryID":322,"dateInserted":"2023-06-08T20:55:41+00:00","dateUpdated":"2023-06-09T07:54:22+00:00","dateLastComment":"2023-06-09T16:11:17+00:00","insertUserID":155918,"insertUser":{"userID":155918,"name":"Gabriel Barrera","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Gabriel%20Barrera","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!m4MvHwJdY3o!cpDsp75M-3o!0p-TgKs_b-h","dateLastActive":"2023-06-09T16:09:18+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":91566,"lastUser":{"userID":91566,"name":"Genevieve P.","title":"Community Manager","url":"https:\/\/community.smartsheet.com\/profile\/Genevieve%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/KHY4Y67W0VRX\/nF76D5N9MFB28.png","dateLastActive":"2023-06-09T16:18:31+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":22,"score":null,"hot":3372587218,"url":"https:\/\/community.smartsheet.com\/discussion\/106240\/how-to-make-a-manual-row-id-based-on-conditions","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106240\/how-to-make-a-manual-row-id-based-on-conditions","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106240,"commentID":379878,"name":"Re: How to make a manual Row ID based on conditions?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/379878#Comment_379878","dateInserted":"2023-06-09T16:11:17+00:00","insertUserID":91566,"insertUser":{"userID":91566,"name":"Genevieve P.","title":"Community Manager","url":"https:\/\/community.smartsheet.com\/profile\/Genevieve%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/KHY4Y67W0VRX\/nF76D5N9MFB28.png","dateLastActive":"2023-06-09T16:18:31+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"}},"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-09T16:09:16+00:00","dateAnswered":"2023-06-09T13:52:50+00:00","acceptedAnswers":[{"commentID":379821,"body":"