Skip to main content
Solved

Combining IF AND statements (one is a function)

  • January 28, 2022
  • 4 replies
  • 27 views

Hi, having issues combining two different IF statements for contracts:

IF(Phase=“ :inbox_tray: Lead”,“ :bell: ”)
IF(DATETIME_DIFF(TODAY(),{Last Contact},‘days’) >= 7, “ :bell: ”)

They both work separately but want to be able to combine them so that IF a contract is in Lead phase AND the last contact date was 7or more days ago, then follow up ( :bell: ).

Every time I use the (AND) function, following the example here, it doesn’t work.

Is it because the Phase field is a function?

Best answer by kuovonne

Thanks Kamille.

IF(AND({Phase} = “ :inbox_tray: Lead”, DATETIME_DIFF(TODAY(),{Last Contact},‘days’) >= 7,“ :bell: ”)


It looks like you are missing a closing parenthesis for your AND. Try this. You will have to replace the emoji as they did not copy/paste for me.

IF(
    AND(
        {Phase} = ":inbox_tray: Lead", 
        DATETIME_DIFF(
            TODAY(),
            {Last Contact},
            'days'
        ) >= 7
    ),
    ":bell:"
)

4 replies

Kamille_Parks11
Forum|alt.badge.img+27

Post your latest attempt so we can dissect what’s wrong about it.


  • Author
  • New Participant
  • January 29, 2022

Thanks Kamille.

IF(AND({Phase} = “ :inbox_tray: Lead”, DATETIME_DIFF(TODAY(),{Last Contact},‘days’) >= 7,“ :bell: ”)


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • January 29, 2022

Thanks Kamille.

IF(AND({Phase} = “ :inbox_tray: Lead”, DATETIME_DIFF(TODAY(),{Last Contact},‘days’) >= 7,“ :bell: ”)


It looks like you are missing a closing parenthesis for your AND. Try this. You will have to replace the emoji as they did not copy/paste for me.

IF(
    AND(
        {Phase} = ":inbox_tray: Lead", 
        DATETIME_DIFF(
            TODAY(),
            {Last Contact},
            'days'
        ) >= 7
    ),
    ":bell:"
)

  • Author
  • New Participant
  • January 29, 2022

It looks like you are missing a closing parenthesis for your AND. Try this. You will have to replace the emoji as they did not copy/paste for me.

IF(
    AND(
        {Phase} = ":inbox_tray: Lead", 
        DATETIME_DIFF(
            TODAY(),
            {Last Contact},
            'days'
        ) >= 7
    ),
    ":bell:"
)

Wow this was driving me crazy for days. Thank you!!