Gruppe
Allgemein
Problem
Aus ausgewählten Werten soll die Mehrwertsteuer wahlweise heraus- oder hinzugerechnet werden.
StandardModule: Modul1
Sub ZuNetto()
Const cd As Double = 1.16
Dim rng As Range
For Each rng In Selection.Cells
If IsEmpty(rng) = False Then
If IsNumeric(rng) Then
rng.Value = rng.Value / cd
End If
End If
Next rng
End Sub
Sub ZuBrutto()
Const cd As Double = 1.16
Dim rng As Range
For Each rng In Selection.Cells
If IsEmpty(rng) = False Then
If IsNumeric(rng) Then
rng.Value = rng.Value * cd
End If
End If
Next rng
End Sub