Want to see if Items in one sheet exist in another sheet, if not then need to say “Add to list”












0















I have an Excel file with 2 sheets. Sheet 1 has a column of part numbers. Sheet 2 also has a column of part numbers; I want to check this column against sheet 1, and if there is a part number on it that isn't on sheet 1, then I want the cell next to that part number to say "Add to sheet1".



I've toyed with IFERROR statements and Indexing, but have had no success so far. How can I accomplish this?










share|improve this question



























    0















    I have an Excel file with 2 sheets. Sheet 1 has a column of part numbers. Sheet 2 also has a column of part numbers; I want to check this column against sheet 1, and if there is a part number on it that isn't on sheet 1, then I want the cell next to that part number to say "Add to sheet1".



    I've toyed with IFERROR statements and Indexing, but have had no success so far. How can I accomplish this?










    share|improve this question

























      0












      0








      0








      I have an Excel file with 2 sheets. Sheet 1 has a column of part numbers. Sheet 2 also has a column of part numbers; I want to check this column against sheet 1, and if there is a part number on it that isn't on sheet 1, then I want the cell next to that part number to say "Add to sheet1".



      I've toyed with IFERROR statements and Indexing, but have had no success so far. How can I accomplish this?










      share|improve this question














      I have an Excel file with 2 sheets. Sheet 1 has a column of part numbers. Sheet 2 also has a column of part numbers; I want to check this column against sheet 1, and if there is a part number on it that isn't on sheet 1, then I want the cell next to that part number to say "Add to sheet1".



      I've toyed with IFERROR statements and Indexing, but have had no success so far. How can I accomplish this?







      microsoft-excel worksheet-function microsoft-excel-2010 microsoft-excel-2007






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 12 at 21:42









      forlornforlorn

      103




      103






















          2 Answers
          2






          active

          oldest

          votes


















          2














          Assuming the parts number are in column A for both sheets, the following formula in Sheet2 should work:



          =IF(COUNTIF(Sheet1!A:A,A2)=0,"Add to Sheet1","")


          (populate it down for all your part numbers)






          share|improve this answer
























          • The “A:A” syntax is a good way to go.

            – whiskeychief
            Feb 15 at 10:53



















          1














          I'll focus on using IFERROR, since that's what you attempted.



          If this column is just for an error flag, and you don't care what's displayed as long as you get the message when needed, you can use IFERROR. That returns the formula result as long as there isn't an error, or your message if there's an error. So using it with MATCH, you could do something like this. Assuming your values are in column A of both sheets, B1 of Sheet2 could contain:



          =IFERROR(MATCH(A1,Sheet1!$A$1:$A$1000,0),"Add to Sheet1")


          Use an appropriate range for Sheet1. This will display the "Add to Sheet1" message when needed, but will also display a number (the MATCH result) in other cases.



          If you only want to see either the message or a blank cell, use IF and ISERROR:



          =IF(ISERROR(MATCH(A4,Sheet1!$A$1:$A$1000,0)),"Add to Sheet1","")





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1405024%2fwant-to-see-if-items-in-one-sheet-exist-in-another-sheet-if-not-then-need-to-sa%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Assuming the parts number are in column A for both sheets, the following formula in Sheet2 should work:



            =IF(COUNTIF(Sheet1!A:A,A2)=0,"Add to Sheet1","")


            (populate it down for all your part numbers)






            share|improve this answer
























            • The “A:A” syntax is a good way to go.

              – whiskeychief
              Feb 15 at 10:53
















            2














            Assuming the parts number are in column A for both sheets, the following formula in Sheet2 should work:



            =IF(COUNTIF(Sheet1!A:A,A2)=0,"Add to Sheet1","")


            (populate it down for all your part numbers)






            share|improve this answer
























            • The “A:A” syntax is a good way to go.

              – whiskeychief
              Feb 15 at 10:53














            2












            2








            2







            Assuming the parts number are in column A for both sheets, the following formula in Sheet2 should work:



            =IF(COUNTIF(Sheet1!A:A,A2)=0,"Add to Sheet1","")


            (populate it down for all your part numbers)






            share|improve this answer













            Assuming the parts number are in column A for both sheets, the following formula in Sheet2 should work:



            =IF(COUNTIF(Sheet1!A:A,A2)=0,"Add to Sheet1","")


            (populate it down for all your part numbers)







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 12 at 22:02









            cybernetic.nomadcybernetic.nomad

            2,496517




            2,496517













            • The “A:A” syntax is a good way to go.

              – whiskeychief
              Feb 15 at 10:53



















            • The “A:A” syntax is a good way to go.

              – whiskeychief
              Feb 15 at 10:53

















            The “A:A” syntax is a good way to go.

            – whiskeychief
            Feb 15 at 10:53





            The “A:A” syntax is a good way to go.

            – whiskeychief
            Feb 15 at 10:53













            1














            I'll focus on using IFERROR, since that's what you attempted.



            If this column is just for an error flag, and you don't care what's displayed as long as you get the message when needed, you can use IFERROR. That returns the formula result as long as there isn't an error, or your message if there's an error. So using it with MATCH, you could do something like this. Assuming your values are in column A of both sheets, B1 of Sheet2 could contain:



            =IFERROR(MATCH(A1,Sheet1!$A$1:$A$1000,0),"Add to Sheet1")


            Use an appropriate range for Sheet1. This will display the "Add to Sheet1" message when needed, but will also display a number (the MATCH result) in other cases.



            If you only want to see either the message or a blank cell, use IF and ISERROR:



            =IF(ISERROR(MATCH(A4,Sheet1!$A$1:$A$1000,0)),"Add to Sheet1","")





            share|improve this answer




























              1














              I'll focus on using IFERROR, since that's what you attempted.



              If this column is just for an error flag, and you don't care what's displayed as long as you get the message when needed, you can use IFERROR. That returns the formula result as long as there isn't an error, or your message if there's an error. So using it with MATCH, you could do something like this. Assuming your values are in column A of both sheets, B1 of Sheet2 could contain:



              =IFERROR(MATCH(A1,Sheet1!$A$1:$A$1000,0),"Add to Sheet1")


              Use an appropriate range for Sheet1. This will display the "Add to Sheet1" message when needed, but will also display a number (the MATCH result) in other cases.



              If you only want to see either the message or a blank cell, use IF and ISERROR:



              =IF(ISERROR(MATCH(A4,Sheet1!$A$1:$A$1000,0)),"Add to Sheet1","")





              share|improve this answer


























                1












                1








                1







                I'll focus on using IFERROR, since that's what you attempted.



                If this column is just for an error flag, and you don't care what's displayed as long as you get the message when needed, you can use IFERROR. That returns the formula result as long as there isn't an error, or your message if there's an error. So using it with MATCH, you could do something like this. Assuming your values are in column A of both sheets, B1 of Sheet2 could contain:



                =IFERROR(MATCH(A1,Sheet1!$A$1:$A$1000,0),"Add to Sheet1")


                Use an appropriate range for Sheet1. This will display the "Add to Sheet1" message when needed, but will also display a number (the MATCH result) in other cases.



                If you only want to see either the message or a blank cell, use IF and ISERROR:



                =IF(ISERROR(MATCH(A4,Sheet1!$A$1:$A$1000,0)),"Add to Sheet1","")





                share|improve this answer













                I'll focus on using IFERROR, since that's what you attempted.



                If this column is just for an error flag, and you don't care what's displayed as long as you get the message when needed, you can use IFERROR. That returns the formula result as long as there isn't an error, or your message if there's an error. So using it with MATCH, you could do something like this. Assuming your values are in column A of both sheets, B1 of Sheet2 could contain:



                =IFERROR(MATCH(A1,Sheet1!$A$1:$A$1000,0),"Add to Sheet1")


                Use an appropriate range for Sheet1. This will display the "Add to Sheet1" message when needed, but will also display a number (the MATCH result) in other cases.



                If you only want to see either the message or a blank cell, use IF and ISERROR:



                =IF(ISERROR(MATCH(A4,Sheet1!$A$1:$A$1000,0)),"Add to Sheet1","")






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 12 at 22:02









                fixer1234fixer1234

                19k144982




                19k144982






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1405024%2fwant-to-see-if-items-in-one-sheet-exist-in-another-sheet-if-not-then-need-to-sa%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                    Eduardo VII do Reino Unido