{"id":4546,"date":"2023-02-21T20:42:44","date_gmt":"2023-02-21T20:42:44","guid":{"rendered":"https:\/\/www.bizinfograph.com\/resource\/?p=4546"},"modified":"2024-03-14T15:16:32","modified_gmt":"2024-03-14T15:16:32","slug":"how-do-you-find-the-last-occurrence-of-character","status":"publish","type":"post","link":"https:\/\/www.bizinfograph.com\/resource\/how-do-you-find-the-last-occurrence-of-character\/","title":{"rendered":"How do You Find the Last Occurrence of Character in a String in Excel?"},"content":{"rendered":"<p>Finding the last occurrence of character in a string in Excel is a nuanced task that can significantly streamline data manipulation and analysis. This capability is crucial when dealing with large datasets where you need to extract specific information from strings, like file paths, URLs, or ID codes. Whether you&#8217;re a data analyst sifting through intricate data sets, a marketer segmenting customer information, or an IT professional managing databases, this guide will meticulously walk you through the process of locating the last occurrence of a character in a string in Excel. By mastering this function, you&#8217;ll unlock new dimensions of data organization and retrieval, enhancing the efficiency and accuracy of your work.<\/p>\n<p><strong>This Content Covers:<\/strong><\/p>\n<ol>\n<li><a href=\"#how-do-you-find-the-last-occurrence-of-a-character-in-a-string-in-excel?\"><strong> How do You Find the Last Occurrence of Character in a String in Excel? <\/strong><\/a>\n<ul>\n<li><strong>Using Excel&#8217;s FIND &amp; SUBSTITUTE Functions<\/strong><\/li>\n<li><strong>Using MATCH &amp; SEQUENCE Functions<\/strong><\/li>\n<li><strong>Using an Excel Array Formula<\/strong><\/li>\n<li><strong>Using VBA<\/strong><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#how-to-find-the-last-character-in-a-string?\"><strong> How to Find the Last Character in a String?<\/strong><\/a>\n<ul>\n<li><strong>Using the RIGHT Function<\/strong><\/li>\n<li><strong>Using Custom VBA<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2><strong id=\"how-do-you-find-the-last-occurrence-of-a-character-in-a-string-in-excel?\">1. How do You Find the Last Occurrence of Character in a String in Excel? <\/strong><\/h2>\n<p>Now we will show you how you can find the last occurrence of a character in a string using the data from column E of the below-given picture.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-4547\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-1.png\" alt=\"Find last occurrence of a character in a string\" width=\"654\" height=\"232\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-1.png 654w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-1-300x106.png 300w\" sizes=\"(max-width: 654px) 100vw, 654px\" \/><\/p>\n<p><strong>1.1 Using Excel&#8217;s FIND &amp; SUBSTITUTE Functions<\/strong><\/p>\n<p>To determine the position of a characters last occurrence in a text string we will use the <strong>FIND <\/strong>and <strong>SUBSTITUTE<\/strong> functions with <strong>CHAR<\/strong> and <strong>LEN <\/strong>function.<\/p>\n<p><strong>Step 1: <\/strong>Select cell F2 and insert the following formula inside this cell. This formula will return the last occurrence position of <strong>(-)<\/strong> inside this text string. Now click and drag the cell downwards to apply the formula to the other cells also.<\/p>\n<p><strong>=FIND(CHAR(134),SUBSTITUTE(E2,&#8221;-&#8220;,CHAR(134),(LEN(E2)-LEN(SUBSTITUTE(E2,&#8221;-&#8220;,&#8221;&#8221;)))\/LEN(&#8220;-&#8220;)))<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-4548\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-2.png\" alt=\"Find last occurrence of a character in a string\" width=\"659\" height=\"236\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-2.png 659w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-2-300x107.png 300w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/p>\n<p><strong>Step 2: <\/strong>All the cells are now showing the last occurance of <strong>(-)<\/strong> in all of these text strings.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-4549\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-3.png\" alt=\"Find last occurrence of a character in a string\" width=\"659\" height=\"223\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-3.png 659w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-3-300x102.png 300w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/p>\n<p><b>1.2 Using MATCH &amp; SEQUENCE Functions to find last occurrence of character<\/b><\/p>\n<p>To determine the position of a character\u2019s last occurrence in a text string we will use the <strong>MATCH<\/strong> and <strong>SEQUENCE<\/strong> function with <strong>MID<\/strong> and <strong>LEN <\/strong>function in <strong>Excel 365<\/strong> or <strong>Excel 2021<\/strong>, as no other versions of Excel have <strong>SEQUENCE<\/strong> function in them.<\/p>\n<p><strong>Step 1: <\/strong>Insert the following formula into cell F2 after choosing this cell. The length of cell E2 is determined by the <strong>LEN<\/strong> function. The <strong>SEQUENCE <\/strong>function returns an array with a list of values in order. The <strong>Match<\/strong> function locates the formula&#8217;s final 1 value and it is located in the 18<sup>th<\/sup> spot as you can see in the picture below.<\/p>\n<p><strong>=MATCH(2,1\/(MID(E2,SEQUENCE(LEN(E2)),1)=&#8221;-&#8220;))<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4550\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-4.png\" alt=\"Find last occurrence of a character in a string\" width=\"656\" height=\"216\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-4.png 656w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-4-300x99.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p><strong>Step 2: <\/strong>To apply the formula to the other cells as well, click and drag the cell downwards. Now we\u2019ve got the position of the last occurrence of this (-) character in all of our strings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4551\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-5.png\" alt=\"Find last occurrence of a character in a string\" width=\"656\" height=\"214\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-5.png 656w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-5-300x98.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p><strong>1.3 Using an Excel Array Formula<\/strong><\/p>\n<p>To identify the location of a character&#8217;s last occurrence in a string, we&#8217;ll build an array formula using the <strong>MATCH<\/strong>, the <strong>MID<\/strong>, the <strong>ROW<\/strong>, the<strong> INDEX, <\/strong>and the <strong>LEN<\/strong> function.<\/p>\n<p><strong>Step 1: <\/strong>Insert the below-given formula in cell F2 and click <strong>ENTER<\/strong> key if you are using <strong>Excel 365.<\/strong> But if you are using any other version you have to press the <strong>CTRL+SHIFT+ENTER<\/strong> keys for this formula to work, as in an <strong>Array Formula.<\/strong><\/p>\n<p><strong>=MATCH(2,1\/(MID(E2,ROW($E$1:INDEX(E:E,LEN(E2))),1)=&#8221;-&#8220;))<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4552\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-6.png\" alt=\"Find last occurrence of a character in a string\" width=\"656\" height=\"224\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-6.png 656w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-6-300x102.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Now use the <strong>Fill Handle<\/strong> to auto-fill the formula in all the other cells of this coumn.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4553\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-7.png\" alt=\"Find last occurrence of a character in a string\" width=\"656\" height=\"214\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-7.png 656w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-7-300x98.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p><strong>1.4 Using VBA<\/strong><\/p>\n<p><strong>Step 1: <\/strong>Right click on the worksheet and select <strong>View Code.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4554\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-8.png\" alt=\"Find last occurrence of a character in a string\" width=\"411\" height=\"338\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-8.png 411w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-8-300x247.png 300w\" sizes=\"(max-width: 411px) 100vw, 411px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Click on the <strong>Insert<\/strong> option and select <strong>Module.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4555\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-9.png\" alt=\"Find last occurrence of a character in a string\" width=\"642\" height=\"248\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-9.png 642w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-9-300x116.png 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/p>\n<p><strong>Step 3: <\/strong>Insert the following code inside <strong>VBA Module<\/strong> and then close the <strong>Module.<\/strong><\/p>\n<p><span style=\"color: #000080;\"><strong>Function CharLastPosition(strVal As String, strChar As String) As Long<\/strong><\/span><\/p>\n<p><span style=\"color: #000080;\"><strong>CharLastPosition = InStrRev(strVal, strChar)<\/strong><\/span><\/p>\n<p><span style=\"color: #000080;\"><strong>End Function<\/strong><\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4556\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-10.png\" alt=\"Find last occurrence of a character in a string\" width=\"652\" height=\"236\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-10.png 652w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-10-300x109.png 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/p>\n<p><strong>Step 4: <\/strong>Select cell F2 and insert the formula given below. Click <strong>Enter<\/strong> key.<\/p>\n<p><strong>=CharLastPosition(E2,&#8221;-&#8220;)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4557\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-11.png\" alt=\"Find last occurrence of a character in a string\" width=\"653\" height=\"219\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-11.png 653w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-11-300x101.png 300w\" sizes=\"(max-width: 653px) 100vw, 653px\" \/><\/p>\n<p><strong>Step 5: <\/strong>Use the <strong>Fill-Handle<\/strong> to autofill the formula in the other cells of this column to get the last occurance of <strong>(-)<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4558\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-12.png\" alt=\"Find last occurrence of a character in a string\" width=\"661\" height=\"223\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-12.png 661w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-12-300x101.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/p>\n<h2><strong id=\"how-to-find-the-last-character-in-a-string?\">2. How to Find Last Character in String?<\/strong><\/h2>\n<p>Using the <strong>RIGHT<\/strong> function and a <strong>VBA Code<\/strong>, you can easily extract everything to the right of the last occurrence of a text in a string.<\/p>\n<p><strong>2.1 Using RIGHT Function<\/strong><\/p>\n<p><strong>Step 1: <\/strong>Insert the formula given below in F2 and click <strong>Enter <\/strong>key.<\/p>\n<p><strong>=RIGHT(E2,LEN(E2)-FIND(&#8220;@&#8221;,SUBSTITUTE(E2,&#8221;-&#8220;,&#8221;@&#8221;,LEN(E2)-LEN(SUBSTITUTE(E2,&#8221;-&#8220;,&#8221;&#8221;))),1))<\/strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4559\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-13.png\" alt=\"Find last occurrence of a character in a string\" width=\"656\" height=\"216\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-13.png 656w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-13-300x99.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p><strong>Step 2: <\/strong>To apply the formula to the other cells as well, click and drag the cell downwards. This will give you the last position of <strong>(-) <\/strong>and extract all the text to the right of it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4560\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-14.png\" alt=\"Find last occurrence of a character in a string\" width=\"663\" height=\"223\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-14.png 663w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-14-300x101.png 300w\" sizes=\"(max-width: 663px) 100vw, 663px\" \/><\/p>\n<p><strong>2.2 Using Custom VBA<\/strong><\/p>\n<p><strong>Step 1: <\/strong>Go to <strong>Developer<\/strong> tab and click on <strong>Visual<\/strong> <strong>Basic <\/strong>or Hold down the<strong>\u00a0ALT + F11<\/strong>\u00a0keys to open the\u00a0<strong>Microsoft Visual Basic for Applications <\/strong>window.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4561\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-15.png\" alt=\"Find last occurrence of a character in a string\" width=\"653\" height=\"211\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-15.png 653w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-15-300x97.png 300w\" sizes=\"(max-width: 653px) 100vw, 653px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Select <strong>Insert&gt;&gt;Module.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4562\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-16.png\" alt=\"Find last occurrence of a character in a string\" width=\"619\" height=\"236\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-16.png 619w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-16-300x114.png 300w\" sizes=\"(max-width: 619px) 100vw, 619px\" \/><\/p>\n<p><strong>Step 3: <\/strong>Paste the code given below inside <strong>VBA Module<\/strong> and close it.<\/p>\n<p><strong>Function LastPosition(rCell As Range, rChar As String)<\/strong><\/p>\n<p><strong>&#8216;This function gives the last position of the specified character<\/strong><\/p>\n<p><strong>&#8216;This code has been developed by Sumit Bansal (https:\/\/trumpexcel.com)<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>Dim rLen As Integer<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>rLen = Len(rCell)<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>For i = rLen To 1 Step -1<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>If Mid(rCell, i &#8211; 1, 1) = rChar Then<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>\u00a0LastPosition = i<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>\u00a0Exit Function<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>End If<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>Next i<\/strong><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #3366ff;\"><strong>End Function<\/strong><\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4563\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-17.png\" alt=\"Find last occurrence of a character in a string\" width=\"659\" height=\"361\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-17.png 659w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-17-300x164.png 300w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/p>\n<p><strong>Step 4: <\/strong>Now insert this below given formula in F2 and click <strong>Enter<\/strong> key.<\/p>\n<p><strong>=RIGHT(E2,LEN(E2)-LastPosition(E2,&#8221;-&#8220;)+1)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4564\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-18.png\" alt=\"Find last occurrence of a character in a string\" width=\"661\" height=\"222\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-18.png 661w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-18-300x101.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/p>\n<p><strong>Step 5: <\/strong>To automatically fill the formula in the other cells in this column, use the <strong>Fill-Handle<\/strong>. This will extract all the text to the right of it <strong>(-).<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4565\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-19.png\" alt=\"Find last occurrence of a character in a string\" width=\"652\" height=\"216\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-19.png 652w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Find-last-occurrence-of-a-character-in-a-string-19-300x99.png 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/p>\n<h2><strong>Application of Find the Last Occurrence of Character in a String in Excel<\/strong><\/h2>\n<ul>\n<li><strong>File Extension Extraction<\/strong>: Identify and extract the file extension from filenames by finding the position of the last period (.) character in each filename.<\/li>\n<li><strong>Domain Name Retrieval<\/strong>: Retrieve the top-level domain (TLD) from email addresses or website URLs by locating the last occurrence of the dot (.) character.<\/li>\n<li><strong>Data Tagging and Categorization<\/strong>: Extract tags or categories from strings where data is separated by a specific delimiter, such as the last underscore (_) or dash (-).<\/li>\n<li><strong>Path Extraction in File Locations<\/strong>: Find the last occurrence of a backslash () to extract the file name from a full file path, separating file names from directories.<\/li>\n<li><strong>Unit of Measurement Identification<\/strong>: Identify and extract units of measurement from product names or descriptions by finding the last space or specific character preceding the unit (e.g., &#8220;kg,&#8221; &#8220;cm&#8221;).<\/li>\n<li><strong>Name Suffix Extraction<\/strong>: Extract suffixes from names (e.g., Jr., Sr., III) by finding the last occurrence of a space or comma, helping in data cleaning and organization.<\/li>\n<\/ul>\n<p>For ready-to-use Dashboard Templates:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Finance\" target=\"_blank\" rel=\"noopener\">Financial Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Sales\" target=\"_blank\" rel=\"noopener\">Sales Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Human-Resource\" target=\"_blank\" rel=\"noopener\">HR Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.executiveknowledge.org\/dashboard-templates\/35\" target=\"_blank\" rel=\"noopener\">Data Visualization Charts<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Finding the last occurrence of character in a string in Excel is a nuanced task that can significantly streamline data manipulation and analysis. This capability is crucial when dealing with large datasets where you need to extract specific information from strings, like file paths, URLs, or ID codes. Whether you&#8217;re a data analyst sifting through &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.bizinfograph.com\/resource\/how-do-you-find-the-last-occurrence-of-character\/\"> <span class=\"screen-reader-text\">How do You Find the Last Occurrence of Character in a String in Excel?<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[1],"tags":[551,550],"class_list":["post-4546","post","type-post","status-publish","format-standard","hentry","category-general","tag-last-occurrence-of-character","tag-last-occurrence-of-character-in-excel"],"_links":{"self":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/4546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/comments?post=4546"}],"version-history":[{"count":8,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/4546\/revisions"}],"predecessor-version":[{"id":8848,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/4546\/revisions\/8848"}],"wp:attachment":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/media?parent=4546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/categories?post=4546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/tags?post=4546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}