返回列表 上一主題 發帖

[分享] excel資料庫刪除重複資料

[分享] excel資料庫刪除重複資料

excel資料庫,輸入資料好易重複,利用ADO+sql,輕輕鬆松刪除重複的資料

Sub iDo()
    Dim R As Range, A As Integer
     Set R = Range("A1").CurrentRegion.Rows(1)
    A = R.Interior.ColorIndex
       iPath = ActiveWorkbook.FullName
       iQ = "select distinct * from [" & ActiveSheet.Name & "$] order by ¤é´Á"
      Set iAddress = ActiveSheet.Range("A1")
    iSql
       R.Interior.ColorIndex = A
End Sub
lmh

資料庫刪除重複資料.rar (16.64 KB)
lmh

TOP

        靜思自在 : 脾氣嘴巴不好,心地再好也不能算是好人。
返回列表 上一主題