【发布时间】:2016-01-27 21:13:15
【问题描述】:
我想在从 access 导出到 excel 时进行条件格式化。我必须检查条件 1(Type:=xlExpression) 和条件 2(Type:=xlTextString)。如果两者都为真,则在 Excel 中用任何颜色突出显示该行。这是我的代码:
With xlSheet
Set range = .Range("A1:L1")
Sheets("xyz").Select
range.FormatConditions.Add Type:=xlExpression, Formula1:="=AND($I1>=TODAY(),($I1<(TODAY()+30)))"
rng.FormatConditions.Add Type:=xlTextString, String:="Focus", TextOperator:=xlContains
With rng.FormatConditions(1).Interior
.Color = Any color
End With
End With
如何将以上 2 个条件合并为一个条件。
谢谢,
【问题讨论】: