- 帖子
- 38
- 主題
- 7
- 精華
- 0
- 積分
- 48
- 點名
- 0
- 作業系統
- win8
- 軟體版本
- office2010
- 閱讀權限
- 10
- 性別
- 男
- 註冊時間
- 2015-4-30
- 最後登錄
- 2016-12-5
|
請問若如下狀態,使用符合條件關鍵字"?",將會把四個儲存格都格式化條件..成為一種顏色
? 是代表所有字元,不能單獨符合才變色嗎?
A
1 123?321
2 123
3 ?321
4 123?- Sub Macro2()
- Columns("A:A").Select
- Selection.FormatConditions.Add Type:=xlTextString, String:="?", _
- TextOperator:=xlContains
- Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
- With Selection.FormatConditions(1).Font
- .Color = -16383844
- .TintAndShade = 0
- End With
- With Selection.FormatConditions(1).Interior
- .PatternColorIndex = xlAutomatic
- .Color = 13551615
- .TintAndShade = 0
- End With
- Selection.FormatConditions(1).StopIfTrue = False
- Range("D5").Select
- End Sub
複製代碼 |
|