For
i = 1
To
leZeile - 1
With
Workbooks(1).Worksheets(sheetname)
tmin = .Cells(i + 1, 9)
tmax = .Cells(i + 1, 10)
jday = .Cells(i + 1, 5)
If
tmin = 9999
Or
tmax = 9999
Then
tmean = 9999
Else
: tmean = (tmin + tmax) / 2
End
If
.Cells(i + 1, 11) = tmean
If
month_col = 0
Then
If
jday > 0
And
jday < 366
Then
monat = Month((DateAdd(
"d"
, jday - 1,
"01.01.2015"
)))
tag =
CDate
(DateAdd(
"d"
, jday - 1,
"01.01.2015"
)) - DateSerial(2015, monat, 0)
Else
MsgBox
"JDAY not valid"
End
If
.Cells(i + 1, 1).Value = tag
.Cells(i + 1, 2).Value = monat
End
If
datum = .Cells(i + 1, 1).Value &
"."
& .Cells(i + 1, 2).Value
.Cells(i + 1, 4).Value = datum
If
.Cells(i + 1, 8) = 9999
Then
If
i > 1
Then
If
.Cells(i + 1, 7) < 9999
Then
pseudo_snow = .Cells(i + 1, 7) - .Cells(i, 7)
If
pseudo_snow >= 0
Then
.Cells(i, 8) = pseudo_snow
Else
: .Cells(i, 8) = 0
End
If
End
If
End
If
End
If
End
With