Skip to main content
Solved

Formula If and dateadd

  • April 26, 2024
  • 7 replies
  • 45 views

Forum|alt.badge.img+4

 Hello airtable community, I have this following formula but dateadd does not display the operation in the result thank you for your feedback

Franck 

IF(
{Date début package} != '', {Date début package},
IF(
{Date début expl 23} != '', {Date début expl 23},

DATEADD({Date début package},{Nombre jours d'Activité},'days')))



 

Best answer by Franck_GENTILI1

Hello, thank you for your feedback

I got the solution, here is the formula:

IF(AND({A} != '', {B} = ''), DATEADD({A}, {ro}, 'days'), IF(AND({A} = '', {B}! = ''), {B}, IF(AND({A} != '', {B} != ''), {A}, BLANK())))
Good day

7 replies

BillH
Forum|alt.badge.img+24
  • Brainy
  • April 26, 2024

It looks like you need to close the quotes.

IF(
{Date début package} != ''", {Date début package},
IF(
{Date début expl 23} != ''", {Date début expl 23},

DATEADD({Date début package},{Nombre jours d'Activité},'days')))

Forum|alt.badge.img+4

It looks like you need to close the quotes.

IF(
{Date début package} != ''", {Date début package},
IF(
{Date début expl 23} != ''", {Date début expl 23},

DATEADD({Date début package},{Nombre jours d'Activité},'days')))

Hello and thank you for your feedback, this does not work I am attaching a view of the table Thank you and have a good day

https://airtable.com/appYGvpIAdS7m5Hab/shryMIhCEvJUzIFYG


BillH
Forum|alt.badge.img+24
  • Brainy
  • April 26, 2024

What are you expecting to see as a result?


Forum|alt.badge.img+4

Good morning and thanks for your help.

Here is my expectation.

If cell "A" is not empty and cell "B" is empty then cell "C" takes the value of cell "A"
and if cell "A" is empty and cell "B" is not empty, then cell "C" takes the value of cell B.
If in cell "C" there is the value of cell "A" then you must add: "dateadd", "Number of days of Activity (from Planning 2024", 'days'

https://airtable.com/appYGvpIAdS7m5Hab/shr6gqkEP8FOIlHU2

while waiting for your back have a good day


BillH
Forum|alt.badge.img+24
  • Brainy
  • April 29, 2024

Good morning and thanks for your help.

Here is my expectation.

If cell "A" is not empty and cell "B" is empty then cell "C" takes the value of cell "A"
and if cell "A" is empty and cell "B" is not empty, then cell "C" takes the value of cell B.
If in cell "C" there is the value of cell "A" then you must add: "dateadd", "Number of days of Activity (from Planning 2024", 'days'

https://airtable.com/appYGvpIAdS7m5Hab/shr6gqkEP8FOIlHU2

while waiting for your back have a good day


As described:

If in cell "C" there is the value of cell "A" then you must add: "dateadd", "Number of days of Activity (from Planning 2024", 'days'

can never be true since cell "A" is a date and cell "C" is a number.  

 

 


Forum|alt.badge.img+4

Hello, thank you for your feedback

I got the solution, here is the formula:

IF(AND({A} != '', {B} = ''), DATEADD({A}, {ro}, 'days'), IF(AND({A} = '', {B}! = ''), {B}, IF(AND({A} != '', {B} != ''), {A}, BLANK())))
Good day


BillH
Forum|alt.badge.img+24
  • Brainy
  • April 30, 2024

Great, good day to you as well.