Skip to main content

Several IF statements in a formula

  • September 5, 2024
  • 3 replies
  • 15 views

Forum|alt.badge.img+10

I have 2 datafields, room type (single room & double room) and guests (1 to 2 names)

if in singleroom and the guest (the volume is 1) should say "occupied" in the formulafield and

if in room type (double room) it says and guest (the volume 2) then “Occupied” should also appear in the formula field

MyCode:

 

 

 

IF(AND(room type = "double room", {client overview} = VALUE(2), room type = "single room", {client overview} = VALUE(1)), "occupied")

 

 

 

3 replies

Mike_AutomaticN
Forum|alt.badge.img+28

What field type is your Client Overview field? Would you please provide a screenshot?

Best,

Mike, Consultant @ Automatic Nation


TheTimeSavingCo
Forum|alt.badge.img+31

Does this look right?

IF( AND( {Room Type} = "Double room", {Count (Client overview)} = 2 ), "Occupied" ) & IF( AND( {Room Type} = "Single room", {Count (Client overview)} = 1 ), "Occupied" )

Link to base


Forum|alt.badge.img+10
  • Author
  • Inspiring
  • 30 replies
  • September 6, 2024

Yes, that's exactly how I imagined it. I thought about it for ages. thank you very much for the help.