Copy Cell Data from One Sheet to Another Based on Matching Values

cmilam
cmilam
edited 10/14/24 in Formulas and Functions

Hi,

I have two sheets that I am working with. One sheet has a URL that I want to copy over to the other sheet. Both sheets have an identifier column titled "Org Unit ID". I have trying to write a formula that checks both sheets for a matching Org Unit ID and then copies the URL from sheet 1 (titled "Concourse_URL List") into sheet 2 (titled "Tool Usage Data") for the row where the Org Unit IDs match.

=IF(ISERROR(MATCH([Org Unit Code]@row, {Concourse_URL List Range 1}, 0)), "N", {Concourse_URL List [URL]@row})

Instead of returning "true,false" or "y/n", etc. I just want to return the data that is in the column titled URL located in the Concourse_URL List sheet on the row that has the matching Org Unit ID value.

Tags:

Best Answer

  • rrenee
    rrenee ✭✭✭✭
    Answer ✓

    I think based on your goals, you should use an INDEX(MATCH()) formula:

    =IFERROR(INDEX({Concourse_URL List}, MATCH([Org Unit Code]@row, {Org Unit ID},0)),"")

    This will return only the URLs and leave the cell blank if no URL is found.

    • {Concourse_URL List} = URL/info you want to pull into the new sheet
    • [Org Unit Code]@row = ID row for matching in the current sheet
    • {Org Unit ID} = ID column from the old sheet used to match the rows to

    Cheers!

    Renée Roberge

Answers

  • rrenee
    rrenee ✭✭✭✭
    Answer ✓

    I think based on your goals, you should use an INDEX(MATCH()) formula:

    =IFERROR(INDEX({Concourse_URL List}, MATCH([Org Unit Code]@row, {Org Unit ID},0)),"")

    This will return only the URLs and leave the cell blank if no URL is found.

    • {Concourse_URL List} = URL/info you want to pull into the new sheet
    • [Org Unit Code]@row = ID row for matching in the current sheet
    • {Org Unit ID} = ID column from the old sheet used to match the rows to

    Cheers!

    Renée Roberge

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!