Extract certain words from strings of text in Excel cells












0















I have a column of cells filled with a lot of text. I only need one word from each cell. If you look closely you will see that the latter part of each cell says either High, Medium, or Low.



enter image description here



I want to create a column next to this one that extracts this word (High, Medium, or Low) from the text string. My initial thought was to extract based on position, but the words are in varying positions.










share|improve this question





























    0















    I have a column of cells filled with a lot of text. I only need one word from each cell. If you look closely you will see that the latter part of each cell says either High, Medium, or Low.



    enter image description here



    I want to create a column next to this one that extracts this word (High, Medium, or Low) from the text string. My initial thought was to extract based on position, but the words are in varying positions.










    share|improve this question



























      0












      0








      0








      I have a column of cells filled with a lot of text. I only need one word from each cell. If you look closely you will see that the latter part of each cell says either High, Medium, or Low.



      enter image description here



      I want to create a column next to this one that extracts this word (High, Medium, or Low) from the text string. My initial thought was to extract based on position, but the words are in varying positions.










      share|improve this question
















      I have a column of cells filled with a lot of text. I only need one word from each cell. If you look closely you will see that the latter part of each cell says either High, Medium, or Low.



      enter image description here



      I want to create a column next to this one that extracts this word (High, Medium, or Low) from the text string. My initial thought was to extract based on position, but the words are in varying positions.







      microsoft-excel worksheet-function microsoft-excel-2010 microsoft-excel-2013 microsoft-excel-2016






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 24 at 21:28









      harrymc

      261k14271577




      261k14271577










      asked Jan 24 at 21:20









      forlornforlorn

      103




      103






















          3 Answers
          3






          active

          oldest

          votes


















          0














          This will return the correct value:



          =INDEX({"High","Medium","Low"},AGGREGATE(15,6,ROW($1:$3)/(ISNUMBER(SEARCH("*" & {"High";"Medium";"Low"} & "*",A1))),1))


          It iterates the possible words and returns the one that does not return an error as a number in order to the INDEX.



          enter image description here






          share|improve this answer































            0














            I know a function to extract part of a string inside two unique characters. e.g: -Medium- will be Medium.



            This is the formula:



            =MID(A3,SEARCH("-",A3)+1,SEARCH("-",A3,SEARCH("-",A3)+1)-SEARCH("-",A3)-1)



            In order for this to work, you will need to convert your text as shown in the photo below to add the unique character (in this case a dash -). You can do it using the find and replace CTRL+H as follows:




            1. Select the column that has the text to extract.

            2. Press CTRL+H key combination

            3. Find what: Low

            4. Replace with: -Low-

            5. Click on Replace All button.

            6. Repeat from step 3 to 5 for Medium and High.


            See the output below:



            here



            I hope this helps.






            share|improve this answer































              0














              Here's a simple approach that uses wildcards.



              enter image description here



              The formula in B1:



              =IF(COUNTIF(A1,"*Low*"),"Low",IF(COUNTIF(A1,"*Medium*"),"Medium",IF(COUNTIF(A1,"*High*"),"High","")))


              It's just some nested IFs to check whether each term is contained in the cell. I added an extra IF test in case there could be a record that does not contain any of the terms (returns a blank).






              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%2f1398088%2fextract-certain-words-from-strings-of-text-in-excel-cells%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                0














                This will return the correct value:



                =INDEX({"High","Medium","Low"},AGGREGATE(15,6,ROW($1:$3)/(ISNUMBER(SEARCH("*" & {"High";"Medium";"Low"} & "*",A1))),1))


                It iterates the possible words and returns the one that does not return an error as a number in order to the INDEX.



                enter image description here






                share|improve this answer




























                  0














                  This will return the correct value:



                  =INDEX({"High","Medium","Low"},AGGREGATE(15,6,ROW($1:$3)/(ISNUMBER(SEARCH("*" & {"High";"Medium";"Low"} & "*",A1))),1))


                  It iterates the possible words and returns the one that does not return an error as a number in order to the INDEX.



                  enter image description here






                  share|improve this answer


























                    0












                    0








                    0







                    This will return the correct value:



                    =INDEX({"High","Medium","Low"},AGGREGATE(15,6,ROW($1:$3)/(ISNUMBER(SEARCH("*" & {"High";"Medium";"Low"} & "*",A1))),1))


                    It iterates the possible words and returns the one that does not return an error as a number in order to the INDEX.



                    enter image description here






                    share|improve this answer













                    This will return the correct value:



                    =INDEX({"High","Medium","Low"},AGGREGATE(15,6,ROW($1:$3)/(ISNUMBER(SEARCH("*" & {"High";"Medium";"Low"} & "*",A1))),1))


                    It iterates the possible words and returns the one that does not return an error as a number in order to the INDEX.



                    enter image description here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 24 at 22:05









                    Scott CranerScott Craner

                    12.3k11218




                    12.3k11218

























                        0














                        I know a function to extract part of a string inside two unique characters. e.g: -Medium- will be Medium.



                        This is the formula:



                        =MID(A3,SEARCH("-",A3)+1,SEARCH("-",A3,SEARCH("-",A3)+1)-SEARCH("-",A3)-1)



                        In order for this to work, you will need to convert your text as shown in the photo below to add the unique character (in this case a dash -). You can do it using the find and replace CTRL+H as follows:




                        1. Select the column that has the text to extract.

                        2. Press CTRL+H key combination

                        3. Find what: Low

                        4. Replace with: -Low-

                        5. Click on Replace All button.

                        6. Repeat from step 3 to 5 for Medium and High.


                        See the output below:



                        here



                        I hope this helps.






                        share|improve this answer




























                          0














                          I know a function to extract part of a string inside two unique characters. e.g: -Medium- will be Medium.



                          This is the formula:



                          =MID(A3,SEARCH("-",A3)+1,SEARCH("-",A3,SEARCH("-",A3)+1)-SEARCH("-",A3)-1)



                          In order for this to work, you will need to convert your text as shown in the photo below to add the unique character (in this case a dash -). You can do it using the find and replace CTRL+H as follows:




                          1. Select the column that has the text to extract.

                          2. Press CTRL+H key combination

                          3. Find what: Low

                          4. Replace with: -Low-

                          5. Click on Replace All button.

                          6. Repeat from step 3 to 5 for Medium and High.


                          See the output below:



                          here



                          I hope this helps.






                          share|improve this answer


























                            0












                            0








                            0







                            I know a function to extract part of a string inside two unique characters. e.g: -Medium- will be Medium.



                            This is the formula:



                            =MID(A3,SEARCH("-",A3)+1,SEARCH("-",A3,SEARCH("-",A3)+1)-SEARCH("-",A3)-1)



                            In order for this to work, you will need to convert your text as shown in the photo below to add the unique character (in this case a dash -). You can do it using the find and replace CTRL+H as follows:




                            1. Select the column that has the text to extract.

                            2. Press CTRL+H key combination

                            3. Find what: Low

                            4. Replace with: -Low-

                            5. Click on Replace All button.

                            6. Repeat from step 3 to 5 for Medium and High.


                            See the output below:



                            here



                            I hope this helps.






                            share|improve this answer













                            I know a function to extract part of a string inside two unique characters. e.g: -Medium- will be Medium.



                            This is the formula:



                            =MID(A3,SEARCH("-",A3)+1,SEARCH("-",A3,SEARCH("-",A3)+1)-SEARCH("-",A3)-1)



                            In order for this to work, you will need to convert your text as shown in the photo below to add the unique character (in this case a dash -). You can do it using the find and replace CTRL+H as follows:




                            1. Select the column that has the text to extract.

                            2. Press CTRL+H key combination

                            3. Find what: Low

                            4. Replace with: -Low-

                            5. Click on Replace All button.

                            6. Repeat from step 3 to 5 for Medium and High.


                            See the output below:



                            here



                            I hope this helps.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 24 at 22:24









                            Manuel FlorianManuel Florian

                            1595




                            1595























                                0














                                Here's a simple approach that uses wildcards.



                                enter image description here



                                The formula in B1:



                                =IF(COUNTIF(A1,"*Low*"),"Low",IF(COUNTIF(A1,"*Medium*"),"Medium",IF(COUNTIF(A1,"*High*"),"High","")))


                                It's just some nested IFs to check whether each term is contained in the cell. I added an extra IF test in case there could be a record that does not contain any of the terms (returns a blank).






                                share|improve this answer




























                                  0














                                  Here's a simple approach that uses wildcards.



                                  enter image description here



                                  The formula in B1:



                                  =IF(COUNTIF(A1,"*Low*"),"Low",IF(COUNTIF(A1,"*Medium*"),"Medium",IF(COUNTIF(A1,"*High*"),"High","")))


                                  It's just some nested IFs to check whether each term is contained in the cell. I added an extra IF test in case there could be a record that does not contain any of the terms (returns a blank).






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    Here's a simple approach that uses wildcards.



                                    enter image description here



                                    The formula in B1:



                                    =IF(COUNTIF(A1,"*Low*"),"Low",IF(COUNTIF(A1,"*Medium*"),"Medium",IF(COUNTIF(A1,"*High*"),"High","")))


                                    It's just some nested IFs to check whether each term is contained in the cell. I added an extra IF test in case there could be a record that does not contain any of the terms (returns a blank).






                                    share|improve this answer













                                    Here's a simple approach that uses wildcards.



                                    enter image description here



                                    The formula in B1:



                                    =IF(COUNTIF(A1,"*Low*"),"Low",IF(COUNTIF(A1,"*Medium*"),"Medium",IF(COUNTIF(A1,"*High*"),"High","")))


                                    It's just some nested IFs to check whether each term is contained in the cell. I added an extra IF test in case there could be a record that does not contain any of the terms (returns a blank).







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Jan 24 at 22:55









                                    fixer1234fixer1234

                                    18.9k144982




                                    18.9k144982






























                                        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%2f1398088%2fextract-certain-words-from-strings-of-text-in-excel-cells%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

                                        Plaza Victoria

                                        In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                                        How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...