Skip to main content
Question

Formula help with multiple choices

  • February 28, 2025
  • 0 replies
  • 190 views

Forum|alt.badge.img+8

I thought I saved the one I added so if this is duplicate I apologize, I could not find my original.

I want to have a formula field that says this but the , between Pacific Dunes 2 and [#of people in party}+1*9.63 is turning yellow and I have tried ( ) and,, but I can't get this to work. It tells me its expecting a comma

If(Contains([Salesroom]="Pacific Dunes 1","Pacific Dunes 2", [# of people in party]+1*9.63)

What I would ultimately like is 

If(Contains([Salesroom]="Pacific Dunes 1","Pacific Dunes 2", and GSlandsend [# of people in party]+1*9.63) or If[Saleroom]="Playa Grande" [#ofpeopleinparty]+1*7.81)

that way I only have to have one field instead of 3 fields - I have two of the fields working like this If(([Salesroom])="GS Landsend", [# of people in party]+1*9.63)

But as soon as I add more salesroom it doesn't like it

Thank you so much 

Edit I was wrong its not even multiplying correctly so there is something wrong in the *9.63 or *7.81

Example - column # of people 3 and then plus 1 would be 28.89 but its coming out a weird number of 11.63 ??

I actually got it to add correctly by  If(([Salesroom])="GS Landsend", [# of people in party]*9.63)+9.63

 

Forum|alt.badge.img+11

I am a little confused by the question, you are basically looking to nest multiple ifs together in 1 statement . You want to check value of Salesroom and then decide some calculations against it.

Correct??

For your calculation , BODMAS is the way to go essentially it's calculating 3+19.63 , essentially it's doing 3+(1 * 9.63) = 13.63 , your formula will have to become

If(([Salesroom])="GS Landsend", ([# of people in party]+1)*9.63)

For your multiple ifs , I like keeping it, in syntax below , easier to read 

If(
  [Salesroom] = "Pacific Dunes 1", "Pacific Dunes 2",
  [Salesroom] = "GS Landsend", ([# of people in party] + 1) * 9.63,
  [Salesroom] = "Playa Grande", ([# of people in party] + 1) * 7.81
)

CONTAINS evaluate TRUE/FALSE , essentially below check if salesroom contains this value or not , if the names are constant = might be better choice that contain

If(Contains([Salesroom],"Pacific Dunes 1","Pacific Dunes 2")

 


AdamKrzyzanek
Forum|alt.badge.img+10

As above just formula Contains is constructed without '='

Contains (Text u, Text v)

So instead of
If(Contains([Salesroom]="Pacific Dunes 1","Pacific Dunes 2" ...)
You should use:
If(Contains([Salesroom],"Pacific Dunes 1"),"Pacific Dunes 2" ...)