Forum Discussion
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")
- RoxanneZiegler2 months agoQrew Assistant Captain
I tried this but the coma after Pacific Dunes 2 comes up yellow
IF(Contains([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.81I also did it and still yellow at comma
IF(Contains([Salesroom]="Pacific Dunes 1","Pacific Dunes 2",
If(contains([Salesroom]="GS Landsend",([# of people in party]+1)*9.63)
IF(Contains[Salesroom]="Playa Grande",([# of people in party]+1)*7.81)- AdamKrzyzanek2 months agoQrew Captain
What about this:
IF( Contains([Salesroom],"Pacific Dunes 1") ,"Pacific Dunes 2" ,Contains([Salesroom],"GS Landsend") ,([# of people in party]+1)*9.63 ,Contains([Salesroom],"Playa Grande") ,([# of people in party]+1)*7.81 )
- PrashantMaheshw2 months agoQrew Captain
Hi,
Can you confirm regarding the formula correction provided 4 days ago ? Your SalesRoom should ideally be containing only 1 value.
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 )
If you must use contains which is a weird case for SalesRoom, then below should be fine.
If( Contains([Salesroom], "Pacific Dunes 1"), "Pacific Dunes 2", Contains([Salesroom], "GS Landsend"), ([# of people in party] + 1) * 9.63, Contains([Salesroom], "Playa Grande"), ([# of people in party] + 1) * 7.81 )
- RoxanneZiegler2 months agoQrew Assistant Captain
I still receive a yellow mark after 9.63 it says it's expecting a ) but when I put that there it turns [Salesroom] yellow - if I start salesroom with a ( and end with ) its still yellow
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