Index formula with an or statement

aecross
aecross ✭✭✭
edited 10/25/23 in Formulas and Functions

Hi there -

I am hoping to build a formula that indexes 2 separate sheets (Design and Design 2). I unfortunately do not have a way to create a helper column for these 2 sheets, but i'd like to be able to pull in the store ID # based on the store name.

=INDEX({Design Store ID}, MATCH([Store Name]@row, {Design Store Name}, 0) OR(INDEX({Design 2 Store ID}, MATCH([Store Name]@row, {Design 2 Store ID}, 0))

Best Answer

  • AravindGP
    AravindGP ✭✭✭✭✭✭
    Answer ✓

    Hi @aecross,


    You can use an IFERROR to search Design 2, if the value doesn't appear in Design sheet.


    =IFERROR(INDEX({Design Store ID}, MATCH([Store Name]@row, {Design Store Name}, 0)), INDEX({Design 2 Store ID}, MATCH([Store Name]@row, {Design 2 Store ID}, 0)))

    Thanks,

    Aravind GP| Principal Consultant

    Atturra Data & Integration

    M: +61493337445

    E:Aravind.GP@atturra.com

    W: www.atturra.com

Answers

  • AravindGP
    AravindGP ✭✭✭✭✭✭
    Answer ✓

    Hi @aecross,


    You can use an IFERROR to search Design 2, if the value doesn't appear in Design sheet.


    =IFERROR(INDEX({Design Store ID}, MATCH([Store Name]@row, {Design Store Name}, 0)), INDEX({Design 2 Store ID}, MATCH([Store Name]@row, {Design 2 Store ID}, 0)))

    Thanks,

    Aravind GP| Principal Consultant

    Atturra Data & Integration

    M: +61493337445

    E:Aravind.GP@atturra.com

    W: www.atturra.com

  • aecross
    aecross ✭✭✭

    Thank you, @AravindGP! That did the trick!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!