# If Statement Help

• 1
• Question
• Updated 11 months ago
I'm trying to write a formula to return a numeric value.
I have 5 numeric fields (Bedroom1, Bedroom2, Bedroom3, etc...) the user will enter in the square footage for each bedroom.

I then have a field where I would like to calculate the number of bedrooms, but only If the value in each of the Bedroom fields is greater than 50 square feet.
• 100 Points Posted 12 months ago

• 1
• 1,476 Points You can use something like this:

If([Bedroom 1]>49,1,0)+
If([Bedroom 2]>49,1,0)+
If([Bedroom 3]>49,1,0)+
If([Bedroom 4]>49,1,0)
• 1,406 Points Or you could learn about variables and do something simple to start with like this. Not that it is really needed here but it helps learn a bit about variables in formulas.

var number bedone=If([Bedroom1]>49,1,0);
var number bedtwo=If([Bedroom2]>49,1,0);
var number bedthree=If([Bedroom3]>49,1,0);
var number bedfour=If([Bedroom4]>49,1,0);
var number bedfive=If([Bedroom5]>49,1,0);

\$bedone+\$bedtwo+\$bedthree+\$bedfour+\$bedfive