ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Excel2003 remove duplicates¬Û®e©Ê°ÝÃD

¦^´_ 3# sunshine010
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng(1 To 2), Sh As Worksheet, i As Integer, E As Variant
  4.     Set Sh = Workbooks.Add(1).Sheets(1)  '©Ò·s¼W¬¡­¶Ã¯ªº²Ä¤@±i¤u§@ªí
  5.     For i = 2 To 33
  6.         Set Rng(1) = Sheets(i).Range("B4:AG65536")
  7.         Set Rng(2) = Sh.Range(Rng(1).Address)
  8.          With Rng(2)
  9.             .Clear
  10.             .Value = Rng(1).Value  '½Æ»sRng(1)
  11.         End With
  12.         For Each E In Array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
  13.             Rng(1).Columns(E).AdvancedFilter xlFilterCopy, "", Rng(2).Cells(E), True
  14.             '¨C¤@Ä檺 ¶i¶¥¿z¿ï ¤£­«½Æªº­È ¨ì Rng(2)ªº¨C¤@Äæ
  15.         Next
  16.         Rng(1).Value = Rng(2).Value
  17.     Next
  18.     Sh.Parent.Close False   'Ãö³¬·s¼W¬¡­¶Ã¯
  19. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# faye59


±z¦n ÁÂÁ±zªº¦^ÂÐ §Ú¥»¨­¤£·|¼gVBA¡A¥D­n¬O¦]¬°§Ú¹q¸£¥u¦³¶REXCEL2003 ©Ò¥H¥u¯à·Q¿ìªkÅýVBA¥i¥H¦b2003ª©°õ¦æ

¤]¦³µo²{ remove duplicates¬O2007¦~¤~¦³ªº¥\¯à¡A¦]¦¹¤~¯S§O­W´oQQ

ÁÂÁ±z´£¨Ñ«Øij¬°CreateObject("Scripting.Dictionary")

³o­Ó¥Îªk§Ú¦bPO¤å«e¨S¦³¬d¨ì¡A§Ú¤]¨Ó¬ã¨s¬Ý¬Ý ¦pªG¼g¤£¥X¨Ó¦A¤W¨Ó½Ð±Ð¦U¦ì ÁÂÁ¡I

TOP

¦^´_ 1# sunshine010


    ¨ä¹êoffice³o­Ó­°µ¥¯Å°ÝÃD¤£¤Ó¥i¯à·|°µªº¨Æ...¬Û«H­n­°µ¥¦³¯S®í¦]¯À§a!
¦Ó§A«üªºremove duplicates¦b2003ª©¥»¦¹¥\¯à¤£¦s¦b¡A
remove duplicates¬O±q2007ª©¥»¤~¶}©l¦³ªº¡A
¤u¨ã¦ì¸m¦b[¸ê®Æ]¡÷[¸ê®Æ¤u¨ã]¡C
(¸Õ¸Õ¿ý»s¥¨¶°´Nª¾¹D¤F)

±q§Aªºµ{¦¡½X¤¤¬Ý°_¨Ó¬O­n¥H2003ª©¶}©l°õ¦æ32­Ó¬¡­¶Ã¯°µ­«Âиê®Æ§R°£¡A¹ï§a?
¨º»ò¥i¥H¥ÎCreateObject("Scripting.Dictionary")«Ø¥ß¦r¨å¤è¦¡´N¥i¥H°µ¨ì¤F¡C
(·j¯Á¥i¥H§ä¨ì«Ü¦h¬ÛÃö°Ñ¦Ò¸ê®Æ¡A¦Ó¥B³£¬O¶Wª©´£¨Ñªº)
¦pªGÁÙ¼g¤£¥X¨Ó¡A¥i¥H¤W¶Ç¸ê®Æ¨Ã»¡©ú­ì¦]¡A¦A¨Ó¨ó³B¸Ñ¨M°ÝÃD¡C

´£¿ô:¦pªG¸ê®Æ¬O¥u­n¨C­ÓSheet¤£­«ÂнЦA¤U­ÓSheet«eNothing¡C
¤@¤À§V¤O¡A¤@¤À¦¬Ã¬¡C
µo°ÝÃD«e¥i¥H¥ý·j¯Á¤º¤å¬O§_¦³¬ÛÃö½d¨Ò¡C

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD