{"id":56,"date":"2020-01-28T12:26:07","date_gmt":"2020-01-28T11:26:07","guid":{"rendered":"https:\/\/codedoneright.eu\/?page_id=56"},"modified":"2020-03-07T20:26:02","modified_gmt":"2020-03-07T19:26:02","slug":"remove-duplicated-text","status":"publish","type":"page","link":"https:\/\/codedoneright.eu\/?page_id=56","title":{"rendered":"Remove duplicated text"},"content":{"rendered":"\n<p>This procedure aims to remove multiple instances of text put in single cell. Sometimes if you copy from a pdf file that has not been properly prepared it happens that when you paste, it pastes multiple times the same content. Check how many times it is duplicated and then run the below procedure. It will ask you how many times text has been duplicated.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Sub DupeTextRm()\n    Dim CellValue As String\n    Dim CellLen As Integer\n    Dim CellOutput As String\n    Dim TextDupeVar As Integer\n    \n    Selection.NumberFormat = \"@\"            'Changes the cell type to text\n    TextDupeVar = InputBox(\"How many times is the text duplicated?\", \"DupeTextRm\") 'Asks how many times text is duplicated\n    CellValue = ActiveCell.Value            'Loads active cell's contents to CellValue\n    CellLen = Len(CellValue)                'Counts number of characters in the active cell\n    CellLen = CellLen \/ TextDupeVar         'Divides number of characters in the active cell by repetition time\n    CellOutput = Mid(CellValue, 1, CellLen)   'Loads 1\/CellLen of active cell's contents to CellOutput\n    \n    ActiveCell.Value = CellOutput   'Spews out the result\nEnd Sub<\/code><\/pre>\n\n\n<div id=\"wpfp_7cecb746a0954e19a5e9d26aaa64e1ff\" data-item=\"{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\\\/\\\/codedoneright.eu:443\\\/video\\\/DTRM.mp4&quot;,&quot;type&quot;:&quot;video\\\/mp4&quot;}]}\" class=\"flowplayer no-brand is-splash is-paused skin-slim no-svg fp-slim fp-edgy\" style=\"position:relative; max-width: 640px; max-height: 360px; \" data-ratio=\"0.5625\" data-advance=\"false\">\n\t<div class=\"fp-ratio\" style=\"padding-top: 56.25%\"><\/div>\n\t<div class=\"fp-ui\"><noscript>Please enable JavaScript<\/noscript><div class=\"fp-play fp-visible\"><svg class=\"fp-play-sharp-fill\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 100 100\"><defs><style>.fp-color-play{opacity:0.65;}.controlbutton{fill:#fff;}<\/style><\/defs><title>play-sharp-fill<\/title><path class=\"fp-color-play\" d=\"M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z\"\/><polygon class=\"controlbutton\" points=\"73.601 50 37.968 70.573 37.968 29.427 73.601 50\" filter=\"url(#f1)\"\/><\/svg><\/div><div class=\"fp-preload\"><b><\/b><b><\/b><b><\/b><b><\/b><\/div><\/div>\n\n<\/div>\n\n\n\n\n<p>Above video depicts the use of the procedure, when video looks frozes it actually displays an input box waiting for user input. Put the number of times the text is duplicated. Windows xbox screengrab only takes the active window, sorry, for now I don&#8217;t have anything better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This procedure aims to remove multiple instances of text put in single cell. Sometimes if you copy from a pdf file that has not been properly prepared it happens that when you paste, it pastes multiple times the same content.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":34,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Remove duplicated text &#8212; Code Done Right!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codedoneright.eu\/?page_id=56\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Remove duplicated text &#8212; Code Done Right!\" \/>\n<meta name=\"twitter:description\" content=\"This procedure aims to remove multiple instances of text put in single cell. Sometimes if you copy from a pdf file that has not been properly prepared it happens that when you paste, it pastes multiple times the same content.&hellip;\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=56\",\"url\":\"https:\/\/codedoneright.eu\/?page_id=56\",\"name\":\"Remove duplicated text &#8212; Code Done Right!\",\"isPartOf\":{\"@id\":\"https:\/\/codedoneright.eu\/#website\"},\"datePublished\":\"2020-01-28T11:26:07+00:00\",\"dateModified\":\"2020-03-07T19:26:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/codedoneright.eu\/?page_id=56#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codedoneright.eu\/?page_id=56\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codedoneright.eu\/?page_id=56#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codedoneright.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VBA\",\"item\":\"https:\/\/codedoneright.eu\/?page_id=34\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Remove duplicated text\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codedoneright.eu\/#website\",\"url\":\"https:\/\/codedoneright.eu\/\",\"name\":\"Code Done Right!\",\"description\":\"Raspberry Pi server guides\",\"publisher\":{\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codedoneright.eu\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568\",\"name\":\"CodeDoneRight\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png\",\"contentUrl\":\"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png\",\"width\":120,\"height\":120,\"caption\":\"CodeDoneRight\"},\"logo\":{\"@id\":\"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/codedoneright.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Remove duplicated text &#8212; Code Done Right!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codedoneright.eu\/?page_id=56","twitter_card":"summary_large_image","twitter_title":"Remove duplicated text &#8212; Code Done Right!","twitter_description":"This procedure aims to remove multiple instances of text put in single cell. Sometimes if you copy from a pdf file that has not been properly prepared it happens that when you paste, it pastes multiple times the same content.&hellip;","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/codedoneright.eu\/?page_id=56","url":"https:\/\/codedoneright.eu\/?page_id=56","name":"Remove duplicated text &#8212; Code Done Right!","isPartOf":{"@id":"https:\/\/codedoneright.eu\/#website"},"datePublished":"2020-01-28T11:26:07+00:00","dateModified":"2020-03-07T19:26:02+00:00","breadcrumb":{"@id":"https:\/\/codedoneright.eu\/?page_id=56#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codedoneright.eu\/?page_id=56"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/codedoneright.eu\/?page_id=56#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codedoneright.eu\/"},{"@type":"ListItem","position":2,"name":"VBA","item":"https:\/\/codedoneright.eu\/?page_id=34"},{"@type":"ListItem","position":3,"name":"Remove duplicated text"}]},{"@type":"WebSite","@id":"https:\/\/codedoneright.eu\/#website","url":"https:\/\/codedoneright.eu\/","name":"Code Done Right!","description":"Raspberry Pi server guides","publisher":{"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codedoneright.eu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/50378701e349dbd5d40888bc5b532568","name":"CodeDoneRight","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/","url":"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png","contentUrl":"https:\/\/codedoneright.eu\/wp-content\/uploads\/www_icon.png","width":120,"height":120,"caption":"CodeDoneRight"},"logo":{"@id":"https:\/\/codedoneright.eu\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/codedoneright.eu"]}]}},"_links":{"self":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/56"}],"collection":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":3,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/56\/revisions"}],"predecessor-version":[{"id":62,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/56\/revisions\/62"}],"up":[{"embeddable":true,"href":"https:\/\/codedoneright.eu\/index.php?rest_route=\/wp\/v2\/pages\/34"}],"wp:attachment":[{"href":"https:\/\/codedoneright.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}