Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

# IF, Then formula

Topic Labels: Formulas
Solved
189 3
cancel
Showing results for
Did you mean:  4 - Data Explorer

I’m trying to write a formula that says. If {Inspection Date} is not blank and the number is greater than 730, then “No” or If {Inspection Date} is not blank and less than 730 then “Yes”.

I keep getting hung up with the blank fields.

This is my current formula: IF({Inspection Date Formula}!= BLANK(),AND({Inspection Date Formula}>730,“No”,“Yes”)). The output is now a 1 for NO and a 0 for Yes. Blank fields are still blank which is what I want.
How do I get the 1 and 0 to say No and Yes?

1 Solution

Accepted Solutions  4 - Data Explorer

YES!! This is exactly what I needed. I was overthinking it. Thank you1!

3 Replies 3  10 - Mercury

Hey @EV_TRAINING!
Welcome to the forums!

Here’s a way to format a formula like that:

``````IF(
{Inspection Date},
IF(
{Number} > 730,
"No",
IF(
{Number} < 730,
"Yes"
)
)
)
``````

For this formula, if the {Inspection Date} field is blank, then the formula will return blank.
I haven’t tested it in a sandbox, but I think that if the number field is blank, then the formula will just return “Yes”. This happens because 730 is technically more than the presence of no data.

If you want the formula just to return blank if there is no number, then you can use this formula:

``````IF(
AND(
{Inspection Date},
{Number}
),
IF(
{Number} > 730,
"No",
IF(
{Number} < 730,
"Yes"
)
)
)
``````  4 - Data Explorer

YES!! This is exactly what I needed. I was overthinking it. Thank you1!  18 - Pluto

You probably want a value if the number is exactly 730. Depending on what the value should be you can use either `>` or `>=`

``````IF(
AND(
{Inspection Date},
{Number}
),
IF(
{Number} > 730,
"No",
"Yes"
)
)
`````` 