Sub
aufteilen()
Text =
"Umweltdaten.pdf"
If
UBound(Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)) = 2
Then
Cells(1, 1) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0)
Cells(1, 2) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(1)
Cells(1, 3) = Replace(Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(2),
"_"
,
"/"
)
Else
If
Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0) <>
"Umweltdaten"
And
UBound(Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)) = 1
Then
Cells(1, 1) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0)
Cells(1, 2) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(1)
Else
If
UBound(Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)) = 0
Then
Cells(1, 2) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0)
Else
Cells(1, 2) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0)
Cells(1, 3) = Replace(Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(1),
"_"
,
"/"
)
End
If
End
If
End
If
End
Sub