Public
Sub
letzte_zeile()
letztezeile = Worksheets(
"Neudaten"
).Cells(Rows.Count, 1).
End
(xlUp).Row
Worksheets(
"Neudaten"
).Range(
"J1"
) =
"Tage"
Worksheets(
"Neudaten"
).Range(
"J1"
).Columns.AutoFit
With
Worksheets(
"Neudaten"
).Range(
"J2:J"
& letztezeile)
.FormulaLocal =
"=NETTOARBEITSTAGE(F2;I2)"
.Value = .Value
Worksheets(
"Neudaten"
).Range(
"K1"
) =
"Zeit"
Worksheets(
"Neudaten"
).Range(
"K1"
).Columns.AutoFit
With
Worksheets(
"Neudaten"
).Range(
"K2:K"
& letztezeile)
.FormulaLocal =
"=SVERWEIS(J2;Hilfstabelle!A:B;2;0)"
.Value = .Value
With
Worksheets(
"Neudaten"
)
.Columns(
"A:K"
).Sort Key1:=.Range(
"J2"
), Order1:=xlDescending, Header:=xlYes, OrderCustom:=1, _
MatchCase:=
False
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End
With
End
With
End
With
End
Sub