| 
    
     |  | こんにちは 
 >表が用意されているのですが、表の行数が200前後と多いため、
 行数としては、それほど多いとは思えません。
 
 >F列に表の各行の文字列を全て表示させ、
 数式を使っているのでしょうか?
 
 > Dim a
 Variant型になります。
 
 > a = Me.TextBox1.text
 > Dim x As Long, y
 yがVariant型になります。
 
 >  x = Range("F3").CurrentRegion.Rows.Count
 >  y = x - 4
 4引いてるという事は結局、表は1行目からあるのでは?
 
 >    Cells(i, 6).Select
 >   Set s = ActiveCell.Find(what:=a, lookat:=xlPart)
 Cells(i, 6)という単一セルに「a」が含まれているかどうか判定してます。
 
 >    If s Is Nothing Then
 >      ActiveCell.Offset(0, 1).Value = 1
 含まれていない場合に「1」を立てる?
 
 もしループ処理するなら、
 
 Dim a As String
 Dim x As Long
 Dim i As Long
 
 a = Me.TextBox1.text
 With Worksheets("Sheet1") '対象シートに変更要
 x = .Range("F65536").End(xlUp).Row
 For i = 4 To x
 If InStr(1, .Cells(i, 6).Value, a) > 0 Then
 .Cells(i, 7).Value = 1
 Else
 .Cells(i, 7).ClearContents
 End If
 Next
 End With
 
 F列のセルに「a」の値が含まれているかどうかだけで判定出来ると思います。
 
 
 |  |