une fonction pour calculer l’irg
Public Function irg(ByVal montant)
Dim impos As Double
Dim abat
impos = 0#
irg = 0#
montant = Int(montant)
If ((montant >= 10001) And (montant <= 30000)) Then impos = (montant – _
10000) * 0.2
If ((montant >= 30001) And (montant <= 120000)) Then impos = 4000 + _
(montant – 30000) * 0.3
If montant >= 120001 Then impos = 31000 + _
(montant – 120000) * 0.35
abat = (40 * impos / 100)
If abat < 1000 Then abat = 1000
If abat > 1500 Then abat = 1500
impos = impos – abat
impos = (impos * 10) + 0.0001
impos = impos / 10
impos = Int(impos)
irg = impos
If irg < 0 Then irg = 0
End Function
‘il faut mettre cette fonction dans un modul excel et le tour est joue
‘appel de la fonction
irg(montant imposable)