I could use some help here with this small function. Checked all of my variable names so I am not sure where the zero in the results are coming from.
Public Function GetTaxTable(TotalComp As Double, TargetComp As Double) As Double
Dim LTIPercent As Integer
Select Case [TotalComp]
Case 100000 To 249999
LTIPercent = 0.07
Case 250000 To 499999
LTIPercent = 0.1
Case 500000 To 749999
LTIPercent = 0.15
Case 750000 To 999999
LTIPercent = 0.25
End Select
If [TotalComp] > [TargetComp] * 1.2 Then
GetTaxTable = LTIPercent * [TotalComp]
Else: GetTaxTable = 0
End If
End Function
Public Function GetTaxTable(TotalComp As Double, TargetComp As Double) As Double
Dim LTIPercent As Integer
Select Case [TotalComp]
Case 100000 To 249999
LTIPercent = 0.07
Case 250000 To 499999
LTIPercent = 0.1
Case 500000 To 749999
LTIPercent = 0.15
Case 750000 To 999999
LTIPercent = 0.25
End Select
If [TotalComp] > [TargetComp] * 1.2 Then
GetTaxTable = LTIPercent * [TotalComp]
Else: GetTaxTable = 0
End If
End Function