Newbies Al Dugan Posted June 5, 2003 Newbies Posted June 5, 2003 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.
tinac Posted June 5, 2003 Posted June 5, 2003 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.
Ugo DI LUCA Posted June 5, 2003 Posted June 5, 2003 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)
Recommended Posts
This topic is 8101 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now