I have a curious problem (curious to me anyway).
The following code looks at a subtotal in cell BB33 and then selects the appropriate shipping cost.
An example of the problem is that shipping will not equal $20 until the subtotal is 100.51. Anything between 100 and 100.50, $15.00 is incorrectly selected.
What is going wrong here?
'Shipping Costs
If Not Intersect(Target, Range("A21:AW32")) Is Nothing Then
amount = ActiveSheet.Range("BB33")
Select Case amount
Case 0 To 50#
shipping = 10
Case 50.01 To 99.99
shipping = 15
Case 100# To 149.99
shipping = 20
Case 150# To 249.99
shipping = 25
Case 250# To 349.99
shipping = 35
Case 350# To 499.99
shipping = 50
Case Is > 499.99
shipping = 0.1 * ActiveSheet.Range("BB33")
End Select
ActiveSheet.Range("BB35") = shipping
End If
The following code looks at a subtotal in cell BB33 and then selects the appropriate shipping cost.
An example of the problem is that shipping will not equal $20 until the subtotal is 100.51. Anything between 100 and 100.50, $15.00 is incorrectly selected.
What is going wrong here?
'Shipping Costs
If Not Intersect(Target, Range("A21:AW32")) Is Nothing Then
amount = ActiveSheet.Range("BB33")
Select Case amount
Case 0 To 50#
shipping = 10
Case 50.01 To 99.99
shipping = 15
Case 100# To 149.99
shipping = 20
Case 150# To 249.99
shipping = 25
Case 250# To 349.99
shipping = 35
Case 350# To 499.99
shipping = 50
Case Is > 499.99
shipping = 0.1 * ActiveSheet.Range("BB33")
End Select
ActiveSheet.Range("BB35") = shipping
End If