Help

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 FORMULA issues

134 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Question:

Here is my formula:

IF(AND({ITEM DESCRIPTION}),{ITEM DESCRIPTION} & " - " & {TASK TYPE} & " " & {TASK NAME} ,BLANK())

I need a - if the task name is filled in the drop down field to separate from the task type, but if the task name is blank, I don’t want the - at the end of the task type - make sense?

ITEM DESCRIPTION - TASK TYPE - TASK NAME

But what I don’t want is ITEM DESCRIPTION - TASK TYPE - , when the task name is blank, It would read ITEM DESCRIPTION - TASK TYPE

Thank you!

2 Replies 2

Hey @Scott_Gardner1,

Give this formula a try:

IF(
    AND(
        {ITEM DESCRIPTION},
        {TASK TYPE},
        NOT(
            {TASK NAME}
        )
    ),
    {ITEM DESCRIPTION} & " - " & {TASK TYPE},
    IF(
        AND(
            {ITEM DESCRIPTION},
            {TASK TYPE},
            {TASK NAME}
        ),
        {ITEM DESCRIPTION} & " - " & {TASK TYPE} & " - " & {TASK NAME}
    )
)

There are many ways to do this. Here is my style.

IF(
  {ITEM DESCRIPTION},
  CONCATENATE(
    {ITEM DESCRIPTION},
    IF( {TASK TYPE}, " - " & {TASK TYPE}),
    IF( {TASK NAME}, " - " & {TASK NAME})
  )
)