Hi, I have a bit of code that performs a commission calculation. My boss now wants me to build an explnantion field that will explain how the commission was calculated. This seemed not too hard, more time consuming, but i have run up against a roadblock.
Private Function ScheduleBExplanation(BBPerc As Double, NoteAmount As Double, _
SUMNA As Double, HUD801 As Double, Hud808 As Double) As Variant
'Calcs Schedule B
Dim Tier1 As Double
Dim Tier2 As Double
Dim Tier3 As Double
Dim Tier4 As Double
SUM800 = HUD801 + Hud808
Overage800 = SUM800 - 1
If SUM800 <= 1 Then
Tier1 = SUM800 - 5
Tier2 = (Tier1 / 100) * NoteAmount
ScheduleBExplanation = "(((" & Left(SUM800, 1) & "." & Right(SUM800, Len(SUM800) - InStr(SUM800, ".") & " - .5)/100) *" & NoteAmount
.......
This should return something that looks like this (0.75 - .5)/100) * 500000
but just returns (0.0 - .5)/100 * 500000
Help!
Private Function ScheduleBExplanation(BBPerc As Double, NoteAmount As Double, _
SUMNA As Double, HUD801 As Double, Hud808 As Double) As Variant
'Calcs Schedule B
Dim Tier1 As Double
Dim Tier2 As Double
Dim Tier3 As Double
Dim Tier4 As Double
SUM800 = HUD801 + Hud808
Overage800 = SUM800 - 1
If SUM800 <= 1 Then
Tier1 = SUM800 - 5
Tier2 = (Tier1 / 100) * NoteAmount
ScheduleBExplanation = "(((" & Left(SUM800, 1) & "." & Right(SUM800, Len(SUM800) - InStr(SUM800, ".") & " - .5)/100) *" & NoteAmount
.......
This should return something that looks like this (0.75 - .5)/100) * 500000
but just returns (0.0 - .5)/100 * 500000
Help!