in A100 steht: 2010-001-aaaaa.xlsm
Guten Abend,
ich probier seit einiger Zeit dies Formel in VBA zu erstellen,
ich stehe aber anscheinend auf einem Schlauch :-) und schaffe es nicht :-(
Bitte um Hilfe
Gruß
Helmut
Public Sub test1()
ActiveCell.Value = Evaluate("=IF(A100="""","""",MID(LEFT(A100,FIND(""."",A100,1)-1),6,99))")
End Sub
Public Sub test2()
Dim strAddress As String
strAddress = Cells(100, 1).Address
ActiveCell.Value = Evaluate("=IF(" & strAddress & "="""","""",MID(LEFT(" & strAddress & ",FIND(" _
".""," & strAddress & ",1)-1),6,99))")
End Sub
ActiveCell.Value = Mid$(Left$(Range("A100"), InStrRev(Range("A100"), ".") - 1), 6)