0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

テスト106

Posted at
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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?