AW: VBA Code für Text teilen
Tino
Hallo,
kannst ja mal testen, gehe in A1 von einer Überschrift aus.
Kommt als Code in die entsprechende Tabelle.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Bereich As Range
Dim Regex As Object
Set Bereich = Intersect(Range("A2", Cells(Rows.Count, 1)), Target)
If Not Bereich Is Nothing Then
Application.EnableEvents = False
For Each Bereich In Bereich
If Bereich Like "* ####" Then
Cells(Bereich.Row, 3) = Left$(Bereich, InStrRev(Bereich, " ") - 1)
Else
Cells(Bereich.Row, 3) = ""
End If
Next Bereich
Application.EnableEvents = True
End If
End Sub
Gruß Tino