- 帖子
- 163
- 主題
- 1
- 精華
- 0
- 積分
- 170
- 點名
- 0
- 作業系統
- Window 7
- 軟體版本
- Office 2007
- 閱讀權限
- 20
- 性別
- 男
- 註冊時間
- 2010-9-5
- 最後登錄
- 2022-7-20
|
回復 1# s13030029
請參考
Sub test()
Dim mycolor%, x$, cell As Range
For Each cell In Range([A1], [A65536].End(3))
If cell.Value <> x Then
mycolor = IIf(mycolor = 5, 10, 5)
x = cell.Value
End If
cell.Font.ColorIndex = mycolor
Next cell
End Sub |
|