<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5530900737630275399</id><updated>2025-11-13T01:03:09.735-08:00</updated><category term="Investitii"/><category term="Analiza"/><category term="Economie generala"/><category term="Excel"/><category term="Banci"/><category term="Contabilitate"/><category term="Fiscalitate"/><category term="Monografii contabile"/><title type='text'>Un mod diferit de a privi Economia</title><subtitle type='html'>Dezvoltare personală economică</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://andreilungu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default?max-results=3'/><link rel='alternate' type='text/html' href='http://andreilungu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default?start-index=4&amp;max-results=3'/><author><name>Andrei</name><uri>http://www.blogger.com/profile/08090591037924444593</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>3</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5530900737630275399.post-6977312683564886584</id><published>2015-09-01T10:56:00.000-07:00</published><updated>2015-09-01T10:56:08.641-07:00</updated><title type='text'>Noul blog andreilungu.com</title><content type='html'>Așa cum am anunțat în &lt;a href=&quot;http://www.andreilungu.blogspot.ro/2015/07/excel-vba-trick-split-rows-and.html&quot; target=&quot;_blank&quot;&gt;acest post&lt;/a&gt;&amp;nbsp;blogul s-a mutat pe o nouă platformă. Adresă este: &lt;b&gt;andreilungu.com&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
În cazul în care doriți să primiți &amp;nbsp;în continuare email atunci când scriu un articol nou, vă rog să vă abonați pe noul site. Nu voi mai posta articole pe acest blog.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreilungu.blogspot.com/feeds/6977312683564886584/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://andreilungu.blogspot.com/2015/09/noul-blog-andreilungucom.html#comment-form' title='2 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default/6977312683564886584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default/6977312683564886584'/><link rel='alternate' type='text/html' href='http://andreilungu.blogspot.com/2015/09/noul-blog-andreilungucom.html' title='Noul blog andreilungu.com'/><author><name>Andrei</name><uri>http://www.blogger.com/profile/08090591037924444593</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5530900737630275399.post-2020301644745896222</id><published>2015-07-16T13:45:00.001-07:00</published><updated>2015-07-16T13:49:12.437-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Investitii"/><title type='text'>Confirmare așteptări acțiune BVB</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Salutare ! Scriam în &lt;b&gt;&lt;a href=&quot;http://www.andreilungu.blogspot.ro/2015/04/ce-reduceri-mai-sunt-pe-bursa.html&quot; target=&quot;_blank&quot;&gt;acest articol&lt;/a&gt; &lt;/b&gt;despre acțiunea ROCE, iar &lt;a href=&quot;http://www.andreilungu.blogspot.ro/2015/04/aplicatie-import-si-analiza-date-de-pe_30.html&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;în acesta&lt;/b&gt;&lt;/a&gt; am selectat-o cu ajutorul aplicației Excel drept prima recomandare pentru cumpărare.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Rezultatele au început deja să apară, creşterea pe această acţiune fiind una considerabilă în doar câteva luni de când am început să acumulez (12.5% profit în aproximativ 2-3 luni):&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjoiyiX-NLZ2kHtP_JPZmHgqd64OkGVCJ1P7k2AF-Cv9Xv_LTnCAF0VHyA94EXYooxE9b4tPpjX0hb_e-srVEv7xN2HB5MPPBrZkOai5bXRvBi8huXT7ird-s3WvDbOCpb6ajdGuxxZ3s/s1600/Crestere+ROCE.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;52&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjoiyiX-NLZ2kHtP_JPZmHgqd64OkGVCJ1P7k2AF-Cv9Xv_LTnCAF0VHyA94EXYooxE9b4tPpjX0hb_e-srVEv7xN2HB5MPPBrZkOai5bXRvBi8huXT7ird-s3WvDbOCpb6ajdGuxxZ3s/s640/Crestere+ROCE.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Nu doresc să mă laud, ci să promovez investițiile pe bursa românească și educația financiară a românilor, mai ales că în prezent volumul tracțiilor de pe bvb este unul extrem de mic comparativ cu ceea ce se întâmplă pe alte burse mai mature.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
De asemenea, am observat în ultimul timp inițiative și din partea Bursei de Valori București, cum ar fi spre exemplu, programul &lt;b&gt;&lt;a href=&quot;http://fluentinfinance.bvb.ro/&quot; target=&quot;_blank&quot;&gt;&quot;Fluent în Finance&quot;&lt;/a&gt;&amp;nbsp;&lt;/b&gt;, prin care bursa intenționează&amp;nbsp;să atragă atenția asupra importanței de a gestiona în mod eficient propriile resurse. Pentru cei interesați a fost redactat și un ghid care poate fi descărcat și studiat gratuit &lt;b&gt;&lt;a href=&quot;http://fluentinfinance.bvb.ro/assets/images/fluentinfinance/ghid-ff-ro.pdf&quot; target=&quot;_blank&quot;&gt;aici&lt;/a&gt;&lt;/b&gt;&lt;b&gt;.&lt;/b&gt;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://feedburner.google.com/fb/a/mailverify?uri=blogspot/akyFs&amp;amp;loc=en_US&quot;&gt;Subscribe to Un mod diferit de a privi Economia by Email&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreilungu.blogspot.com/feeds/2020301644745896222/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://andreilungu.blogspot.com/2015/07/confirmare-asteptari-actiune-bvb.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default/2020301644745896222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default/2020301644745896222'/><link rel='alternate' type='text/html' href='http://andreilungu.blogspot.com/2015/07/confirmare-asteptari-actiune-bvb.html' title='Confirmare așteptări acțiune BVB'/><author><name>Andrei</name><uri>http://www.blogger.com/profile/08090591037924444593</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjoiyiX-NLZ2kHtP_JPZmHgqd64OkGVCJ1P7k2AF-Cv9Xv_LTnCAF0VHyA94EXYooxE9b4tPpjX0hb_e-srVEv7xN2HB5MPPBrZkOai5bXRvBi8huXT7ird-s3WvDbOCpb6ajdGuxxZ3s/s72-c/Crestere+ROCE.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5530900737630275399.post-2734050025794384587</id><published>2015-07-03T13:03:00.000-07:00</published><updated>2015-07-04T03:54:16.836-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><title type='text'>Excel VBA Split Rows Trick and Announcement</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Today i have to make an announcement: in the near future I intend to migrate the blog to a new one with a new design and completely in english because I want to develop a better project and reach readers from Romania, but also from other countries. The content will remain the same: finance and accounting, Excel automations and apps, SQL, Access etc.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now, let&#39;s talk about an Excel problem which i&amp;nbsp;recently had to solve. In reality i had a worksheet with thousands of rows (&lt;i&gt;so the manual work which could take days wasn&#39;t a solution&lt;/i&gt;), but for illustrating purposes i created a file with few rows and no confidential data :)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;! Challenge:&lt;/i&gt;&lt;/b&gt; You have the data from Range(&quot;A2:E4&quot;). Split the rows by company codes: for Each Company code separated by a character (; or , or / or -) automatically create a new row. The rest of the data from other columns remains the same for the new rows. Every Company Code string can have different lenght and betwen codes and separators can be spaces.&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Initial:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1M9N2QnqWXprj86Bt9fSRX2FiFKWpQO5LbrD0mUu9IcrCYoMkFGSqNAPibRzBSKPcBiUs8nRVNj6ECZiIamyQwN5k_NgbL3nFX50815QKlNL1CTBNvV1H1tcmkcFmF-Qp88VNuNgmHNg/s1600/Split+rows+problem+1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;102&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1M9N2QnqWXprj86Bt9fSRX2FiFKWpQO5LbrD0mUu9IcrCYoMkFGSqNAPibRzBSKPcBiUs8nRVNj6ECZiIamyQwN5k_NgbL3nFX50815QKlNL1CTBNvV1H1tcmkcFmF-Qp88VNuNgmHNg/s640/Split+rows+problem+1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Result:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6pvgpOXY4c3jzxs5NxCFSi5S3HSj4h_CzmbfmcRfIG-LTdCNMKCr7-faHiVHfPKelhh7nGDk3Bh7xPIgPE8azdx23QpQjY-YuEgTrMRxdIZjQC0UYUhovlyTGRty33xIDrGyi7BPXvu0/s1600/split+rows+2-+result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6pvgpOXY4c3jzxs5NxCFSi5S3HSj4h_CzmbfmcRfIG-LTdCNMKCr7-faHiVHfPKelhh7nGDk3Bh7xPIgPE8azdx23QpQjY-YuEgTrMRxdIZjQC0UYUhovlyTGRty33xIDrGyi7BPXvu0/s640/split+rows+2-+result.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;My code for solving this is the following:&lt;/b&gt;&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Sub&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;split_rows&lt;/span&gt;()

&lt;span style=&quot;color: #888888;&quot;&gt;&#39;original code by Andrei Lungu&lt;/span&gt;

lr &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ActiveSheet.Cells(ActiveSheet.Rows.Count, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;A&quot;&lt;/span&gt;).End(xlUp).Row

counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
ismore &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;

col_comp_code &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;C&quot;&lt;/span&gt;

Application.ScreenUpdating &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;For&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; lr &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;To&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Step&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;

    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Set&lt;/span&gt; check_cell0 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; ActiveSheet.Range(col_comp_code &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i)
    
    check_cell &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Replace(check_cell0, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot; &quot;&lt;/span&gt;, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&quot;&lt;/span&gt;)
    
    counter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;For&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;To&lt;/span&gt; Len(check_cell)
        
            counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
            activechar &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Mid(check_cell, j, &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
            
            &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt; activechar &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;,&quot;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Or&lt;/span&gt; activechar &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;;&quot;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Or&lt;/span&gt; activechar &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Or&lt;/span&gt; activechar &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;-&quot;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Then&lt;/span&gt;
            ismore &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt;
                Separator &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; activechar
                
                counter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; counter &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
                ActiveSheet.Rows(i).Offset(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;).EntireRow.Insert
                where_starts &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; (counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
                company_code &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Mid(check_cell, where_starts, counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
                
    
                ActiveSheet.Range(col_comp_code &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i) &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; company_code
                
            counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
            &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt;
        
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Next&lt;/span&gt; j
                
    &lt;span style=&quot;color: #888888;&quot;&gt;&#39;last comp code&lt;/span&gt;
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt; ismore &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;True&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Then&lt;/span&gt;
    
    &lt;span style=&quot;color: #888888;&quot;&gt;&#39;find out the position of the last separator&lt;/span&gt;
                    last_sep &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; counter
                    char_no &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
                    counter2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
                    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;For&lt;/span&gt; k &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;To&lt;/span&gt; Len(check_cell)
                    
                        activechar2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Mid(check_cell, k, &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
                        char_no &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; char_no &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
                        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt; activechar2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;,&quot;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Or&lt;/span&gt; activechar2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;;&quot;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Or&lt;/span&gt; activechar2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Or&lt;/span&gt; activechar2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;-&quot;&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Then&lt;/span&gt;
                        counter2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; counter2 &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
                        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt; counter2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; last_sep &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Then&lt;/span&gt;
                            last_sep_char_no &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; char_no
                            &lt;span style=&quot;color: #888888;&quot;&gt;&#39;MsgBox last_sep_char_no&lt;/span&gt;
                        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt;
                        
                        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt;
                    
                    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Next&lt;/span&gt; k
            
    &lt;span style=&quot;color: #888888;&quot;&gt;&#39;copy last company code&lt;/span&gt;
        last_company_code &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Right(check_cell, Len(check_cell) &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; last_sep_char_no &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
        ActiveSheet.Range(col_comp_code &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i).Offset(counter) &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; last_company_code
        
    &lt;span style=&quot;color: #888888;&quot;&gt;&#39;copy rest of data&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Do&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;While&lt;/span&gt; counter &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
        
        ActiveSheet.Range(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;A&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;:B&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i).Offset(counter).Copy ActiveSheet.Range(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;A&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;:B&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i).Offset(counter &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
        ActiveSheet.Range(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;D&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;:E&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i).Offset(counter).Copy ActiveSheet.Range(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;D&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;:E&quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt; i).Offset(counter &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
        counter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; counter &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Loop&lt;/span&gt;
    
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;If&lt;/span&gt;
    
    ismore &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;
    
        counter_ch &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;
        counter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Next&lt;/span&gt; i

Application.ScreenUpdating &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;False&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;Sub&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;If you have other ideas please share them in a comment.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;b&gt;The sample file can be downloaded from &lt;a href=&quot;https://sites.google.com/site/fisieredownloadandrei/Split%20rows%20problem.xlsm?attredirects=0&amp;amp;d=1&quot;&gt;this location&lt;/a&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://feedburner.google.com/fb/a/mailverify?uri=blogspot/akyFs&amp;amp;loc=en_US&quot;&gt;Subscribe to Un mod diferit de a privi Economia by Email&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreilungu.blogspot.com/feeds/2734050025794384587/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://andreilungu.blogspot.com/2015/07/excel-vba-trick-split-rows-and.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default/2734050025794384587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5530900737630275399/posts/default/2734050025794384587'/><link rel='alternate' type='text/html' href='http://andreilungu.blogspot.com/2015/07/excel-vba-trick-split-rows-and.html' title='Excel VBA Split Rows Trick and Announcement'/><author><name>Andrei</name><uri>http://www.blogger.com/profile/08090591037924444593</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1M9N2QnqWXprj86Bt9fSRX2FiFKWpQO5LbrD0mUu9IcrCYoMkFGSqNAPibRzBSKPcBiUs8nRVNj6ECZiIamyQwN5k_NgbL3nFX50815QKlNL1CTBNvV1H1tcmkcFmF-Qp88VNuNgmHNg/s72-c/Split+rows+problem+1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>