Calculation-Performance
Lorenz
Nach untenstehenden Codebrocken werden einige Formeln durch Werte ersetzt (.value = .value).
Jetzt zu meiner Frage: Ist es der Performance dienlich so nach dem Motto (If HasFormula(Target.Row) Then .Value=.Value) oder ist es besser so zu belassen.
Erläuterung zum Code (NR = Target.Row) z.B.: "=Zeig_Art_ND" sind im Tabellenblatt benannte Formeln.
With .Cells(NR, 4)
'.Calculate
.Value = .Value
If .Value = 0 Then .Value = ""
End With
With .Cells(NR, 2)
.Value = "=ND"
.Value = .Value
If .Value = 0 Then .Value = ""
End With
With .Cells(NR, 3)
.Value = "=Zeig_Art_ND"
.Value = .Value
If .Value = 0 Then .Value = ""
End With
With .Cells(NR, 44)
.Value = "=Zul_240"
.Value = .Value
If .Value = 0 Then .Value = ""
End With
vND = .Cells(111, 240).FormulaR1C1
.Cells(Target.Row, 240) = vND
With .Cells(Target.Row, 240)
.Value = .Value
End With
vND = .Cells(111, 241).FormulaR1C1
.Cells(Target.Row, 241) = vND
With .Cells(Target.Row, 241)
.Value = .Value
End With
vV8NextTxt = .Cells(111, 113).FormulaR1C1
.Cells(Target.Row, 113) = vV8NextTxt
With .Cells(NR, 113)
.Calculate
.Value = .Value
If .Value = 0 Then .Value = ""
End With
Call StatistikNext
Call KalkulationNext
.Cells(NR, 172) = ValuNext
Call TagesstundenNext
End With
Kann mir jemand berichten welche Variante die sichere und schnellere ist?
Danke im Voraus & Grüße
Lorenz