Jump to content
Server Maintenance This Week. ×

Formula Syntax help


This topic is 7631 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

This topic is 7631 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.