Advertisement
bousaid

IRG 2022 VBA

Jan 3rd, 2022 (edited)
643
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' IRG 2022 Function By Boussaid Mustafa
  2. ' APC SALI 2022
  3. Function IRG2022_New(moTr)
  4.  
  5. Dim abat As Double
  6.  
  7. moTr = (Int(moTr / 10)) * 10
  8. If moTr <= 30000 Then
  9.     IRG2022_New = 0
  10. Else
  11.     Select Case moTr
  12.         Case 20000 To 40000: IRG2022_New = (moTr - 20000) * 0.23
  13.         Case 40001 To 80000: IRG2022_New = 4600 + (moTr - 40000) * 0.27
  14.         Case 80001 To 160000: IRG2022_New = 15400 + (moTr - 80000) * 0.3
  15.         Case 160001 To 320000: IRG2022_New = 39400 + (moTr - 160000) * 0.33
  16.         Case Is > 320000: IRG2022_New = 92200 + (moTr - 320000) * 0.35
  17.     End Select
  18.  
  19.     abat = IRG2022_New * 0.4
  20.     If abat < 1000 Then abat = 1000
  21.     If abat > 1500 Then abat = 1500
  22.     IRG2022_New = IRG2022_New - abat
  23.    
  24.     If moTr <= 35000 Then
  25.         IRG2022_New = Round(IRG2022_New * (137 / 51) - (27925 / 8), 1)
  26.     End If
  27. End If
  28. End Function
Advertisement
RAW Paste Data Copied
Advertisement