Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' =================================================================================================
- ' IRG 2022 Function By Boussaid Mustafa |
- ' APC SALI 2022 |
- ' Normal + Handicape |
- ' Usage: |
- '---->Normal |
- ' =IRG2022_New(1;A1) |
- '---->Handicape |
- ' =IRG2022_New(2;A1) |
- ' =================================================================================================
- Function IRG2022_New(TypeIRG, moTr) As Double
- moTr = Int(moTr / 10) * 10
- If moTr <= 30000 Then
- IRG2022_New = 0
- Else
- Select Case moTr
- Case 30010 To 40000: IRG2022_New = (moTr - 20000) * 0.23
- Case 40001 To 80000: IRG2022_New = 4600 + (moTr - 40000) * 0.27
- Case 80001 To 160000: IRG2022_New = 15400 + (moTr - 80000) * 0.3
- Case 160001 To 320000: IRG2022_New = 39400 + (moTr - 160000) * 0.33
- Case Is > 320000: IRG2022_New = 92200 + (moTr - 320000) * 0.35
- Case Else: IRG2022_New = 0
- End Select
- Dim abat As Double
- abat = IRG2022_New * 0.4
- If abat < 1000 Then abat = 1000
- If abat > 1500 Then abat = 1500
- IRG2022_New = IRG2022_New - abat
- '1= Normal 2= Handicape
- Select Case TypeIRG
- Case 1 '---->Normal
- If moTr <= 35000 Then
- IRG2022_New = (IRG2022_New * 137 / 51) - (27925 / 8)
- End If
- Case 2 '---->Handicape
- If moTr < 42500 Then
- IRG2022_New = (IRG2022_New * 93 / 61) - (81213 / 41)
- End If
- End Select
- End If
- IRG2022_New = Round(IRG2022_New, 1)
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement