Comparing Columns on Two Different Sheets

KD Harrigan
KD Harrigan ✭✭✭
edited 02/02/23 inSmartsheet Basics

I have two sheets that I need to compare data and highlight any matching data. If Sheet "A" query column matches any of the data in Sheet "B" query column, then the matching data in Sheet "B" query column needs to highlight. I've not had any luck finding a formula that works. Any thoughts?

Answers

  • Ryan Sides
    Ryan Sides ✭✭✭✭✭✭

    @KD Harrigan

    Hey KD, you'll want to create another column (type: checkbox) in Sheet B and use the Index/Match formula combination.

    After you add the column in Sheet B, right click and Manage References. In there, you'll create a reference to your query column in Sheet A. Name it "Sheet A".

    Then in your new column in Sheet B, enter this:

    =if(index({Sheet A}, match([SheetBQueryColumnName]@row, {Sheet A}, 0)) = [SheetBQueryColumnName]@row, 1, 0)

    When you get a match on the above formula, the checkbox will check on. You can then create a Conditional Format on this new column to highlight the row. Does that help?

    Ryan Sides

    Smartsheet Tips and Tricks for Beginners and Advanced onLinkedInandYouTube

    Come Say Hello!

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    edited 02/03/23

    Hi@KD Harrigan

    I hope you're well and safe!

    To add to Ryan's excellent advice/answer.

    Another option could be to use COUNTIFS.

    Try something like this.

    =IF(COUNTIFS({Sheet A},[SheetBQueryColumnName]@row) > 0, 1)

    Did that work/help?

    I hope that helps!

    Be safe, and have a fantastic weekend!

    Best,

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

    Please support the Community by marking the post(s)thathelped or answered your question or solved your problem withthe accepted answer/helpful, Insightful/Vote Up/Awesome. 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.

  • KD Harrigan
    KD Harrigan ✭✭✭

    This is awesome, I would have never figured this out on my own, this works perfectly!!

    Thank you both for your help.

    Be well, be happy, and be safe!

    Have a wonderful weekend! :)

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

    @KD Harrigan

    Excellent!

    You're more than welcome!

    Please support the Community by marking the post(s)thathelped or answered your question or solved your problem withthe accepted answer/helpful, Insightful/Vote Up/Awesome. 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.

What type of plan are you on? Certain plan types require that a system admin give you permission to access group management.<\/p>


<\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n


<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":109197,"type":"question","name":"Forms","excerpt":"I created two different forms and the data entered on both of them is saved in the same sheet. How do I get it to save on two separate sheets?","snippet":"I created two different forms and the data entered on both of them is saved in the same sheet. How do I get it to save on two separate sheets?","categoryID":321,"dateInserted":"2023-08-21T14:53:07+00:00","dateUpdated":null,"dateLastComment":"2023-08-21T21:46:32+00:00","insertUserID":165409,"insertUser":{"userID":165409,"name":"mpatton","url":"https:\/\/community.smartsheet.com\/profile\/mpatton","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!zDPQszzjyv0!iTHSYpyQ8H0!4mIm1J-gpMN","dateLastActive":"2023-08-21T23:16:32+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-08-21T22:29:51+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":25,"score":null,"hot":3385286979,"url":"https:\/\/community.smartsheet.com\/discussion\/109197\/forms","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109197\/forms","format":"Rich","lastPost":{"discussionID":109197,"commentID":391727,"name":"Re: Forms","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/391727#Comment_391727","dateInserted":"2023-08-21T21:46:32+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-08-21T22:29:51+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-21T20:23:16+00:00","dateAnswered":"2023-08-21T19:38:23+00:00","acceptedAnswers":[{"commentID":391698,"body":"

You would create the sheet first, then you can click on \"Forms\" in the top right corner of the new sheet to create the form.<\/p>


<\/p>

If you need a bunch of the same columns, You can \"Save as new\" the existing sheet and then just delete whatever you don't need from each sheet.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":109205,"type":"question","name":"Auto Populate Column Data","excerpt":"I have a sheet that I am populating row one with data inputted using an intake form (Form1). I then have a Update form (Form2) that is used by end users to input additional data. I need the data inputted from form1 to auto populate the entire column the data resides in when form2 is submitted. Any suggestions on how to…","snippet":"I have a sheet that I am populating row one with data inputted using an intake form (Form1). I then have a Update form (Form2) that is used by end users to input additional data.…","categoryID":321,"dateInserted":"2023-08-21T16:13:10+00:00","dateUpdated":null,"dateLastComment":"2023-08-21T19:37:00+00:00","insertUserID":162922,"insertUser":{"userID":162922,"name":"MSGFreebird","title":"","url":"https:\/\/community.smartsheet.com\/profile\/MSGFreebird","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtfyipG4v_0PcUXERFavMo9q8-BAK6RWzljovF2sarPztFY=s96-c","dateLastActive":"2023-08-21T22:54:52+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-08-21T22:29:51+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":7,"countViews":39,"score":null,"hot":3385285210,"url":"https:\/\/community.smartsheet.com\/discussion\/109205\/auto-populate-column-data","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109205\/auto-populate-column-data","format":"Rich","lastPost":{"discussionID":109205,"commentID":391697,"name":"Re: Auto Populate Column Data","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/391697#Comment_391697","dateInserted":"2023-08-21T19:37:00+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-08-21T22:29:51+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/QSNSANMKG9JV\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-21T18:39:09+00:00","dateAnswered":"2023-08-21T18:00:47+00:00","acceptedAnswers":[{"commentID":391672,"body":"

Yes. The \"@row\" piece of the formula is looking for the cell within the row of the formula. So on any row where the meta columns are blank, \"@row\" will also return blank.<\/p>


<\/p>

Try this instead:<\/p>

=INDEX([AT-Meta]:[AT-Meta], 1)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=321&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":4964,"limit":3},"title":"Trending in Smartsheet Basics","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Smartsheet Basics