ich möchte den Text in der Zelle D1 in der
Spalte B2 bis B100 suchen.
Selectieren und im zweiten Ansatz löschen.
gruß
kurt k
Sub test()
Dim c As Range
Set c = Range("B2:B100").Find(Range("D1").Value, LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
c.Select
c.Clear
End If
End Sub
dim suchwert as string, firstAddress as string
dim c as range
suchwert=Worksheets(1).Range("d1")
With Worksheets(1).Range("b2:b100")
Set c = .Find(suchwert, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
' c.Interior.Pattern = xlPatternGray50
c.value=""
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address firstAddress
End If
End With
Schöne Grüße,