excel - VBA:文本下方的条件格式单元格
问题描述
我有一个包含表格格式数据的原始数据。如果任何单元格值包含可以出现在单元格中的任何位置的文本“紧急”,我需要突出显示连续的 6 行。
我写了一个代码,但没有为我工作。在这里,我使用“J”列进行硬编码。但是我的字符串可以出现在任何列中。
With Cells
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ISNUMBER(SEARCH(""Urgent*"",$J1))"
With .FormatConditions(.FormatConditions.Count)
.SetFirstPriority
With .Interior
.PatternColorIndex = xlAutomatic
.Color = 7405514
.TintAndShade = 0
End With
StopIfTrue = False
End With
![excel] https://ibb.co/swkBbtY
解决方案
推荐阅读
- swift - 在 CallDirectoryHandler 中展开可选值时总是意外发现 nil
- javascript - 如何在.net core web api项目中加载swagger UI后加载javascript文件
- css - 使用 react-transition-group 作为子组件接收新的道具
- javascript - 根据顺序重新渲染映射数组
- c# - 如何使用鼠标和锁定角度每 5 度画线
- python - 查找矩阵中具有相同值的(垂直或水平)相邻元素的数量
- avro - 如何在 Java 中将字节数组序列化为 AVRO?
- sql - 如何使用局部变量或用户定义函数更新表?
- c# - 事件不是第一次触发
- git - 从 BitBucket 克隆存储库时文件被修改