- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
4#
發表於 2010-7-14 19:35
| 只看該作者
本帖最後由 GBKEE 於 2010-7-14 19:37 編輯
回復 3# PD961A
是不是這個方向- Sub Macro1()
- ' Macro1 Macro
- ' hsu 在 2010/7/14 錄製的巨集
- Range("A2:H17").Select
- Selection.FormatConditions.Delete
- Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=OR(A2=$A$1,A2=$B$1,A2=$C$1)"
- ' 依附檔錄製後修正的"=OR(A2=$A$1,A2=$B$1,A2=$C$1)"
- Selection.FormatConditions(1).Font.ColorIndex = xlAutomatic
- With Selection.FormatConditions(1).Interior
- .ColorIndex = 6
- .Pattern = xlSolid
- End With
- End Sub
複製代碼 |
|