I think I jumbled my explanation and my thought process (again). The original formula didn’t need to use AND()
because there was only one condition being (incorrectly) checked, but you’re correct that AND()
would need to be used for the new formula.
Sorta-kinda. First off, you didn’t nest the other options correctly. The new logical function should be wrapped around all of them as part of the first argument to the IF()
function, like this (roughly):
IF(
AND(
AND([test 1 here]),
AND([test 2 here]),
AND([test 3 here]),
AND([test 4 here]),
AND([test 5 here])
),
"Needs action"
)
With that said, I think you want to use OR()
instead of AND()
. If I’m understanding your goal correctly, you want to see “Needs action” if any of those five fields have been switched to “Yes” 30 or more minutes ago. If that’s the case, the formula would be this:
IF(
OR(
AND(
{Column A} = 'YES',
DATETIME_DIFF(
NOW(),
LAST_MODIFIED_TIME({Column A}),
'minutes'
) > 30
),
AND(
{Column B} = 'YES',
DATETIME_DIFF(
NOW(),
LAST_MODIFIED_TIME({Column B}),
'minutes'
) > 30
),
AND(
{Column C} = 'YES',
DATETIME_DIFF(
NOW(),
LAST_MODIFIED_TIME({Column C}),
'minutes'
) > 30
),
AND(
{Column D} = 'YES',
DATETIME_DIFF(
NOW(),
LAST_MODIFIED_TIME({Column D}),
'minutes'
) > 30
),
AND(
{Column E} = 'YES',
DATETIME_DIFF(
NOW(),
LAST_MODIFIED_TIME({Column E}),
'minutes'
) > 30
)
),
'Needs action'
)
If I’m misinterpreting your desired logic, and you only want to see “Needs action” when all five of those fields are more than 30 minutes past their last change to “Yes”, then change the OR()
to AND()
.