返回列表 上一主題 發帖

請問:如何尋找黃色底色的儲存格?!

Application.FindFormat.Interior.ColorIndex = 6
Cells.Find(What:="", After:=[a1], SearchDirection:=xlNext, SearchFormat:=True).Select

TOP

Sub YY()
Application.FindFormat.Interior.ColorIndex = 6
With ActiveSheet
For i = 1 To .Columns.Count
Set c = .Columns(i).Find(What:="", After:=.Cells(65536, i), SearchDirection:=xlNext, SearchFormat:=True)
If Not c Is Nothing Then MsgBox c.Address
Next
End With
End Sub

TOP

木工版主你好:有關 Interior.ColorIndex 那裡可以找到 List, 如果知道請告知,謝謝!!
linshin1999 發表於 2011-1-17 09:25



    For I = 1 To 56
Cells(I, 1).Interior.ColorIndex = I
Next
這樣跑一下就有了

TOP

        靜思自在 : 謊言像一朵盛開的鮮花,外表美麗,生命短暫。
返回列表 上一主題