Deuce Bucksman
Board Regular
- Joined
- Jan 17, 2011
- Messages
- 102
Quick Question: does anyone know how to use a formula within a select case structure? Essentially, i'm trying to make the below case strucutre to calculate commisions based on the sales input. Everytime I try to multiply the variable comish into the Case value (14%), it keeps giving me an error. Any advice? Thanks!
Function Commision()
Dim Comish
Comish = 25000
Case1 = 0.08
Case2 = 0.1
Case3 = 0.12
Case4 = 0.14
Select Case Comish
Case 0 To 5000: commish (Case1)
Case 5001 To 10000: commish (Case2)
Case 10001 To 15000: commish (Case3)
Case Else: commish (Case4)
End Select
End Function
Function Commision()
Dim Comish
Comish = 25000
Case1 = 0.08
Case2 = 0.1
Case3 = 0.12
Case4 = 0.14
Select Case Comish
Case 0 To 5000: commish (Case1)
Case 5001 To 10000: commish (Case2)
Case 10001 To 15000: commish (Case3)
Case Else: commish (Case4)
End Select
End Function