June 5, 200322 yr Newbies Below is an if statement formula I am having trouble with. I get the error message "There are too few seperators in this function" Can someone help me get the syntax correct? If (ShipMethod = "Ground",5.95+AddWeightCost,If (ShipMethod = "2Day",8.95+AddWeightCost2,If (ShipMethod="Overnight",14.95+AddWeightCost2))) Thank you.
June 5, 200322 yr If (ShipMethod = "Ground",5.95+AddWeightCost,If (ShipMethod = "2Day",8.95+AddWeightCost2,If (ShipMethod="Overnight",14.95+AddWeightCost2 ,"Enter Ship Method"))) Should do it. What you are missing is telling it what to do if your ShipMethod doesn't equal any of the three options. You could actually change that last argument to be whatever you needed. Hope this helps.
June 5, 200322 yr Hi, There are several methods to use according to the size of your db. 1. A Case Statement is quicker than an If.... Switch to a Case statement Case(ShipMethod = "Ground", 5,95+AddWeightCost, ShipMethod = "2Day", 8,95+AddWeightCost2, ShipMethod = "Overnight", 14,95+AddWeightCost2). 2. Working with text in calculation could be slower than number, and it seems than Choose is also quicker than Case. Besides, if you were selecting the ShipMethod by a togglescript, this should be straightforward. You'll need an intermediate calc. c_ShipMethod = Case(ShipMethod = "Ground", 1, ShipMethod = "2Day", 2, ShipMethod = "Overnight", 3, 0) Then, the final formula would be : Choose (c_ShipMethod,"", 5.95+AddWeightCost, 8.95+AddWeightCost2, 14,95+AddWeightCost2)
Create an account or sign in to comment