Zahl runden / Meine Rundungs-Routine
Karl-Heinz Metz
Gesendet: 17.03.24 17:03
Betreff: Zahl runden / Meine Rundungs-Routine


New user

Beiträge: 1

Ort: D Neuwied am Rhein
Falls jemand Probleme beim Runden hat, nachstehend meine Routine:

Function KHM_Round(Wert, AnzahlNkStellen As Variant) As Variant
Rem Wert / NkStellen = Anzahl Nachkomma-Stellen
If (Nz(Wert, "") = "") Then Wert = 0
KHM_Round = Int(Abs(Wert) * 10 ^ AnzahlNkStellen + 0.5) / 10 ^ AnzahlNkStellen * Sgn(Wert)
End Function
Top of the page Bottom of the page