0
如何使两列满足两个条件然后将其突出显示为红色?现在是列满足条件,然后它会突出显示红色。两个柱子的条件形成
If InStr(rcol.Value, "L-Start") > 0 Then
With rcol.EntireColumn.Cells
.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:="=(today() - 120)"
With .FormatConditions(1).Font
.Color = RGB(255, 0, 0)
End With
End With
End If
If InStr(rcol.Value, "L-Type") > 0 Then
With rcol.EntireColumn.Cells
.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, Formula1:="=""Q"""
With .FormatConditions(1).Font
.Color = RGB(255, 0, 0)
End With
End With
End If
使用AND检查同一IF中的两个条件:如果InStr(rcol.Value,“L-Start”)> 0并且InStr(rcol.Value,“L-Type”)> 0 Then'。它不仅仅是突出显示红色,所以我无法帮助更多,因为它很难解释。 –
你是否只想突出显示列,如果两者都是真的? – Luke