Skip to main content
Solved

Using IF and OR formulas to get a single output

  • April 10, 2019
  • 11 replies
  • 86 views

Quinn_Ballard
Forum|alt.badge.img+5

Hi, I have had a lot of success using formulas in the past, but I am stumped on how to properly format the following:

I have three columns: Email, Phone, and Wants Follow Up?

I have been stumped on making a formula where IF the Email cell OR the Phone number cell is filled out (AKA not blank), then the output will be a YES in the Wants Follow Up? cell.

I know I must be making an simple mistake, because the formulas I have tried only give a YES output if both the Phone and Email cells are filled out, not either-or.

The actual OR formula as shown on the Airtable help section just outputs a 1, but I want YES text to be shown, not a 1.

What am I not doing correctly? Thanks!

Best answer by JonathanBowen

Think you want something like this:

IF(OR(Email != '', Phone != ''), 'Yes', '')

11 replies

Forum|alt.badge.img+14

Put an IF statement around the OR statement: IF( OR(whatever this is), “YES”, BLANK())


Quinn_Ballard
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • April 10, 2019

Put an IF statement around the OR statement: IF( OR(whatever this is), “YES”, BLANK())


@David_Skinner thanks! What am I missing here? I may have the OR statement in the incorrect place.

This doesn’t return any output:

IF(Email = BLANK(), IF(OR(Phone = BLANK()), “”, “YES”))


Forum|alt.badge.img+14

@David_Skinner thanks! What am I missing here? I may have the OR statement in the incorrect place.

This doesn’t return any output:

IF(Email = BLANK(), IF(OR(Phone = BLANK()), “”, “YES”))


Sorry, I hadn’t checked it myself.

As Jonathon says, it seems you can’t use BLANK() as a comparison. I thought I had in the past, but perhaps not.


Quinn_Ballard
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • April 10, 2019

Sorry, I hadn’t checked it myself.

As Jonathon says, it seems you can’t use BLANK() as a comparison. I thought I had in the past, but perhaps not.


Hmm, still not working. I pasted it exactly and got an error :confused:


Quinn_Ballard
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • April 10, 2019

Hmm, still not working. I pasted it exactly and got an error :confused:


Thanks for your help with this, btw


JonathanBowen
Forum|alt.badge.img+18
  • Inspiring
  • Answer
  • April 10, 2019

Think you want something like this:

IF(OR(Email != '', Phone != ''), 'Yes', '')


JonathanBowen
Forum|alt.badge.img+18

Just to clarify - the error in red there is related to the double quotes around the YES. They are formatted and not plain text, so this gives an error. However, even if you replace with plain text quotes the formula does not work (it gives an output, but not the correct output). I’m guessing you can’t use BLANK() as a comparison value, just an output value - anybody know?


Quinn_Ballard
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • April 10, 2019

Think you want something like this:

IF(OR(Email != '', Phone != ''), 'Yes', '')


@JonathanBowen hey, thank you and that worked :slightly_smiling_face: Is there a time I should use BLANK() vs. just a ’ ’ ? Your and @David_Skinner 's formulas were exactly the same except for the BLANK() vs ’ ’


JonathanBowen
Forum|alt.badge.img+18

@JonathanBowen hey, thank you and that worked :slightly_smiling_face: Is there a time I should use BLANK() vs. just a ’ ’ ? Your and @David_Skinner 's formulas were exactly the same except for the BLANK() vs ’ ’


Yeah, not sure why this would be but it looks like you can use BLANK() to output a blank value, but you can’t say if X = BLANK()


Forum|alt.badge.img+14

Sorry, I hadn’t checked my formula before posting. I’ve accidentally deleted it now as well.

As Jonathan says, it seems you can’t use BLANK() as a comparison. I thought I had in the past, but perhaps not.


Quinn_Ballard
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • April 10, 2019

Sorry, I hadn’t checked my formula before posting. I’ve accidentally deleted it now as well.

As Jonathan says, it seems you can’t use BLANK() as a comparison. I thought I had in the past, but perhaps not.


Cool, thank you both. That’s where I was getting really stuck – I didn’t realize that there were cases where = BLANK() might not work as opposed to = ’ ’