帮助使用IF语句
嗨,伙计们,
我需要一些帮助关于试图使用IF语句来管理优先级排名。
基本上,我有两个列对临界性和可管理性进行排名,这取决于在这两个列中获得的分数,这两个列指示了应用于风险的优先级排名。
我目前收到一个#无效的数据类型错误时,运行这个公式…任何帮助都将非常感激。
=IF([临界分数]2 *[可管理分数]2 > 12,"1 -严重",IF([临界分数]2 *[可管理分数]2 > 6,"2 -高",IF([临界分数]2 *[可管理分数]2 > 2,"3 -中等","4 -低")))
问候
Kegan
评论
-
蒂姆·米克斯 ✭✭✭✭✭✭
肝,
我不是SS社区里最好的配方专家…有一些男人/女孩是专家,他们可以在睡梦中做到这一点。
然而,我复制了你的数据和公式,它对我有效。(见图片)
将列命名为相同并且不需要更改公式上的任何内容。把它粘贴进去就行了。
你的原始分数是如何计算的?是原始数据输入还是下拉菜单?
不管怎样,我用下拉键输入数据就能让它工作了。
你能否提供更多细节?
谢谢,
-
Kegan ✭
嗨,蒂姆,
首先,非常感谢你在这个问题上帮助我!
根据下面的截图,我已经设置了额外的列-
- 1.“关键”和“可管理?”的列,通过下拉过滤器工作。
2.临界得分公式为:
=如果(Critical-ity 1 =“低”,“1”,如果([Critical-ity] 1 =“低于平均水平”,“2”,如果([Critical-ity] 1 =“高于平均水平”,“3”,如果(Critical-ity 1 =“高”,“4”))))
3.可管理分数公式是:
=如果(可控的?1 =“是”,“1”,如果(可控?)1 =“可能”,“2”,如果(可控?)1 =“可能”,“3”,如果(可控?)1 =“否”,“4”))))
实际上,我现在想知道这个问题是否因为我的“优先级”列是一个if公式,而这个公式又引用了另外两个列(“临界分数”和“可管理分数”),它们都包含各自的if公式?
发人深省.....我被这个卡住了!再次感谢你的帮助。
Kegan
-
特拉维斯 员工
Kegan,你得到错误是因为你的临界分数和可管理分数列中的公式正在生成文本结果——不是数值.在公式中,当您在某些东西周围添加引号时,它被格式化为文本字符串(即使它是一个数字)。
有两个选项可以解决这个问题…
1.删除“value_if_true”数字周围的引号。
例子:
原:=IF([Critical-ity]1 = "低","1",IF([Critical-ity]1 = "低于平均水平","2",IF([Critical-ity]1 = "高于平均水平","3",IF([Critical-ity]1 = "高","4"))))
新增:=IF([Critical-ity]1 = "低",1,IF([Critical-ity]1 = "低于平均",2,IF([Critical-ity]1 = "高于平均",3,IF([Critical-ity]1 = "高",4))))
2.将引用的单元格定义为数字
例子:
初始:=IF([临界分数]2 *[可管理分数]2 > 12,“1 -临界”,IF([临界分数]2 *[可管理分数]2 > 6,“2 -高”,IF([临界分数]2 *[可管理分数]2 > 2,“3 -中等”,“4 -低”)))
新:=IF(VALUE([临界分数]2)* VALUE([可管理分数]2)> 12,"1 -临界",IF(VALUE([临界分数]2)* VALUE([可管理分数]2)> 6,"2 -高",IF(VALUE([临界分数]2)* VALUE([可管理分数]2)> 2,"3 -中等","4 -低"))))
第一个选项可能是你想要做的。我只是想展示第二个选项作为一个供参考的未来公式建设
类别
Try this<\/p>
=IF(Available@row > 0, \"PES\", JOIN(INDEX(COLLECT(Facility:Facility, [Microscope: 1]:[Microscope: 1], HAS(@cell,\"6633112443\")), 1)))<\/p>
Will this work for you?<\/p>
Kelly<\/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":106545,"type":"question","name":"Automatically Delete Attachments when a condition is met?","excerpt":"Hello, I am looking for a way to automatically delete attachments on a row when the work is approved. Is this possible?","categoryID":322,"dateInserted":"2023-06-16T13:00:01+00:00","dateUpdated":"2023-06-16T13:00:52+00:00","dateLastComment":"2023-06-19T12:21:53+00:00","insertUserID":162459,"insertUser":{"userID":162459,"name":"Krys West","title":"Office Manager","url":"https:\/\/community.smartsheet.com\/profile\/Krys%20West","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T13:31:47+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":162459,"lastUser":{"userID":162459,"name":"Krys West","title":"Office Manager","url":"https:\/\/community.smartsheet.com\/profile\/Krys%20West","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T13:31:47+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":30,"score":null,"hot":3374099514,"url":"https:\/\/community.smartsheet.com\/discussion\/106545\/automatically-delete-attachments-when-a-condition-is-met","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106545\/automatically-delete-attachments-when-a-condition-is-met","format":"Rich","lastPost":{"discussionID":106545,"commentID":381128,"name":"Re: Automatically Delete Attachments when a condition is met?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381128#Comment_381128","dateInserted":"2023-06-19T12:21:53+00:00","insertUserID":162459,"insertUser":{"userID":162459,"name":"Krys West","title":"Office Manager","url":"https:\/\/community.smartsheet.com\/profile\/Krys%20West","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T13:31:47+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-19T12:22:43+00:00","dateAnswered":"2023-06-16T18:43:16+00:00","acceptedAnswers":[{"commentID":381061,"body":"
Hi @Krys West<\/a> <\/p> I hope you're well and safe!<\/p> Unfortunately, it's not possible now, but it's an excellent idea!<\/p> Please submit this as a Product Feedback or Idea <\/strong>(If it hasn't been added already)<\/em><\/strong> when you have a moment.<\/strong><\/a><\/p> I hope that helps!<\/p> Be safe, and have a fantastic weekend!<\/p> Best,<\/p> Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a> <\/p> ✅Please support the Community by marking the post(s)<\/em> <\/em><\/strong>that<\/em> <\/em><\/strong>helped or answered your question or solved your problem with <\/em>the accepted answer\/helpful, Insightful\/Vote Up\/Awesome<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/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":106579,"type":"question","name":"Split Text","excerpt":"Can someone assist me? I need a formula on how to split the text for this below. Ex. LOW - VS-87 - Service-FS Battery Replacement Lead-MEGA MALL-1259410 I need a to have a column that would write MEGA MALL only.","categoryID":322,"dateInserted":"2023-06-17T17:04:55+00:00","dateUpdated":null,"dateLastComment":"2023-06-18T01:39:56+00:00","insertUserID":103391,"insertUser":{"userID":103391,"name":"Marilen.Navarro103391","url":"https:\/\/community.smartsheet.com\/profile\/Marilen.Navarro103391","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2019-09\/60\/88\/n6088a8f5166f388fd95cfcb413bcbd0e.jpg","dateLastActive":"2023-06-18T01:41:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":112221,"lastUser":{"userID":112221,"name":"Kelly Moore","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20Moore","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jnPa4zng1Pw!n1lbH6Wxgbo!UbxYNkVsKJw","dateLastActive":"2023-06-19T02:46:11+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":32,"score":null,"hot":3374075691,"url":"https:\/\/community.smartsheet.com\/discussion\/106579\/split-text","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106579\/split-text","format":"Rich","lastPost":{"discussionID":106579,"commentID":381096,"name":"Re: Split Text","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381096#Comment_381096","dateInserted":"2023-06-18T01:39:56+00:00","insertUserID":112221,"insertUser":{"userID":112221,"name":"Kelly Moore","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20Moore","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jnPa4zng1Pw!n1lbH6Wxgbo!UbxYNkVsKJw","dateLastActive":"2023-06-19T02:46:11+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-18T01:42:10+00:00","dateAnswered":"2023-06-18T01:39:56+00:00","acceptedAnswers":[{"commentID":381096,"body":"