ich muss leider das Thema wieder ansprechen weil die Anregungen von MCO, fcs und Werner hier der Code:
Sub InStr()
Dim i As Long, txt As String, such As String, varSuch, j As Integer, wks As Worksheet, spa _
As Long, bolOK As Boolean
Set wks = Worksheets("Tabelle3")
With wks
spa = 3 'Nummer der Spalte mit den Texten
such = TextBox2.Text
If such = "" Then Exit Sub
For i = 2 To .Cells(.Rows.Count, spa).End(xlUp).Row
With .Cells(i, spa)
If Len(.Text) = Len(such) Then
bolOK = True
varSuch = Split(such, " ")
For j = 0 To UBound(varSuch)
If InStr(.Text, varSuch(j)) = 0 Then
bolOK = False
Exit For
End If
Next
If bolOK = True Then
txt = txt & Chr(10) & wks.Cells(i, 1)
End If
End If
End With
Next i
' MsgBox txt
' Label2 = txt
TextBox5.Text = txt
End With
End Sub
mir nicht die Ergebnisse gegeben haben die ich haben möchte.Bevor ich euch erkläre was ich erreichen will (was schwierig ist) lade ich eine Mappe mit Beschreibung hoch.
https://www.herber.de/bbs/user/120752.xlsx
Ich hoffe ihr versteht was ich meine.
Vielen Dank in Voraus
Antonio