J
jsr
I am new to working with VBA and I need some help. I am trying to
create a commission structure based on sales ranges - here is what I
have got - not sure how to write if its less than one amount but
greater than another (or vice versa)
any help is greatly appreciated....
Function clientcomm(sales) As Single
'calculates sales commissions based on client mgmt fees
Const comm1 As Double = 0.04
Const comm2 As Double = 0.05
Const comm3 As Double = 0.06
Select Case sales
Case Is >= 5000000
clientcomm = sales * tier3
Case Is >= 300000 <= 4999999
clientcomm = sales * tier2
Case Is < 2999999
clientcomm = sales * tier1
End Select
End Function
create a commission structure based on sales ranges - here is what I
have got - not sure how to write if its less than one amount but
greater than another (or vice versa)
any help is greatly appreciated....
Function clientcomm(sales) As Single
'calculates sales commissions based on client mgmt fees
Const comm1 As Double = 0.04
Const comm2 As Double = 0.05
Const comm3 As Double = 0.06
Select Case sales
Case Is >= 5000000
clientcomm = sales * tier3
Case Is >= 300000 <= 4999999
clientcomm = sales * tier2
Case Is < 2999999
clientcomm = sales * tier1
End Select
End Function