| 
    
     |  | ▼nonoka さん: 
 こんにちは。
 M列が空白の場合にのみ処理するコードを追加しました。
 また、
 If Sheets("INPUT").Range("B5").Value <> "✓" Then Exit Sub
 としていましたが、ほんとうが、値はレ点ですね。
 そこも変更してあります。
 
 ところで、現在、シートイベントでレ点セットしておられますよね。
 今回のコード、もしかしたら、そのイベントルーティンに組み込むほうがいいのでは?
 
 Sub Sample2()
 Dim c As Range
 
 If Sheets("INPUT").Range("B5").Value <> ChrW(10003) Then Exit Sub
 
 Application.ScreenUpdating = False
 
 With Sheets("Schedule")
 
 Set c = .Columns("L").Find(What:="Before opereation", LookAt:=xlWhole)
 
 Do While Not c Is Nothing
 If Len(c.Offset(, 1).Value) = 0 Then 'M列が空白なら
 c.EntireRow.Range("K1:AQ1").ClearContents
 End If
 Set c = .Columns("L").FindNext(After:=c)
 Loop
 End With
 
 Application.ScreenUpdating = True
 
 End Sub
 
 |  |