Sub
aufteilen()
Text =
"1.3.g Umweltdaten 11_08.2016.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"
Then
Cells(1, 2) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0)
Cells(1, 3) = Replace(Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(1),
"_"
,
"/"
)
Else
Cells(1, 1) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(0)
Cells(1, 2) = Split(Left(Text, InStrRev(Text,
"."
) - 1),
" "
)(1)
End
If
End
If
End
Sub