|
[color=rgba(0, 0, 0, 0.87)]網友問到要將一個範圍的資料去除重複再排序,找了很多方法大部分都是單欄去除重複,所以就想說利用dictionary來將資料去除重複,再把它轉到陣列使用泡沬排序法將資料排序,最後再寫迴圈將內容值顯示出來。
[color=rgba(0, 0, 0, 0.87)]dictionary要去引用Microsoft Scripting Runtime 物件變數要用set設定參考文章: [color=rgba(0, 0, 0, 0.87)]http://www.xl-central.com/sort-a-dictionary-by-key.html[color=rgba(0, 0, 0, 0.87)]Sort a Dictionary by Key範例檔案下載:[color=rgba(0, 0, 0, 0.87)]http://download.bestdaylong.com/f859.htm[color=rgba(0, 0, 0, 0.87)]將資料讀進字典、排序、轉置.xlsm
[color=rgba(0, 0, 0, 0.87)]
|
|