INDEX and MATCH across two sheets: a detailed explanation

Brett Wyrick
Brett Wyrick ✭✭✭✭
edited 11/09/21 inBest Practice

Hello everyone, would love some feedback on this tutorial.

I was answering a user's question regarding INDEX and MATCH (thread post here), and thought it would be beneficial to share my example to the greater Smartsheet community of how to easily utilize INDEX and MATCH functions to reference cells from another sheet by using a shared "identifier" value.

I couldn't find any sources of a true step-by-step tutorial of how to create sheet references to a second sheet range, then show how to utilize INDEX/MATCH to get the info from those ranges.

This tutorial includes a step-by-step example of how to create one sheet as a "data source" sheet, and a second sheet that's used for a more "public" sort of view. The idea here is for the data to have a "home" on the source sheet and a select set of columns available on the other sheet (useful for sharing when you don't want to shareallthe data from a sheet).

----

Documentation so you can get savvy:

Here's the documentation from Smartsheet for both Index and Match.

Below, I'll try and explain a layman's terms way to do INDEX MATCH - I'd recommend using INDEX/MATCH functions rather than VLOOKUP because INDEX/MATCH functions are more helpful if your data moves around (i.e., if one row gets moved, VLOOKUP can "break").

For your use case, you'll be utilizing what Smartsheet refers to as "Cross-sheet references". You can read about Cross Sheet Formulas (and there's a video) here:https://help.smartsheet.com/learning-track/smartsheet-advanced/cross-sheet-formulas

----

Due to limits on characters for posting, I'll add my solution as several responses to this discussion post.

If this answer answers your question, please press "Yes" above - it helps the community (and those random Googlers out there ) find solutions like yours faster.

Brett Wyrick;your friendly neighborhood freelance consultant & Smartsheet helper.Connect with me on LinkedIn.

«1

Comments

  • Brett Wyrick
    Brett Wyrick ✭✭✭✭

    Example: A Tale of Two Sheets

    For this example, we'll have 2 sheets that have the same info on each, minus one column on the "Public" sheet.

    • The first sheet we will call "Companies_Private"
    • The second sheet will be named "Companies_Public".

    Here's the data within the "Companies_Private" sheet.Bold & italicized text= Column Name.

    ____________________________________________________________

    Companies_Private Sheet:

    copy/paste data in your own sheet, if you'd like:

    Columns:

    Corp‎ │Stock │ Website │CEO

    3M‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎MMM‎ ‎ ‎ ‎3m.com‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎Mike Roman

    Adobe‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ADBE‎ ‎ ‎ ‎ ‎adobe.com‎ ‎ ‎ ‎ ‎Shantanu Narayen

    Alphabet‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎GOOG‎ ‎ ‎ ‎google.com‎ ‎ ‎ ‎ ‎Sundar Pichai

    Amazon‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎AMZN‎ ‎ ‎ ‎amazon.com‎ ‎ ‎Andy Jassy

    Apple‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎apple‎ ‎ ‎ ‎apple.com‎ ‎ ‎ ‎ ‎Tim Cook

    Best Buy‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎BBY‎ ‎ ‎ ‎ ‎ ‎bestbuy.com‎ ‎ ‎ ‎Corie Barry

    Etsy‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ETSY‎ ‎ ‎ ‎ ‎Etsy.com‎ ‎ ‎ ‎ ‎ ‎ ‎Josh Silverman

    Hewlett Packard‎ ‎ ‎HP‎ ‎ ‎ ‎ ‎ ‎HP.com‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎Enrique Lores

    ____________________________________________________________

    User:

    So, for our second Sheet, which we will name "Companies_Public", we just need a sheet with the same columns, minus one (for this example, we'll be removing the "CEO" column - let's say that you didn't want particular users to see that column).

    ____________________________________________________________

    Companies_Public Sheet:

    Corp‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ Stock ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎Website ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

    ____________________________________________________________

    So, to get this to work, you'll need to utilize INDEX MATCH functions and create some "References" to the "Private" sheetfromthe "Public" sheet.

    If this answer answers your question, please press "Yes" above - it helps the community (and those random Googlers out there ) find solutions like yours faster.

    Brett Wyrick;your friendly neighborhood freelance consultant & Smartsheet helper.Connect with me on LinkedIn.

  • Hi Brett,

    Very new to Smartsheet.

    我想用这种方法复制列from one Smartsheet to another as the 'copy rows' option, takes over more information than i would like.

    Is this possible, and if so, can you explain the index match in simpler detail for me?

    Thanks!

  • Hi Brett,<\/p>

    Very new to Smartsheet.<\/p>

    I want to use this technique to copy columns over from one Smartsheet to another as the 'copy rows' option, takes over more information than i would like.<\/p>

    Is this possible, and if so, can you explain the index match in simpler detail for me?<\/p>

    Thanks!<\/p>","bodyRaw":"[{\"insert\":\"Hi Brett,\\nVery new to Smartsheet.\\nI want to use this technique to copy columns over from one Smartsheet to another as the 'copy rows' option, takes over more information than i would like.\\nIs this possible, and if so, can you explain the index match in simpler detail for me?\\nThanks!\\n\"}]","format":"rich","dateInserted":"2021-11-11T13:51:19+00:00","insertUser":{"userID":140477,"name":"Daniel Gill 97","url":"https:\/\/community.smartsheet.com\/profile\/Daniel%20Gill%2097","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!ZN_qGWpEbPM!bLEoW15ZTEs!24FD2KcI1MS","dateLastActive":"2021-12-03T14:52:27+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"displayOptions":{"showUserLabel":false,"showCompactUserInfo":true,"showDiscussionLink":false,"showPostLink":false,"showCategoryLink":false,"renderFullContent":false,"expandByDefault":false},"url":"https:\/\/community.smartsheet.com\/discussion\/comment\/310662#Comment_310662","embedType":"quote"}"> https://community.smartsheet.com/discussion/comment/310662#Comment_310662

    I think where it says for new added rows, if you could cover that it would answer my question!

  • Brett Wyrick
    Brett Wyrick ✭✭✭✭
    edited 11/11/21

    Howdy there@Daniel Gill 97, thanks for commenting.

    As far as the "copy rows" automation is concerned,there's no way to simply copy over particular cell values from one "sheet" to another sheet.In other words, you can't pick and choose which columns you want. It's either copy everything or copy nothing.

    So, you could copy the row, then move all the columns you don't want to the far right in your sheet, then select them and hide them. That's not a great solution, but it would work.

    Others have asked your exact question before, but there's not a straightforward way to do this solely within Smartsheet:https://community.smartsheet.com/discussion/69496/copy-rows-automation-only-certain-columns

    Here's a handy tutorial that has helped me when I was learning INDEX / MATCH:https://www.youtube.com/watch?v=cabxWacMhKQ. It shows how to utilize INDEX/MATCH on a sheet and how to use it referencing another sheet.

    ----

    But....

    There are ways to do what you're wanting to do, however. You just need to use the Smartsheet API, if you're interested. Basically, the API allows users to do customized actions like what you're desiring and a whole lot more (add a column to every sheet, hide columns automatically every night, etc.)

    I utilize Microsoft'sPower Automate(which is similar toZapier,Automate.io, etc.) to do custom automations like you're desiring. I could walk you through how to do that if you're interested.

    I'm currently working up a Smartsheet consulting freelancing business, so I'm looking for some testimonials. So I could set this up for free.

    However, you would be required to have a subscription to one of those automation services in order for me to set it up.If your org uses Microsoft 365, you may already have access to Power Automate through your existing license - check here and see if you can utilize it:https://powerautomate.microsoft.com/en-us/

    Let me know!

    If this answer answers your question, please press "Yes" above - it helps the community (and those random Googlers out there ) find solutions like yours faster.

    Brett Wyrick;your friendly neighborhood freelance consultant & Smartsheet helper.Connect with me on LinkedIn.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi@Daniel Gill 97

    I hope you're well and safe!

    To add to Brett's excellent advice/answer.

    You could use cross-sheet formulas combined with either a VLOOKUP or INDEX/MATCH structure to connect the sheets, and when you update the source sheet, it will reflect on the destination sheet.

    Another option would be to use so-called helper sheets. In short, copy the row to a helper sheet and then use my method described previously to get the values you need to another helper sheet and then copy/move the row from that sheet to the main destination sheet.

    Would that work/help?

    I hope that helps!

    Be safe and have a fantastic week!

    Best,

    Andrée Starå| Workflow Consultant / CEO @WORK BOLD

    了我的帖子(s)帮助或回答你的问题吗or solve your problem? Please support the Community bymarking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå| Workflow Consultant / CEO @WORK BOLD

    W:www.workbold.com| E:[email protected]| P: +46 (0) - 72 - 510 99 35

    Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.

  • Hi@Brett Wyrick- I am very new to Smartsheet and wondering if I could use the index match function to do the following -

    In my Test column on the Packaging Sheet - if the printer in the Packaging Sheet matches the printer in the Printer Lead Time Sheet, pull the number from the Total Number of Days column from the Printer Lead Time Sheet

  • In this guide, you will learn how to

    ✅

    Use only Index function in Google Sheets

    ✅

    Use only Match function in Google Sheets

    ✅

    Use both Index Match in Google Sheets

    Index Match formula can be a great alternative forVlookupandHlookupin Google Sheets.

  • I am very new to smartsheet, but can I use this to update cells on the "public" sheet?

    Or are you saying that you cannot update just one changed cell?

  • Stefan
    Stefan ✭✭✭✭✭✭
    I am very new to smartsheet, but can I use this to update cells on the "public" sheet?<\/p>

    Or are you saying that you cannot update just one changed cell?<\/p>","bodyRaw":"[{\"insert\":\"I am very new to smartsheet, but can I use this to update cells on the \\\"public\\\" sheet?\\nOr are you saying that you cannot update just one changed cell?\\n\"}]","format":"rich","dateInserted":"2022-07-21T19:37:10+00:00","insertUser":{"userID":150427,"name":"SEBERCAW","url":"https:\/\/community.smartsheet.com\/profile\/SEBERCAW","photoUrl":"https:\/\/lh3.googleusercontent.com\/a-\/AFdZucpba5VVBAHyaGW4Sjhx0LlZJJH1Otj6Fsbq5h6BAw=s96-c","dateLastActive":"2022-08-20T16:50:51+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"displayOptions":{"showUserLabel":false,"showCompactUserInfo":true,"showDiscussionLink":false,"showPostLink":false,"showCategoryLink":false,"renderFullContent":false,"expandByDefault":false},"url":"https:\/\/community.smartsheet.com\/discussion\/comment\/337078#Comment_337078","embedType":"quote"}"> https://community.smartsheet.com/discussion/comment/337078#Comment_337078

    Hi@SEBERCAW

    you could use cell links to do that.

    Cell Linking | Smartsheet Learning Center


    Hope this helps

    Stefan

    Smartsheet Consulting, Solution Building, Training and Support.

    Projects for Processes and for People.

  • 我发现正确的公式,但如果没有达te it has an #INVALID VALUE. I tried fixing it with IFERROR, but that does not work. Everything works except when I add the IFERROR and the opening and closing parentheses.


    =IFERROR(INDEX(COLLECT({EEO/HARRASSEMENT}, {NAME},[email protected], {EEO/HARRASSEMENT}, <>""), 1))

  • Stefan
    Stefan ✭✭✭✭✭✭

    Hi@SEBERCAW,

    if everything else is working, then I see one unnecessary parentheses in the end, which is needed at the end of your INDEX formula:

    =IFERROR(INDEX(COLLECT({EEO/HARRASSEMENT}, {NAME},[email protected], {EEO/HARRASSEMENT}, <>"")), 1)

    Also your formula is built to show a 1 if an error is thrown. A 1 would only work, if the column with your formula is e.g. of the type checkmark. Otherwise you need to put the message to be shown in quotation marks:

    =IFERROR(INDEX(COLLECT({EEO/HARRASSEMENT}, {NAME},[email protected], {EEO/HARRASSEMENT}, <>"")), "No value present")


    Hope this helps.

    Stefan

    Smartsheet Consulting, Solution Building, Training and Support.

    Projects for Processes and for People.

  • Thanks, this helped.

  • Hi@Brett Wyrickand everyone,

    I am novice at Smartsheet. Can I use Index/Match to bring data I needtoa 400 line Smartsheetfroma 2,000 line Smartsheet, if the 400 line Smartsheet is a subset of the 2,000 line Smartsheet? I read somewhere that Index/Match has a 100 line max? TIA for any info/advice

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi@Edith Orenstein

    I hope you're well and safe!

    Yes, that should work just fine. (There isn't a limit of 100 lines, but there is a limit of 100 distinct references)

    I hope that helps!

    Be safe and have a fantastic week!

    Best,

    Andrée Starå| Workflow Consultant / CEO @WORK BOLD

    了我的帖子(s)帮助或回答你的问题吗or solve your problem? Please support the Community bymarking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå| Workflow Consultant / CEO @WORK BOLD

    W:www.workbold.com| E:[email protected]| P: +46 (0) - 72 - 510 99 35

    Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.