Need Formula Help Looking for most recent activity type but reviewing 6 columns

I need a formula for my metrics sheet to pull the most recent account engagement type from a separate sheet, however I have multiple columns to search for the most recent engagement type.

The form connected to the sheet allows a rep to select one, two, or three outreach updates so I have three Account Names, three Outreach Dates, and three Account Engagement type columns that the formula needs to review.

this is the formula i have been working with but something is off and i keep getting an error code:

=IF(
MAX(
COLLECT({Outreach #1 Date of Outreach}, {Outreach #1 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #2 Date of Outreach}, {Outreach #2 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #3 Date of Outreach}, {Outreach #3 Account Name (City)}, [Account Name (City)]@row)
) = 0,
"",
INDEX(
COLLECT(
{Outreach #1 Account Engagement Type}, {Outreach #1 Date of Outreach},
MAX(
COLLECT({Outreach #1 Date of Outreach}, {Outreach #1 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #2 Date of Outreach}, {Outreach #2 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #3 Date of Outreach}, {Outreach #3 Account Name (City)}, [Account Name (City)]@row)
),
{Outreach #1 Account Name (City)}, [Account Name (City)]@row
) +
COLLECT(
{Outreach #2 Account Engagement Type}, {Outreach #2 Date of Outreach},
MAX(
COLLECT({Outreach #1 Date of Outreach}, {Outreach #1 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #2 Date of Outreach}, {Outreach #2 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #3 Date of Outreach}, {Outreach #3 Account Name (City)}, [Account Name (City)]@row)
),
{Outreach #2 Account Name (City)}, [Account Name (City)]@row
) +
COLLECT(
{Outreach #3 Account Engagement Type}, {Outreach #3 Date of Outreach},
MAX(
COLLECT({Outreach #1 Date of Outreach}, {Outreach #1 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #2 Date of Outreach}, {Outreach #2 Account Name (City)}, [Account Name (City)]@row),
COLLECT({Outreach #3 Date of Outreach}, {Outreach #3 Account Name (City)}, [Account Name (City)]@row)
),
{Outreach #3 Account Name (City)}, [Account Name (City)]@row
),
1
)
)

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!