Hello! How can I work an OR statement into this formula? I need it to look at 6 different columns.

Options
Lea722
Lea722 ✭✭
edited 04/25/24 in Formulas and Functions

=IFERROR(INDEX(COLLECT({Provider being reviewed}, {MRN 1}, CONTAINS(@cell, MRN@row)), 1), "")


Best Answer

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @Lea722,

    It is probably easier to do this with a helper JOIN formula column:

    =JOIN([MRN 1]@row:[MRN 6]@row, " ")

    You can then use a single formula to grab the provider name from finding the MRN value in this column:

    =INDEX(COLLECT({Provider being reviewed}, {Join column}, CONTAINS(MRN@row, @cell)), 1)

    Sample data:

    Sample lookup sheet:

    Hope this helps, but if you've any problems/questions then just let us know!

Answers

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @Lea722,

    It is probably easier to do this with a helper JOIN formula column:

    =JOIN([MRN 1]@row:[MRN 6]@row, " ")

    You can then use a single formula to grab the provider name from finding the MRN value in this column:

    =INDEX(COLLECT({Provider being reviewed}, {Join column}, CONTAINS(MRN@row, @cell)), 1)

    Sample data:

    Sample lookup sheet:

    Hope this helps, but if you've any problems/questions then just let us know!

  • Lea722
    Lea722 ✭✭
    Options

    Thank you, Nick! This worked like a charm :)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!