Excel VBA条件格式
我想在 Excel 中使用预定义的条件格式生成某些 vels。如果输入数字 1,则应显示 3 个未圈出的符号中的绿色图标。到目前为止,这是我的代码:
Sub AddIconCondFormat(cell1 As range, cell2 As range)
range(cell1, cell2).Select
With Selection
.FormatConditions.Delete
'.FormatConditions.Add Type:=xlCellValue, Operator:XlEqual, Formula1:
End With
End Sub
我不知道 .FormatConditions 的所有必要参数。有人知道他们是否列在某个地方吗?
I want to generate certain vells in Excel with predefined conditional formatting. If number 1 is entered the green icon from 3 symbols uncircled should be shown. Here is my code so far:
Sub AddIconCondFormat(cell1 As range, cell2 As range)
range(cell1, cell2).Select
With Selection
.FormatConditions.Delete
'.FormatConditions.Add Type:=xlCellValue, Operator:XlEqual, Formula1:
End With
End Sub
I don't know all the necessary parameters for .FormatConditions. Does someone know if they are listed somewhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用宏录制后,我得到了有效的代码:
After using macro recording I got this code which works: