| 
    
     |  | はる さん、こんにちわ。 検索はA列でよい、F列に今日の日付ということでこんなふうになりました。
 
 Private Sub CommandButton1_Click()
 Dim i As String, r1 As Range, ra As String
 '現在表示しているシートが対象
 With ActiveWorkbook.ActiveSheet.Columns("A:A")
 i = TextBox1.Text
 If i <> "" Then
 'A列だけチェック(複数ヒットする可能性もあるから繰返す)
 '詳細はFindメソッド、FindNextメソッドの使用例
 Set r1 = .Find(What:=i, LookIn:=xlFormulas, _
 LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
 MatchCase:=False) '部分一致?
 If Not r1 Is Nothing Then
 ra = r1.Address
 Do
 r1.Offset(0, 5).Value = Date '5列右に今日の日付
 Set r1 = .FindNext(r1)
 Loop While Not r1 Is Nothing And r1.Address <> ra
 End If
 End If
 End With
 End Sub
 
 
 |  |