Linking a cell from Sheet A to Sheet B if a condition is met

Hi

I'm using this formula but it gives error INCORRECT ARGUMENT:

=INDEX(COLLECT({Vendor Details Range 1}, [Vendor Name]@row, @cell = {Vendor Name Check}), 1)

What I intend to do is this:

If [Vendor Name]@row in Sheet B matches with {Vendor Name Check} in Sheet A, THEN

Link that particular cell in Sheet A column {Vendor Details Range 1}

Kindly let me know how to make this work.

Thank you

Best Answer

  • Protonsponge
    Protonsponge ✭✭✭✭✭✭
    edited 08/26/24 Answer ✓

    Hello @pdv90,

    If I read correctly, in Sheet B, you would like to retrieve the vendor details from Sheet A based upon the vendor name? If so would something like this work for you?

    =INDEX(COLLECT({Sheet A - Vendor Details}, {Sheet A - Vendor Name}, [Vendor Name]@row), 1)

    The formula is asking to collect the [Vendor Details] in Sheet A, based upon the [Vendor Name] in Sheet B equalling the [Vendor Name] in Sheet A for each row.

    Sheet A Demo:-

    Sheet B Demo:-

    If you think you might have blank rows in Sheet B, it can help to add an IFERROR statement to the formula as per the example below which will leave the cell blank rather than show an error message.

    =IFERROR(INDEX(COLLECT({Sheet A - Vendor Details}, {Sheet A - Vendor Name}, [Vendor Name]@row), 1), " ")

    Sheet B Demo (with IFERROR Statement):-

    I hope that is helpful to you in someway.

    Protonsponge

Answers

  • Protonsponge
    Protonsponge ✭✭✭✭✭✭
    edited 08/26/24 Answer ✓

    Hello @pdv90,

    If I read correctly, in Sheet B, you would like to retrieve the vendor details from Sheet A based upon the vendor name? If so would something like this work for you?

    =INDEX(COLLECT({Sheet A - Vendor Details}, {Sheet A - Vendor Name}, [Vendor Name]@row), 1)

    The formula is asking to collect the [Vendor Details] in Sheet A, based upon the [Vendor Name] in Sheet B equalling the [Vendor Name] in Sheet A for each row.

    Sheet A Demo:-

    Sheet B Demo:-

    If you think you might have blank rows in Sheet B, it can help to add an IFERROR statement to the formula as per the example below which will leave the cell blank rather than show an error message.

    =IFERROR(INDEX(COLLECT({Sheet A - Vendor Details}, {Sheet A - Vendor Name}, [Vendor Name]@row), 1), " ")

    Sheet B Demo (with IFERROR Statement):-

    I hope that is helpful to you in someway.

    Protonsponge

  • pdv90
    pdv90 ✭✭✭

    Thank you so much, now I know what was wrong with my formula.

    You guys are amazing.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!