Sub Find_Color()
Dim myRange As Range
Application.FindFormat.Clear
Application.FindFormat.Interior.ColorIndex = 6
'色のついたセルを検索する...〆(・ω・ )メモメモ
With ThisWorkbook.Sheets("入力表")
'セルの色が黄色でも空欄だったら何も検索できない。何か値が入っていれば検索できる
Set myRange = .Columns("B:B").Find(What:="*", SearchFormat:=True)
End With
If myRange Is Nothing Then
MsgBox "該当データなし"
Exit Sub
Else
MsgBox Replace(myRange.Address, "$", "")
End If
End Sub
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme