Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use the following function to calculate discounts on sales volumes. It
works but will still accept entries other than integers and will usually show a 30% discount! The last message box must have a syntax error also.... Any help would be appreciated....TIA Function CCDiscount(ContractValue) Select Case ContractValue Case Is < 0 CCDiscount = "Error < 0" Case Is < 24000 CCDiscount = 0 Case Is < 33000 CCDiscount = 0.03 Case Is < 60000 CCDiscount = 0.05 Case Is < 120000 CCDiscount = 0.09 Case Is < 210000 CCDiscount = 0.15 Case Is < 600000 CCDiscount = 0.2 Case Is = 600000 CCDiscount = 0.3 Case Else CCDiscount = "Error" End Select End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select case in vba | Excel Discussion (Misc queries) | |||
Case Select | Excel Worksheet Functions | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Select Case | Excel Discussion (Misc queries) | |||
Need help on Select Case | Excel Worksheet Functions |