{"id":28462,"date":"2023-04-01T16:00:53","date_gmt":"2023-04-01T14:00:53","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=28462"},"modified":"2024-04-12T22:10:47","modified_gmt":"2024-04-12T20:10:47","slug":"8-substring-functions","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/8-substring-functions\/","title":{"rendered":"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis"},"content":{"rendered":"<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/CD89BBEF-BA02-4F8F-BE55-A9FE74C55311.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"aligncenter wp-image-29213 size-large\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/CD89BBEF-BA02-4F8F-BE55-A9FE74C55311-1024x576.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"1024\" height=\"576\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/CD89BBEF-BA02-4F8F-BE55-A9FE74C55311-1024x576.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/CD89BBEF-BA02-4F8F-BE55-A9FE74C55311-300x169.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/CD89BBEF-BA02-4F8F-BE55-A9FE74C55311-768x432.png 768w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/CD89BBEF-BA02-4F8F-BE55-A9FE74C55311.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Substring means <strong>extracting a particular string from a combination of strings<\/strong>. For example, extracting the word \u201cMy\u201d from the sentence \u201cMy Excel Online\u201d. Substring is an <strong>integrated <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/or-function\/\" target=\"_blank\" rel=\"noopener\">function in Excel<\/a><\/strong> which means we cannot outright extract strings.<\/p>\n<p>But we can use different functions or a combination of functions to extract any particular string. A <strong>few substring functions<\/strong> that we can use in Excel are:<\/p>\n<ol>\n<li><strong><a href=\"#left\">LEFT<\/a><\/strong><\/li>\n<li><strong><a href=\"#right\">RIGHT<\/a><\/strong><\/li>\n<li><strong><a href=\"#mid\">MID<\/a><\/strong><\/li>\n<li><strong><a href=\"#len\">LEN<\/a><\/strong><\/li>\n<li><strong><a href=\"#find\">FIND<\/a><\/strong><\/li>\n<li><strong><a href=\"#trim\">TRIM<\/a><\/strong><\/li>\n<li><strong><a href=\"#textbefore\">TEXTBEFORE<\/a><\/strong><\/li>\n<li><strong><a href=\"#textafter\">TEXTAFTER<\/a><\/strong><\/li>\n<\/ol>\n<p>Let&#8217;s look into each of these functions one by one. You can also download the Excel Workbook and follow along.<\/p>\n<p><strong><a class=\"IRPP_minimalist icon-download hiddenmode replaced-link button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-in-Excel.xlsx\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Excel-Substring-Workbook.xlsx\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"hiddenmode replaced-link fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">Substring-in-Excel.xlsx<\/span><\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"left\"><\/a>LEFT<\/strong><\/p>\n<p>The LEFT function can be used to <strong>extract a specified number of characters from the left<\/strong> of the text string.<\/p>\n<p><em>LEFT(text, [num_chars])<\/em><\/p>\n<ul>\n<li><strong>text<\/strong> &#8211; It refers to the text string that contains the characters you want to extract.<\/li>\n<li><strong>num_chars<\/strong> &#8211; Optional. Specifies the number of characters you want LEFT to extract.\n<ul>\n<li>Num_chars must be greater than or equal to zero.<\/li>\n<li>If num_chars is greater than the length of the text, LEFT returns all of the text.<\/li>\n<li>If num_chars is omitted, it is assumed to be 1.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>In this example, we want to extract the <strong>first 3 characters<\/strong> from our reference text string in cell A2.<\/p>\n<p><strong>STEP 1:<\/strong>\u00a0We need to\u00a0<strong>enter the\u00a0<em>Left\u00a0<\/em>function\u00a0<\/strong>next to the cell that we want to extract the data from:<\/p>\n<p><strong>=LEFT(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.15-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28484 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.15-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"968\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.15-AM.png 968w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.15-AM-300x103.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.15-AM-768x263.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument &#8211; <strong>text. <\/strong><em>This is the reference cell that contains the text or value from which you want to extract X characters.<\/em><\/p>\n<p><strong>=LEFT(A2<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.58-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28485 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.58-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"970\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.58-AM.png 970w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.58-AM-300x102.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.19.58-AM-768x261.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the second argument &#8211; <strong>[num_chars]<\/strong>. This is the number of characters you want to extract from cell A2. <em>Enter a positive number only.<\/em><\/p>\n<p><strong>=LEFT(A2, 3)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-1-1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28476 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-1-1.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"284\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-1-1.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-1-1-300x91.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-1-1-768x233.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"right\"><\/a>RIGHT<\/strong><\/p>\n<p>The <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/text\/right\/\" target=\"_blank\" rel=\"noopener\">RIGHT function<\/a> can be used to <strong>extract a specified number of characters from the right<\/strong> of the text string.<\/p>\n<p><em>RIGHT(text,[num_chars])<\/em><\/p>\n<ul>\n<li><strong>text<\/strong> &#8211; It refers to the text string that contains the characters you want to extract.<\/li>\n<li><strong>num_chars<\/strong> &#8211; Optional. Specifies the number of characters you want RIGHT to extract.\n<ul>\n<li>Num_chars must be greater than or equal to zero.<\/li>\n<li>If num_chars is greater than the length of the text, RIGHT returns all of the text.<\/li>\n<li>If num_chars is omitted, it is assumed to be 1.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>In this example, we want to extract the <strong>last 4 characters<\/strong> from our reference text string in cell A2.<\/p>\n<p><strong>STEP 1:<\/strong>\u00a0We need to\u00a0<strong>enter the\u00a0<em>RIGHT <\/em>function\u00a0<\/strong>next to the cell that we want to extract the data from:<\/p>\n<p><strong>=RIGHT(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.37.58-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28486\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.37.58-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"972\" height=\"328\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.37.58-AM.png 972w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.37.58-AM-300x101.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.37.58-AM-768x259.png 768w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument &#8211; <strong>text. <\/strong><em>This is the reference cell that contains the text or value from which you want to extract X characters.<\/em><\/p>\n<p><strong>=RIGHT(A2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.38.12-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28487\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.38.12-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"968\" height=\"326\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.38.12-AM.png 968w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.38.12-AM-300x101.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-12.38.12-AM-768x259.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the second argument &#8211; <strong>[num_chars]<\/strong>. This is the number of characters you want to extract from cell A2. <em>Enter a positive number only.<\/em><\/p>\n<p><strong>=RIGHT(A2, 4)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-2.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28467 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-2.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"292\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-2.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-2-300x94.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-2-768x240.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"mid\"><\/a>MID<\/strong><\/p>\n<p>The MID function can be used to<strong> extract a specified number of characters from the specified starting position<\/strong> in a text string.<\/p>\n<p><em>MID(text,start_num,num_chars)<\/em><\/p>\n<ul>\n<li><strong>text<\/strong> \u2013 It refers to the text string that contains the characters you want to extract.<\/li>\n<li><strong>start_num<\/strong> &#8211; It is the position of the first character you want to extract from the text. The first character in the text has start_num 1, and so on.<\/li>\n<li><strong>num_chars<\/strong> &#8211; specifies the number of characters you want MID to return from the text.<\/li>\n<\/ul>\n<p>In this example, we want to extract <strong>4 characters starting from <\/strong><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/remove-last-character-from-strings\/\" target=\"_blank\" rel=\"noopener\">the 5th position of<\/a> the text string.<\/p>\n<p><strong>STEP 1:<\/strong> Enter the <i><strong>MID<\/strong>\u00a0<\/i>function in a blank cell.<\/p>\n<p><strong>=MID(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.01-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28492\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.01-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"928\" height=\"368\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.01-AM.png 928w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.01-AM-300x119.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.01-AM-768x305.png 768w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the <b>first <\/b>argument &#8211; <em><strong>text<\/strong>. <\/em>Select the cell containing the source text that you want to extract from &#8211;<\/p>\n<p><strong>=MID(A2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.42-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28493\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.42-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"932\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.42-AM.png 932w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.42-AM-300x107.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.08.42-AM-768x274.png 768w\" sizes=\"(max-width: 932px) 100vw, 932px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the <b>second <\/b>argument &#8211;\u00a0<em><strong>start_num<\/strong><\/em><\/p>\n<p>Enter the starting position &#8211; This is where the MID <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" title=\"formula\" data-wpil-keyword-link=\"linked\">formula<\/a> will start getting the text.<\/p>\n<p><strong>=MID(A2, 5,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.09.51-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28494\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.09.51-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"930\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.09.51-AM.png 930w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.09.51-AM-300x107.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.09.51-AM-768x274.png 768w\" sizes=\"(max-width: 930px) 100vw, 930px\" \/><\/a><\/p>\n<p><strong>STEP 4:<\/strong> Enter the <b>third <\/b>argument &#8211;\u00a0<em><strong>num_chars<\/strong><\/em><\/p>\n<p><em>Enter the number of characters you want to extract. In our case, we want to get 4 characters.<\/em><\/p>\n<p><strong>=MID(A2, 5, 4)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-3.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28468 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-3.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"368\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-3.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-3-300x118.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-3-768x302.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"len\"><\/a>LEN<\/strong><\/p>\n<p>The <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/text\/len\/\" target=\"_blank\" rel=\"noopener\">LEN function<\/a> can be used to <strong>return the number of characters<\/strong> in the text string.<\/p>\n<p><em>LEN(text)<\/em><\/p>\n<ul>\n<li><strong>text<\/strong> \u2013 It refers to the text string from which you want to get the number of characters<\/li>\n<\/ul>\n<p>In this example, we want to extract the number of characters in the text string.<\/p>\n<p><strong>STEP 1:<\/strong> <strong>Enter the\u00a0<em>LEN<\/em><i>\u00a0<\/i>function\u00a0<\/strong>next to the cell that we want to get the number of characters from<\/p>\n<p><strong>=LEN(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.14.28-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28496\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.14.28-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"934\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.14.28-AM.png 934w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.14.28-AM-300x106.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.14.28-AM-768x271.png 768w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument &#8211; <em><strong>text<\/strong><\/em><\/p>\n<p><strong>=LEN(A2)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-4.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28469 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-4.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"934\" height=\"298\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-4.png 934w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-4-300x96.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-4-768x245.png 768w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"find\"><\/a>FIND<\/strong><\/p>\n<p>The FIND function can be used to<strong> get the position of a specific text within another text<\/strong>.<\/p>\n<p><em>FIND(find_text, within_text, [start_num])<\/em><\/p>\n<ul>\n<li><strong>find_text<\/strong> \u2013 It is the text that needs to be searched<\/li>\n<li><strong>within_text<\/strong> \u2013 It is the source text<\/li>\n<li><strong>start_num<\/strong> \u2013 It is the starting position of the source text<\/li>\n<\/ul>\n<p>In this example, we want to<strong> find the position or location of space (\u201c \u201c) in the text string<\/strong> mentioned in cell A2.<\/p>\n<p><strong>STEP 1:<\/strong>\u00a0We need to\u00a0<strong>enter the FIND function in a blank cell<\/strong>:<\/p>\n<p><strong>=FIND(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.47.51-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28499\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.47.51-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"966\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.47.51-AM.png 966w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.47.51-AM-300x102.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.47.51-AM-768x262.png 768w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first<b>\u00a0<\/b>argument &#8211; <em><strong>find_text. <\/strong><\/em>Enter the character that you need to search for in the source text. In our case, it is a space (&#8221; &#8220;).<\/p>\n<p><strong>=FIND(&#8221; &#8220;,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.48.22-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28500\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.48.22-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"970\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.48.22-AM.png 970w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.48.22-AM-300x102.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.48.22-AM-768x261.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/a><\/p>\n<p><strong>STEP 3: <\/strong>Enter the second argument &#8211;\u00a0<em><strong>within_text<\/strong><\/em>. Select the cell containing the source text.<\/p>\n<p><strong>=FIND(&#8221; &#8220;, A2)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28470 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"292\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5-300x94.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5-768x240.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p><strong>STEP 4: <\/strong>Enter the third argument &#8211; <em><strong>[<\/strong><strong>start_num]<\/strong><\/em><\/p>\n<p>This is the position from which you want to start searching in your source text. <em>You can leave this blank, it will default to 1 which means it will start looking from the first character of your source text.<\/em><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28470 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"292\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5-300x94.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-5-768x240.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"trim\"><\/a>TRIM<\/strong><\/p>\n<p>The TRIM function can be used to<strong> remove unneeded spaces in your text<\/strong>, except single spaces in between words.<\/p>\n<p><em>TRIM(text)<\/em><\/p>\n<ul>\n<li><strong>text<\/strong> \u2013 It is the text from which you want extra spaces to be removed<\/li>\n<\/ul>\n<p>Extra spaces are very difficult to spot, especially those at the end. In this example, all the extra spaces from the text whether it be from the start, middle, or at the end of the text have been removed.<\/p>\n<p>All the unneeded spaces in the text, except single spaces between words have been removed.<\/p>\n<p><strong>STEP 1:<\/strong>\u00a0We need to\u00a0<strong>enter the\u00a0<em>Trim\u00a0<\/em>function<\/strong><\/p>\n<p><strong>=TRIM(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.49.21-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28501\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.49.21-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"762\" height=\"280\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.49.21-AM.png 762w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.49.21-AM-300x110.png 300w\" sizes=\"(max-width: 762px) 100vw, 762px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the argument \u2013<em><strong> text<\/strong><\/em>. This is the source text from which you want to remove extra spaces.<\/p>\n<p><strong>=TRIM(A2)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-6.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28471 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-6.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"252\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-6.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-6-300x81.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-6-768x207.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"textbefore\"><\/a>TEXTBEFORE<\/strong><\/p>\n<p>TEXTBEFORE function can be used to <strong>extract <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/extract-text-with-substring\/\" target=\"_blank\" rel=\"noopener\">the<\/a> text that occurs before a given character<\/strong> or string. It is available in Excel 365 only.<\/p>\n<p><em>TEXTBEFORE(text,delimiter,[instance_num], [match_mode], [match_end], [if_not_found])<\/em><\/p>\n<ul>\n<li><strong>text<\/strong> \u2013 It is the text you are searching within.\n<ul>\n<li>Wildcard characters are not allowed.<\/li>\n<li>If the text is an empty string, Excel returns empty text.<\/li>\n<\/ul>\n<\/li>\n<li><strong>delimiter<\/strong> &#8211; It is the text that marks the point before which you want to extract.<\/li>\n<li><strong>instance_num<\/strong> \u2013 It is the instance of the delimiter after which you want to extract the text.\n<ul>\n<li>By default, instance_num = 1.<\/li>\n<li>A negative number starts searching for the text from the end.<\/li>\n<li>Optional.<\/li>\n<\/ul>\n<\/li>\n<li><strong>match_mode<\/strong> &#8211; It determines whether the text search is case-sensitive. The default is case-sensitive. Optional. Enter one of the following:\n<ul>\n<li>0 Case sensitive.<\/li>\n<li>1 Case insensitive.<\/li>\n<\/ul>\n<\/li>\n<li><strong>match_end<\/strong> &#8211; It treats the end of the text as a delimiter. By default, the text is an exact match. Optional. Enter the following\n<ul>\n<li>0 &#8211; Don&#8217;t match the delimiter against the end of the text.<\/li>\n<li>1- Match the delimiter against the end of the text.<\/li>\n<\/ul>\n<\/li>\n<li><strong>if_not_found<\/strong> &#8211; It is the value returned if no match is found. By default, #N\/A is returned. Optional.<\/li>\n<\/ul>\n<p>In the example, we have provided the <strong>cell containing the text string and the delimiter (i.e. space) as arguments<\/strong> and the function provides us with <strong>first names <\/strong>as result.<\/p>\n<p><strong>STEP 1:<\/strong> Enter the TEXTBEFORE function<\/p>\n<p><strong>=TEXTBEFORE(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.06-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28502\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.06-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"334\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.06-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.06-AM-300x102.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.06-AM-768x261.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument &#8211; <strong>text<\/strong>. Enter the source text from which you want to extract a substring.<\/p>\n<p><strong>=TEXTBEFORE(A2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.30-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28503\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.30-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.30-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.30-AM-300x101.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.50.30-AM-768x260.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the second argument &#8211; <strong>delimiter<\/strong>. This is the character that marks the point before which you want to extract. In our case, the delimiter is a space.<\/p>\n<p><strong>=TEXTBEFORE(A2,&#8221; &#8220;)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-7.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28472 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-7.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"286\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-7.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-7-300x92.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-7-768x235.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>All the first names have been easily extracted in column B.<\/p>\n<p>If you do not have this <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/math\/rand\/\" target=\"_blank\" rel=\"noopener\">function in Excel<\/a>, you can also try a <strong>combination of the LEFT and FIND functions to get the first names<\/strong>. Let\u2019s give it a try.<\/p>\n<p><strong>STEP 1:<\/strong> Enter the LEFT function<\/p>\n<p><strong>=LEFT(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.51.51-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28504\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.51.51-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"334\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.51.51-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.51.51-AM-300x102.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.51.51-AM-768x261.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument of the LEFT function &#8211; text. This is the source text from which you want to extract a substring.<\/p>\n<p><strong>=LEFT(A2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.17-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28505\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.17-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.17-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.17-AM-300x101.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.17-AM-768x258.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the FIND function. This function is used to find the position of space in our source text.<\/p>\n<p><strong>=LEFT(A2,FIND(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.44-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28506\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.44-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"328\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.44-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.44-AM-300x100.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.52.44-AM-768x257.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 4:<\/strong> Enter the first argument of the FIND function &#8211; <em><strong>find_text. <\/strong><\/em>This is the character that you need to search for in the source text. Here, it is a space (&#8221; &#8220;).<\/p>\n<p><strong>=LEFT(A2,FIND(&#8221; &#8220;,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.53.07-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28507\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.53.07-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"322\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.53.07-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.53.07-AM-300x98.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.53.07-AM-768x252.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 5:<\/strong> Enter the second argument of the FIND function &#8211; <em><strong>within_text<\/strong><\/em>. This is the cell containing the source text.<\/p>\n<p><strong>=LEFT(A2,FIND(&#8221; &#8220;,A2)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.54.11-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28508\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.54.11-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"982\" height=\"328\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.54.11-AM.png 982w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.54.11-AM-300x100.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.54.11-AM-768x257.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><strong>STEP 6:<\/strong> Subtract 1.<\/p>\n<p><em>We are subtracting 1 from the delimiter&#8217;s position to get the number of characters before the delimiter. This will give us the number of characters for the first name.<\/em><\/p>\n<p><strong>=LEFT(A2,FIND(&#8221; &#8220;,A2)-1)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-8.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28473 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-8.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"288\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-8.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-8-300x92.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-8-768x236.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>We have used the left and find functions to simply extract those characters from the left of space i.e. the first name.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><a id=\"textafter\"><\/a>TEXTAFTER<\/strong><\/p>\n<p>The TEXTBEFORE function has a complementary <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/extract-words-from-cell\/\" target=\"_blank\" rel=\"noopener\">function for substring<\/a> needs in EXCEL, i.e., TEXTAFTER. This function <strong>returns text that occurs after a given character<\/strong> or string.<\/p>\n<p><em>TEXTAFTER(text,delimiter,[instance_num], [match_mode], [match_end], [if_not_found])<\/em><\/p>\n<p>In the example, we have <strong>provided the cell reference containing the text string and the delimiter (i.e. space) as arguments<\/strong> and the function provides us with the result. All the last names have been easily extracted in column B.<\/p>\n<p><strong>STEP 1:<\/strong> Enter the TEXTAFTER function<\/p>\n<p><strong>=TEXTAFTER(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.09-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28509\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.09-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"994\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.09-AM.png 994w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.09-AM-300x100.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.09-AM-768x257.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument &#8211; <strong>text<\/strong>. Enter the source text from which you want to extract a substring.<\/p>\n<p><strong>=TEXTAFTER(A2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.33-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28510\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.33-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"994\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.33-AM.png 994w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.33-AM-300x100.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.55.33-AM-768x257.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the second argument &#8211; <strong>delimiter<\/strong>. This is the character that marks the point after which you want to extract. In our case, the delimiter is a space.<\/p>\n<p><strong>=TEXTAFTER(A2,&#8221; &#8220;)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-9.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28474 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-9.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"280\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-9.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-9-300x90.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-9-768x230.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>If you do not have this function in Excel, you can also <strong>try a combination of RIGHT, LEN, and FIND functions<\/strong> to get the last names. Let\u2019s give it a try.<\/p>\n<p>First, we need to <strong>count the number of characters in the entire text string using the LEN<\/strong> function. Then, we can <strong>subtract the positional number at which our delimiter<\/strong> is. This will give us the <strong>number of characters left after the delimiter<\/strong>.<\/p>\n<p>Then, the<strong> right function simply extracts those numbers of characters<\/strong> from the reference text string.<\/p>\n<p><strong>STEP 1:<\/strong> Enter the <strong>RIGHT<\/strong> function<\/p>\n<p><strong>=RIGHT(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.56.46-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28511\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.56.46-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"996\" height=\"334\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.56.46-AM.png 996w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.56.46-AM-300x101.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.56.46-AM-768x258.png 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/a><\/p>\n<p><strong>STEP 2:<\/strong> Enter the first argument of the RIGHT function &#8211; <strong>text<\/strong>. This is the source text from which you want to extract a substring.<\/p>\n<p><strong>=RIGHT(A2,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.18-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28512\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.18-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"992\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.18-AM.png 992w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.18-AM-300x100.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.18-AM-768x255.png 768w\" sizes=\"(max-width: 992px) 100vw, 992px\" \/><\/a><\/p>\n<p><strong>STEP 3:<\/strong> Enter the <strong>LEN<\/strong> function. This function is used to find the total number of characters in our source text.<\/p>\n<p><strong>=RIGHT(A2,LEN(A2)<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.47-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28513\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.47-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"996\" height=\"330\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.47-AM.png 996w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.47-AM-300x99.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.57.47-AM-768x254.png 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/a><\/p>\n<p><strong>STEP 4:<\/strong> Enter the subtract symbol<\/p>\n<p><strong>=RIGHT(A2,LEN(A2)-<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.23-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28515\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.23-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"996\" height=\"332\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.23-AM.png 996w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.23-AM-300x100.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.23-AM-768x256.png 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/a><\/p>\n<p><strong>STEP 5:<\/strong> Enter the FIND function.<\/p>\n<p><strong>=RIGHT(A2,LEN(A2)-FIND(<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.51-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28516\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.51-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"996\" height=\"324\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.51-AM.png 996w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.51-AM-300x98.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.58.51-AM-768x250.png 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/a><\/p>\n<p><strong>STEP 6: <\/strong>Enter the first argument of the FIND function &#8211; <em><strong>find_text. <\/strong><\/em>This is the character that you need to search for in the source text. Here, it is a space (&#8221; &#8220;).<\/p>\n<p><strong>=RIGHT(A2,LEN(A2)-FIND(&#8221; &#8220;,<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.59.14-AM.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone size-full wp-image-28517\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.59.14-AM.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"994\" height=\"328\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.59.14-AM.png 994w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.59.14-AM-300x99.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Screen-Shot-2023-04-05-at-1.59.14-AM-768x253.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/a><\/p>\n<p><strong>STEP 7:<\/strong> Enter the second argument of the FIND function &#8211; <em><strong>within_text<\/strong><\/em>. This is the cell containing the source text.<\/p>\n<p><strong>=RIGHT(A2,LEN(A2)-FIND(&#8221; &#8220;,A2))<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-10.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" class=\"alignnone wp-image-28475 size-full\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-10.png\" alt=\"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis\" width=\"936\" height=\"276\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-10.png 936w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-10-300x88.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2023\/04\/Substring-10-768x226.png 768w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Substring means extracting a particular string from a combination of strings. For example, extracting the word \u201cMy\u201d from the sentence \u201cMy Excel Online\u201d. Substring is an integrated function in Excel which means we cannot outright extract strings. But we can use different functions or a combination of functions to extract any particular string. A few [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":29213,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"Unlock the Power of Excel: 8 Substring Functions for Easy Data Analysis","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[3,927,14],"tags":[1150,1153,1152],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/28462"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=28462"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/28462\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/29213"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=28462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=28462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=28462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}