<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[MaruMagi部落格之拷貝經驗]]></title> 
<link>http://maru.gates.tw/index.php</link> 
<description><![CDATA[別人耶經驗,著是我耶成功啦!!]]></description> 
<language>zh-tw</language> 
<copyright><![CDATA[MaruMagi部落格之拷貝經驗]]></copyright>
<item>
<link>http://maru.gates.tw/read.php/.htm</link>
<title><![CDATA[中華郵政公司的3+2轉碼程式夠難用..還是自己寫程式比較快]]></title> 
<author>zuyan &lt;zuyan_chang@yahoo.com.tw&gt;</author>
<category><![CDATA[資訊雜語]]></category>
<pubDate>Wed, 20 May 2009 04:27:02 +0000</pubDate> 
<guid>http://maru.gates.tw/read.php/.htm</guid> 
<description>
<![CDATA[ 
	由於受人之託,處理名單可是上頭都沒有郵遞區號(村里長名單,在內政部網站可以下載)<br/>想到了中華郵政有3+2的郵遞區號轉檔程式可以使用<br/>但是沒想到我在用的時候困難重重,還沒辦法轉成才糟糕<br/>所以只好自己寫了一小段VBA程式來處理<br/><br/>Sheet1 為名單<br/><a href="http://maru.gates.tw/attachment.php?fid=38" target="_blank"><img src="http://maru.gates.tw/attachment.php?fid=38" class="insertimage" alt="點擊在新視窗中瀏覽此圖片" title="點擊在新視窗中瀏覽此圖片" border="0"/></a> <br/> Sheet2 為 郵遞區號 table表,格式為 (鄉鎮市區,區碼)<br/><a href="http://maru.gates.tw/attachment.php?fid=39" target="_blank"><img src="http://maru.gates.tw/attachment.php?fid=39" class="insertimage" alt="點擊在新視窗中瀏覽此圖片" title="點擊在新視窗中瀏覽此圖片" border="0"/></a><br/><br/>在名單資料中有一個重要的地方是在有一個鄉鎮市的欄位,所以為了比較方便使用了該欄位做為比對的欄位<br/><br/>用了 迴圈,判斷式,字串比對 三個基本的指令<br/><br/><div class="code">i = 1<br/>j = 1<br/>For i = 2 To 7833<br/>&nbsp;&nbsp;&nbsp;&nbsp;For j = 1 To 392<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If InStr(Sheet1.Cells(i, 2), Sheet2.Cells(j, 1)) = 1 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sheet1.Cells(i, 8) = Sheet2.Cells(j, 2)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit For<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp;Next<br/>Next<br/></div><br/>不是我不想用3+2碼,而是3碼,反正還是寄的到...<br/>下次中華郵政的3+2碼的產生軟體可以聰明一些,那3+2碼才會有人用<br/>Tags - <a href="http://maru.gates.tw/go.php/tags/vba/" rel="tag">vba</a> , <a href="http://maru.gates.tw/go.php/tags/%25E9%2583%25B5%25E9%2581%259E%25E5%258D%2580%25E8%2599%259F/" rel="tag">郵遞區號</a> , <a href="http://maru.gates.tw/go.php/tags/excel/" rel="tag">excel</a> , <a href="http://maru.gates.tw/go.php/tags/%25E4%25B8%25AD%25E8%258F%25AF%25E9%2583%25B5%25E6%2594%25BF/" rel="tag">中華郵政</a> , <a href="http://maru.gates.tw/go.php/tags/%25E7%25A8%258B%25E5%25BC%258F/" rel="tag">程式</a>
]]>
</description>
</item><item>
<link>http://maru.gates.tw/read.php/.htm#blogcomment</link>
<title><![CDATA[[評論] 中華郵政公司的3+2轉碼程式夠難用..還是自己寫程式比較快]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[評論]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://maru.gates.tw/read.php/.htm#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>