Sub
seperateDays()
Dim
lngZeile
As
Long
Dim
lngZeileMax
As
Long
Dim
lngZ
As
Long
Dim
VarDat
As
Variant
Dim
lngSp
As
Long
Dim
lngSpalteMax
As
Long
With
Tabelle1
.Range(
"M:R"
).Clear
.Range(
"M1:Q1"
).Value = Array(
"Monat"
,
"Wochentag"
,
"Kunde"
,
"Kundennummer"
,
"Zeit"
)
.Range(
"M1:Q1"
).Font.Bold =
True
lngZ = 2
lngZeileMax = .Range(
"A"
& .Rows.Count).
End
(xlUp).Row
For
lngZeile = 2
To
lngZeileMax
VarDat = Split(.Range(
"C"
& lngZeile).Value,
""
)
lngZeileMax = UBound(VarDat)
For
lngSp = 0
To
lngSpalteMax
.Range(
"M"
& lngZ).Value = .Range(
"B"
& lngZeile).Value
.Range(
"N"
& lngZ).Value = VarDat(lgnSP)
.Range(
"O"
& lngZ).Value = .Range(
"E"
& lngZeile).Value
.Range(
"P"
& lngZ).Value = .Range(
"F"
& lngZeile).Value
.Range(
"Q"
& lngZ).Value = .Range(
"G"
& lngZeile).Value
lngZ = lngZ + 1
Next
lngSp
Next
lngZeile
End
With
End
Sub