- 帖子
- 19
- 主題
- 6
- 精華
- 0
- 積分
- 30
- 點名
- 0
- 作業系統
- winxp
- 軟體版本
- office2007
- 閱讀權限
- 10
- 性別
- 男
- 來自
- 台灣
- 註冊時間
- 2013-7-8
- 最後登錄
- 2025-1-16
|
3#
發表於 2014-8-30 09:07
| 只看該作者
感激解惑此困擾問題我自己練習巨集如下
Sub Macro3()
'
' Macro3 Macro
'
'
Range("B3:B17").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="=0.9"
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
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=0.7"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16752384
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13561798
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
End Sub |
|