Look up multiple column values from Sheet B to match values in Sheet A to return value from Sheet B

Hello,

I'm trying to make a formula that counts values from Sheet A against multiple columns in Sheet B, if only 1 total match is found, then lookup values from Sheet A against Sheet B and based on the result, pull in the value from a Status column. If either too many same results or no results are found return a text value "Not Found" (this is temporary).

The closest I have gotten is the following formula (The formula is in Sheet A, "Projects Tracker X" is Sheet B):

=IF(COUNTIFS({Projects Tracker Establishment}, Location@row, {Projects Tracker Project ID}, [Project ID]@row, {Projects Tracker Project Name}, [Project Name]@row) = 1, (COLLECT({Projects Tracker Project Status}, {Projects Tracker Establishment}, Location@row, {Projects Tracker Project ID}, [Project ID]@row, {Projects Tracker Project Name}, [Project Name]@row), "Not Found")

Currently the formula works for the "Not Found" section, but returns #INVALID COLUMN VALUE if only 1 match is found.

Is anyone able to help me fix this please?

Thanks

Best Answer

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    Hi @Clare123

    I hope you're well and safe!

    Yes, absolutely.

    Here's the structure.

    =INDEX({ColumnWithTheValueYouWantToShow}, MATCH(CellThatHaveTheValueToMatch@row,{ColumnWithTheValueToMatchAgainsTheCell}, 0))

    I hope that helps!

    Be safe, and have a fantastic week!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!