# Using a < and > together in a formula

Topic Labels: Formulas
1723 9
cancel
Showing results for
Did you mean:  6 - Interface Innovator

I need to create a formula that does this:

Attendee Count < 100 put in 1

Attendee Count > 201 < 1000 put in 2

Attendee Count > 1001 < 5000 put in 3

Attendee Count > 5001 put in 4

9 Replies 9  18 - Pluto

For this you’ll need to nest a series of IF operations, also using AND to combine some pieces. (I’m also guessing that “201” should be “101” in your example above.)

``````IF({Attendee Count} < 100, 1,
IF(AND({Attendee Count} > 100, {Attendee Count} <= 1000), 2,
IF(AND({Attendee Count} > 1000, {Attendee Count} <= 5000), 3, 4)))``````  9 - Sun

You don’t actually need the ANDs in there if the IF statements are ordered correctly. This should be fine:

IF({Attendee Count} < 100, 1,
IF({Attendee Count} <= 1000, 2,
IF({Attendee Count} <= 5000, 3, 4)))  18 - Pluto

Good point! It could also be done in reverse order:

``````IF({Attendee Count} > 5000, 4,
IF({Attendee Count} >= 1000, 3,
IF({Attendee Count} >= 100, 2, 1)))``````  6 - Interface Innovator

Thank you! That worked perfectly.  4 - Data Explorer

Could you help me with this… pretty similar to the above but I am using TRUE
I want to know what is the proper formula to use this…

IF(Checkincount= 99, TRUE(), FALSE())

I’d like to have an or option meaning

IF(Checkincount= 99, TRUE(), FALSE()), OR IF(Checkincount= 199, TRUE(), FALSE()), OR IF(Checkincount= 299, TRUE(), FALSE())

I can’t seem to find the right formula to use the OR

Meaning, I want it to show if Checkincount is 99 or 199 or 299 etc…

Hope that makes sense.

Thanks  4 - Data Explorer

Justin_Barrett, Could you help me with this… pretty similar to the above but I am using TRUE
I want to know what is the proper formula to use this…

IF(Checkincount= 99, TRUE(), FALSE())

I’d like to have an or option meaning

IF(Checkincount= 99, TRUE(), FALSE()), OR IF(Checkincount= 199, TRUE(), FALSE()), OR IF(Checkincount= 299, TRUE(), FALSE())

I can’t seem to find the right formula to use the OR

Meaning, I want it to show if Checkincount is 99 or 199 or 299 etc…

Hope that makes sense.

Thanks  14 - Jupiter  18 - Pluto

I’m glad that @Jeremy_Oglesby jumped in and shared a solution in your other thread. However, to answer your question, if you want to use `OR()` with a collection of conditions, you need to put all of those conditions inside the `OR()` function, like this:

``````IF(
OR(
Checkincount=99,
Checkincount=199,
Checkincount=299
),
TRUE(),
FALSE()
)
``````

Unlike `OR` in a true programming language, `OR()` in an Airtable formula is a function, not an operator, which is why you pass in the comparisons as arguments to the function.

Also, because the `OR()` function returns `TRUE` or `FALSE` on its own, it’s technically redundant to wrap the `IF()` function around it just to return the same result, so you could use `OR()` by itself if you wish:

``````OR(
Checkincount=99,
Checkincount=199,
Checkincount=299
)
``````

Just FYI, Airtable may display 1 or 0 instead of `TRUE` or `FALSE`, but 1 equates to `TRUE`, and 0 equates to `FALSE`, so it will still work with other fields reading the result of this formula.  4 - Data Explorer

Thank you so much. I appreciate you taking the time to explain that to me. It worked. You rock
Thanks again 