Help

Re: Two-Condition IF Formula

Solved
Jump to Solution
5663 0
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the syntax for an IF statement that only generates output if two conditions, in two fields, are met?

Thanks for your help!

14 Replies 14
Dakota_Bushnell
6 - Interface Innovator
6 - Interface Innovator

I’m looking for something I would consider similar.

I’m trying to create a formula that would grab from certain fields if they have anything entered.

For example:

I have a field called {Important Client Notes} and another called {Important Company Notes}. What I’d like it to do is if it only has client notes, it’ll pull that information, or if it only has company notes, to grab that information, but if it has both, to grab both and separate them with a separator of my choice; perhaps a "; " or " - ".

I’ve tried writing it in possibly 4-5 ways and can’t seem to get it to work for all 3 possible outputs.

Any help would be greatly appreciated.

{Important Client Notes} &
IF(
   AND(
      {Important Client Notes},
      {Important Company Notes}
   ),
   "; " <<whatever separator you want>>
) &
{Important Company Notes}

I think that should do it.

Why was this so difficult for me to write? I swear, I take like 2 weeks off from Airtable and become helpless with writing the formulas. This worked exactly how I wanted it to. Thank you so much, Jeremy! Much appreciated!

The_Hound
4 - Data Explorer
4 - Data Explorer

I am trying to use a series of nested IF statements to then run the appropriate calculation.

It is for a referral program with 5 levels each one of the levels is eligible for 5 different %OFF discounts and each %OFF discount is valid of a specific number of days.

The simple version is:
If discount field = 5% OFF

Then complete the following calculation - DATEADD({Referral Discount Code Issued Date}, 15, ‘days’),

Else if discount field = 10% OFF

Then complete the following calculation - DATEADD({Referral Discount Code Issued Date}, 30, ‘days’),

etc.

Just wondering if anyone can advise on what I might be doing wrong here:

IF({Referred By - Referral Level}=“GIVE 5% OFF & GET 5% OFF”,“DATEADD({Referral Discount Code Issued Date}, 15, ‘days’)”,IF({Referred By - Referral Level}=“GIVE 10% OFF & GET 10% OFF”,“DATEADD({Referral Discount Code Issued Date}, 30, ‘days’)”,IF({Referred By - Referral Level}=“GIVE 15% OFF & GET 15% OFF”,“DATEADD({Referral Discount Code Issued Date}, 45, ‘days’)”,IF({Referred By - Referral Level}=“GIVE 20% OFF & GET 20% OFF”,“DATEADD({Referral Discount Code Issued Date}, 60, ‘days’)”,IF({Referred By - Referral Level}=“GIVE 25% OFF & GET 25% OFF”,“DATEADD({Referral Discount Code Issued Date}, 75, ‘days’)”,"")))))

What I am finding is that the IF the statement is just returning the formula in the field but not the result. I have tried adding a = sign in front of the DATEADD formula, but that just returns the formula as =DATEADD({Referral Discount Code Issued Date}, 15, ‘days’).

Many thanks in advance!

Marc_Chenut
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi,

I have activities that can be booked with or without a private transport.
The price of the transport vary if they are 2, 6 or 12 people.

I am building my price table.
I have a single select column “transport” with 2 options : “Without transport” / With transport".
Then I have 3 lookup field column to grab the price for 4, 6 or 12 people.
Then I have a column 'number of people"
Then for each activities, I have rows from 1 to 12 people.

In my new column, I want t grab the correct price depending IF the client took the transport and IF 'number of people =<4 , grab the column “transport price for 4 people”.
IF people=<6 , grab column “the transport price for 6 people”.
IF people =<12, grab column “the transport price for 12 people”.

Could you help please?
Many thanks !