交通灯(状态灯问题)

编程入门 行业动态 更新时间:2024-10-26 14:41:15
本文介绍了交通灯(状态灯问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果交通信号灯产生0值,如何使它显示为零值空白?现在,它返回此值:#VALUE!. (使用下面的公式)

If the stoplight produces a 0 value how do you get it to appear blank for a zero value? Right now it returns this: #VALUE!. (using the formula below)

使用以下公式,如何获取公式以产生两位数的信号灯:我正在寻找使其在数字1​​3上生成黑色并在数字15上生成白色的方法?

Using the formula below how do you get the formula to produce a stoplight for a double digit value: i was looking to get it to generate black on the number 13 and white on the number 15?

=""< DIV样式='font-weight:bold; font-size:45px; text-align:center;颜色:& choose(RIGHT(LEFT(CASES,2),1)",绿色",红色",黄色",橙色",蓝色",紫色", 灰色",黑色",白色")和;"/"/DIV">

="<DIV style='font-weight:bold; font-size:45px; text-align:center; color:"&CHOOSE(RIGHT(LEFT(CASES,2),1),"green","red","yellow","orange","blue","purple","grey","black","white")&";'>•</DIV>"

推荐答案

其他, 要使它对于零值显示为空白,可以使用IF函数. 要在数字13上生成黑色,在数字15上生成白色,可以在第三位置设置黑色,在第五位置设置白色.

Hi else, To get it to appear blank for a zero value, you can use IF Function. To generate black on the number 13 and white on the number 15, you can set black at the third position and white at fifth position.

="<DIV style='font-weight:bold; font-size:45px; text-align:center; color:"&IF(CASES=0,"white",CHOOSE(RIGHT(LEFT(CASES,2),1),"green","red","black","orange","white","purple","grey","yellow","blue"))&";'>•</DIV>"

参考:

Reference:

选择功能:

support.office/en -us/article/CHOOSE-function-e4b61fbc-40a4-4fe2-8b9c-c5e7a51fdbbe

左移功能:

support.office/en -us/article/LEFT-function-913824b4-fc42-4c8c-9229-0eaa57dcdf49

IF函数:

support.office/en -us/article/IF-function-7025be14-5665-43d0-af20-8293d1fe9d3a

RIGHT功能:

support.office/en -us/article/RIGHT-function-112699e2-fe7e-4cbf-8d1e-0e8db3884f26

最好的问候,

Lisa Chen

Lisa Chen

更多推荐

交通灯(状态灯问题)

本文发布于:2023-10-30 11:31:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542725.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:交通灯   状态

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!