<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Dansk Regneark Forum : Hjælp til CSV data</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : Hjælp til CSV data]]></description>
  <pubDate>Sat, 05 Dec 2026 06:16:13 +0000</pubDate>
  <lastBuildDate>Thu, 18 Feb 2016 21:02:43 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.excel-regneark.dk/RSS_post_feed.asp?TID=2436</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Dansk Regneark Forum]]></title>
   <url>https://forum.excel-regneark.dk/css_styles/Excel-regneark.dk/logo.png</url>
   <link>https://forum.excel-regneark.dk/</link>
  </image>
  <item>
   <title><![CDATA[Hjælp til CSV data :  HejFandt selv en l&#248;sning p&#229;...]]></title>
   <link>https://forum.excel-regneark.dk/hjlp-til-csv-data_topic2436_post11445.html#11445</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=856">zpjj</a><br /><strong>Emne:</strong> 2436<br /><strong>Sendt:</strong> 18.Feb.2016 kl. 21:02<br /><br />Hej<div>&nbsp;</div><div>Fandt selv en løsning på det + gennemløb af alle Rows.</div><div>&nbsp;</div><div>Sub separatecsvdata()<br>&nbsp;Dim k As Long<br>&nbsp;Dim l As Long<br>&nbsp;Dim mydata As String<br>&nbsp;Dim mydata1 As String<br>&nbsp;<br>'count number of rows<br>&nbsp;k = Cells(Rows.Count, "A").End(xlUp).Row<br>&nbsp;Application.ScreenUpdating = False<br>'run through every row with data<br>&nbsp;For i = 1 To k<br>'define a variable that will hold the row-index or column-index values<br>&nbsp;y = 2<br>'count number of characters in actual data set<br>&nbsp;l = Len(Cells(i, 1))<br>'read data set in row<br>&nbsp;mydata1 = Cells(i, 1)<br>'ad comma in the end of data set<br>&nbsp;Cells(i, 1) = Left(mydata1, (l + 1)) &amp; ","<br>'start a loop and let it run as long as there is data in the cell actual row<br>&nbsp;Do While Cells(i, 1) &lt;&gt; ""<br>'assign the data in cell a1 to the variable my data<br>&nbsp;mydata = Cells(i, 1)<br>'find out the position of the comma<br>&nbsp;mycomma = InStr(mydata, ",")<br>'to ensure that the data that is left-over does not have a comma is also worked upon by the program and shifted appropriately<br>&nbsp;If mycomma = 0 Then<br>' the end data, goes to the next empty column<br>&nbsp;Cells(i, y) = Cells(i, 1)<br>'finally empty the column, so that you now know that all the comma separated data has been properly transferred to different cells<br>&nbsp;Cells(i, 1) = ""<br>&nbsp;'now goto 10<br>&nbsp;GoTo 10<br>&nbsp;End If<br>'the left function extracts the number of characters from the left upto the comma and then removes the comma<br>&nbsp;Cells(i, y) = Left(mydata, (mycomma - 1))<br>'the mid function extracts the characters after the comma in our case<br>&nbsp;Cells(i, 1) = Mid(mydata, (mycomma + 1))<br>'go to the next column<br>&nbsp;y = y + 1<br>&nbsp;Loop<br>10<br>'go to the next row<br>&nbsp;Next<br>&nbsp;Application.ScreenUpdating = True<br>&nbsp;End Sub</div>]]>
   </description>
   <pubDate>Thu, 18 Feb 2016 21:02:43 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/hjlp-til-csv-data_topic2436_post11445.html#11445</guid>
  </item> 
  <item>
   <title><![CDATA[Hjælp til CSV data :  HejN&#229;r jeg separerer mine data,...]]></title>
   <link>https://forum.excel-regneark.dk/hjlp-til-csv-data_topic2436_post11426.html#11426</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=856">zpjj</a><br /><strong>Emne:</strong> 2436<br /><strong>Sendt:</strong> 17.Feb.2016 kl. 11:20<br /><br />Hej<div></div><div>Når jeg separerer mine data, med min macro, går det galt med det sidste koma tal.</div><div>&nbsp;</div><div>Resultat af kørsel:</div><div><img src="uploads/856/Test_Not_OK.JPG" height="53" width="500" border="0" /></div><div>&nbsp;</div><div>Ønsket resultat:</div><div><img src="uploads/856/Test_OK.JPG" height="46" width="500" border="0" /></div><div>&nbsp;</div><div>Hvad går der galt ????</div><div>&nbsp;</div><div>Data i Col 1:</div><div><table width="64" style="width: 48pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"><font face="Times New Roman"> </font><colgroup><col width="64" style="width: 48pt;"><font face="Times New Roman"> </font><t><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td width="64" height="20" style="border: 0px black; width: 48pt; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:33:21,48.501,25.786,2776,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:33:44,48.501,25.786,2907,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:34:07,48.501,25.786,2859,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:34:30,48.501,25.786,2891,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:34:53,48.501,25.786,2946,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:35:16,48.501,25.786,2920,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:35:39,48.501,25.786,2907,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:36:02,48.501,25.786,2907,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:36:24,48.501,25.786,2965,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:36:47,48.501,25.786,2865,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:37:10,48.501,25.786,2952,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:37:33,48.501,25.786,2891,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:37:56,48.501,25.786,2926,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:38:19,48.501,25.786,2862,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:38:42,48.501,25.786,2843,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:39:05,48.501,25.786,2910,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:39:28,48.501,25.786,2817,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:39:50,48.501,25.786,2936,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:40:13,48.501,25.786,2849,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:40:36,48.501,25.786,2920,29.421</font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"> </font><tr height="20" style="height: 15pt;"><font face="Times New Roman">  </font><td height="20" style="border: 0px black; height: 15pt; : transparent;"><font face="Calibri">06/17/13,09:40:59,48.501,25.786,2888,29.421<div></div>Macro:<div></div></font></td><font face="Times New Roman"> </font></tr><font face="Times New Roman"></font></t></table></div><div>Sub separatecsvdata()</div><div>&nbsp;Dim mydata As String<br>'define a variable that will hold the row-index or column-index values<br>&nbsp;y = 2<br>'start a loop and let it run as long as there is data in the cell A1<br>&nbsp;Do While Cells(1, 1) &lt;&gt; ""<br>&nbsp;'assign the data in cell a1 to the variable my data<br>&nbsp;mydata = &#091;a1&#093;<br>'find out the position of the comma<br>&nbsp;mycomma = InStr(mydata, ",")<br>'to ensure that the data that is left-over does not have a comma is also worked upon by the program and shifted appropriately<br>&nbsp;If mycomma = 0 Then<br>' the end data, for example, 25 goes to the next empty row or column<br>&nbsp;Cells(1, y) = &#091;a1&#093;<br>'finally empty the cell a1 so that you now know that all the comma separated data has been properly transferred to different cells<br>&nbsp;&#091;a1&#093; = ""<br>&nbsp;'now end the program<br>&nbsp;End<br>&nbsp;End If<br>'the left function extracts the number of characters from the left upto the comma and then removes the comma<br>&nbsp;Cells(1, y) = Left(mydata, (mycomma - 1))<br>'the mid function extracts the characters after the comma in our case<br>&nbsp;Cells(1, 1) = Mid(mydata, (mycomma + 1))<br>' go to the next row or column<br>&nbsp;y = y + 1<br>&nbsp;Loop<br>&nbsp;End Sub</div><div>&nbsp;</div><div>Kunne desværre ikke Uploade fil pga. sikkerhedspolitiken i firmaet :-(</div><div>&nbsp;</div><div>Mvh.</div><div>Peter</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Wed, 17 Feb 2016 11:20:47 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/hjlp-til-csv-data_topic2436_post11426.html#11426</guid>
  </item> 
 </channel>
</rss>