How to Combine Two VLOOKUP Formulas into 1

Options

Hi,


I have two VLOOKUP formulas that work independently:

=VLOOKUP([Iteration Name]@row, {HH Release Schedule Sprint 1}, 5, false)

=VLOOKUP([Iteration Name]@row, {HH Release Schedule Sprint 2}, 5, false)


How do I combine these with an OR? I want the formula to look in 1 schedule, if it doesn't find a match, look in the other schedule. (the result will always be in one or the other)

I tried some IF(ORs but got tripped up in the logic.

Best Answer

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @SergeantPup,

    In Smartsheet, you can achieve the functionality you're looking for by using the IFERROR function, rather than IF or OR. The IFERROR function allows you to specify a fallback formula if the primary formula results in an error, such as when the VLOOKUP does not find a match in the first dataset. Here's how you can structure this:

    =IFERROR(
       VLOOKUP([Iteration Name]@row, {HH Release Schedule Sprint 1}, 5, false),
       VLOOKUP([Iteration Name]@row, {HH Release Schedule Sprint 2}, 5, false)
    )
    
    

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Answers

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @SergeantPup,

    In Smartsheet, you can achieve the functionality you're looking for by using the IFERROR function, rather than IF or OR. The IFERROR function allows you to specify a fallback formula if the primary formula results in an error, such as when the VLOOKUP does not find a match in the first dataset. Here's how you can structure this:

    =IFERROR(
       VLOOKUP([Iteration Name]@row, {HH Release Schedule Sprint 1}, 5, false),
       VLOOKUP([Iteration Name]@row, {HH Release Schedule Sprint 2}, 5, false)
    )
    
    

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

  • SergeantPup
    Options

    @Bassam Khalil that worked beautifully. Thank you.

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    Options

    @SergeantPup

    Happy for you! If you need any more help, please don't hesitate to call.

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!