- 帖子
- 678
- 主題
- 147
- 精華
- 0
- 積分
- 799
- 點名
- 0
- 作業系統
- win 8
- 軟體版本
- MS 2003
- 閱讀權限
- 50
- 性別
- 男
- 註冊時間
- 2016-2-9
- 最後登錄
- 2022-1-20
|
本帖最後由 ziv976688 於 2019-12-6 14:10 編輯
說明的筆誤修正 :
選取BB17:BX80修正為選取BB17:BK80
格式往右複製到BX欄修正為格式往右複製到BK欄
謝謝 !
===========================================
Sheet1錄製的程式碼如下 :
Sub Macro1()
'
' Macro1 Macro
' MC SYSTEM 在 2019/12/6 錄製的巨集
'
'
Range("BB17:BK80").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(MIN(IF((MOD(ROW($16:$79),7)=2),BB$16:BB$79))=BB16)*(MOD(ROW(BB16),7)=2)*(BB16<5)"
Selection.FormatConditions(1).Font.ColorIndex = 3
Selection.FormatConditions(1).Interior.ColorIndex = 40
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(MIN(IF((MOD(ROW($16:$79),7)=2),BB$16:BB$79))=BB16)*(MOD(ROW(BB16),7)=2)"
Selection.FormatConditions(2).Font.ColorIndex = 10
Selection.FormatConditions(2).Interior.ColorIndex = 40
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(MOD(ROW(BB16),7)=2)*(BB16<10)"
Selection.FormatConditions(3).Font.ColorIndex = 10
End Sub |
|