Need some help please.
I have a user form that has multiple combo boxes. I then have some textboxes that contain vlookups that are working fine and one textbox that requires an "IF" statement.
The statement will come run after a weight is entered into Weighttb.
When then is done I need the "UKTB" to calculate a price for me.
This needs to read as:
if the weight is less than 35kg then calculate 3.98 + (weight - 35) *0.2 else the price is 3.98
however if the postcode selected is "BT" the the calculation will be 12.88 + (weight -30) * 0.6
This is how my code looks
Private Sub Weighttb_Change()
If PostCodecb = "BT" Then
UKMtb = 12.88 + (Weighttb - 30) * 0.6
ElseIf Weighttb <= "35" Then
UKMtb = 3.98 + (Weighttb - 35) * 0.2
Else
UKMtb = "3.98"
End If
End Sub
A calculation is being ran but it does not seem correct.
Any help?
Thank you