Thanks a lot Mr. Hans for your reply
this a different version of the same thing... But it did not achieve the desired results
Code: Select all
Function Tax(Amount As Double) As Variant
Dim s As Double
Dim i As Long
Dim tiers As Variant
Dim rates As Variant
tiers = Array(0, 15000, 30000, 45000, 60000, 400000)
rates = Array(0, 0.025, 0.01, 0.015, 0.02, 0.025)
For i = LBound(tiers) To UBound(tiers)
If Amount >= tiers(i) Then
s = s + (Amount - tiers(i)) * rates(i)
End If
Next i
Tax = Application.Ceiling(Round(s, 0), 0.05) * 10 / 10 / 12
End Function
it's still a bit blurry to me in this line of code
Code: Select all
rates = Array(0, 0.025, 0.01, 0.015, 0.02, 0.025)
Or maybe you have another version to achieve the results
Please consider checking out my work. Thanks again for your support, regards.
You do not have the required permissions to view the files attached to this post.