Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

# Nested If statements Again Sorry in advance

Topic Labels: Formulas
509 2
cancel
Showing results for
Did you mean:
6 - Interface Innovator

Hey Guys

I’m try to do the math on this.

if shoot days is greater than 4 and less than 8 return 4 but if its greater than 8 and less than 15 return 8.

``````IF({Shoot days} > 4,IF({Shoot days}<8,4),IF({Shoot days} > 8,IF({Shoot days}<15,8),{Shoot days}))
``````

thanks

2 Replies 2
18 - Pluto

One piece not listed in your description is the fallback value of `{Shoot Days}`, which appears to be the result if the number of shoot days is below 4 or above 15.

This can be simplified by only doing one comparison for each level. As long as you do them in order, it all works. This can be done low to high:

``````IF({Shoot Days} <= 4, {Shoot Days}, IF({Shoot Days} <= 8, 4, IF({Shoot Days} <= 15, 8, {Shoot Days})))
``````

…or high to low:

``````IF({Shoot Days} >= 15, {Shoot Days}, IF({Shoot Days} > 8, 8, IF({Shoot Days} > 4, 4, {Shoot Days})))
``````

6 - Interface Innovator

thank you. I knew I was complicating it.