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

[µo°Ý] Àˬd­«½Æ©Ê½èªº¸ê®Æ

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-7-26 12:11 ½s¿è

¦^´_ 26# jackyliu
¨Ì§A26#ªº¹Ï

­n³v¨B°õ¦æªº¸Ü¡A§âD(E)ªººÊ¬Ý¦¡®³±¼§a¡C

1.  ·í¦r¨å¥Î¤£¦s¦bªºKey¨ú¦^ª«¥ó®É·|¦Û°Ê·s¼W¸ÓKey¡A³oÂI¦b°»¿ù®É¬Ý°_¨ÓÁÙ¬O¦³®Äªº....
      §A¥i¥H¦Û¤v¸Õ¸Õ¤¤Â_«á¦b§Y®É¹Bºâµøµ¡¥´   ?d("¤£¦s¦bªºKey")  ¡A´N·|¦Û°Ê¦bd©³¤U·s¼W¤@­Óitem°Õ..
2.  µM«á·í§A­n³v¨B°õ¦æ®É¡A¦]¬°¦³³]d(E)ªººÊ¬Ý¦¡¡A¨C¤@¨B³£·|¨ú¦^ d(E)¡A¥i¬O E ¤@­È³£¬O¦s¦bªºKey¶Ü???
     ¤£¬O¡A·í§Aµ{¦¡°õ¦æ¨ìFor Each E«e¤@¦æ©ÎNext«á¤@¦æ¡AE³£¬O 'µL'¡A©ó¬O¥¦§ä¤£¨ì³o­ÓKey¤S¦Û°Ê·s¼W¤F¡A©Ò¥H¤~³y¦¨¦r¨å¤ºªºKey(6)¤]¬°µL¡C

¤ñ°_¨Ó¡A°»¿ù®É­Y¥u¥Î°Ï°ìÅܼƵøµ¡¬Ýd­È(§Ú­ì¥»¤]¬O³o¼Ë)¡A«ç¼Ë³£¤£·|¹J¨ì©p»¡ªº°ÝÃD¡C

TOP

¦^´_ 30# jackyliu
´ú¸Õ¬Ý¬Ý¬O§_¯à¥¿±`°õ¦æ¡H
ÁÂÁ©p¡I

TOP

¦^´_ 29# c_c_lai


    Sorry ~  §Ú¥H¬°¬O¨Ï¥Î ³Ì©³¤Uªº  µoªí¦^´_,
¤U¦¸ª½±µÂI¿ï¤å³¹¸Ìªº¦^ÂÐ ~ ³y¦¨§xÂZ,½Ð¨£½Ì !!

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-7-26 07:33 ½s¿è

¦^´_ 28# GBKEE
¦^´_ 26# jackyliu
¸ÕµÛ±N¥H¤Uµ{¦¡½X­×
  1. For Each E In D.KEYS
  2.     .Cells(cts, "A").Resize(1, UBound(D(E), 2)).Value = D(E)   '  Åª¨ú¦r¨åª«¥óªº ITEM (°}¦C)
  3.     cts = cts + 1
  4. Next
½Æ»s¥N½X
§ï¦¨
  1. For Each E In D.KEYS
  2.     If E <> "" Then _
  3.         .Cells(cts, "A").Resize(1, UBound(D(E), 2)).Value = D(E)   '  Åª¨ú¦r¨åª«¥óªº ITEM (°}¦C)
  4.     cts = cts + 1
  5. Next
½Æ»s¥N½X
¦A±N¥¦¾Þ½m¤@¤U¡C

P.S. ¦^ÂФH®a®É¡A½Ð¨Ï¥Î¿ï«ö "¦^ÂÐ" ¶s¡A§_«h·í¨Æ¤H¬O¤£ª¾¹D©p¤w¦^ÂаÝÃD¤F¡I
       (³o¤]¬O¤@ºØ¶Ç²Î§¸`)

TOP

¦^´_ 26# jackyliu
¦A¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim D As Object, E, i As Integer
  4.     Set D = CreateObject("Scripting.dictionary")             '¦r¨åª«¥ó
  5.     i = 1
  6.     With Sheet1
  7.         Do While .Cells(i, "A") <> ""
  8.             E = .Cells(i, "A") & .Cells(1, "B") & .Cells(1, "C") & .Cells(1, "E")
  9.             If D.exists(E) = False Then
  10.                D(E) = .Cells(i, "A").Resize(1, 6).Value
  11.             End If
  12.             i = i + 1
  13.         Loop
  14.     End With
  15.     i = 1
  16.     With Sheet2
  17.         .Cells.Clear
  18.         For Each E In D.KEYS
  19.             .Cells(i, "A").Resize(1, UBound(D(E), 2)) = D(E)   'Ū¨ú¦r¨åª«¥óªºITEM(°}¦C)
  20.             i = i + 1
  21.         Next
  22.     End With
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ªO¤j:
§Ú¬O¥Î2003ª©ªº, ª½±µ«ö°õ¦æOK, °õ¦æ¤T¦¸«á,
§Ú¿ï¾Ü³v¨B°»¿ù,¤@­Ó¤@­Ó¬Ý,  ¤S·|¥X²{¤@¼Ëªº¿ù»~­C!
...
jackyliu µoªí©ó 2013-7-25 21:55

¦pªG¦b«Ø¥ß¤§ªì´N§â µL Âo±¼¬O§_¦³¥i¯à¹F¨ì§Aªº»Ý¨D©O?
  1. .
  2.     For Each E In Sheet1.Range("a1").CurrentRegion.Rows      'ª«¥ó: A1©Ò©µ¦ù½d³òªº¦C
  3.     If Not E.Cells(1, 1) & E.Cells(1, 2) & E.Cells(1, 3) & E.Cells(1, 5) = "" Then
  4.          D(E.Cells(1, 1) & E.Cells(1, 2) & E.Cells(1, 3) & E.Cells(1, 5)) = E.Value
  5.       End If
  6.     Next
½Æ»s¥N½X

TOP

ªO¤j:
§Ú¬O¥Î2003ª©ªº, ª½±µ«ö°õ¦æOK, °õ¦æ¤T¦¸«á,
§Ú¿ï¾Ü³v¨B°»¿ù,¤@­Ó¤@­Ó¬Ý,  ¤S·|¥X²{¤@¼Ëªº¿ù»~­C!

°õ¦æ¶¥¬q¿ù»~'13'
«¬ºA¤£²Å

«¬ºA¤£²Å.jpg (223.06 KB)

«¬ºA¤£²Å

«¬ºA¤£²Å.jpg

TOP

¦^´_ 24# c_c_lai
2003ª©¨S¦³ªº°ÝÃD,«ç·|¦b2007ª©¥X²{,ÁÂÁ§AªºÀ°¦£°»¿ù.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 20# GBKEE
¦^´_ 23# jackyliu
  1. Option Explicit

  2. Sub ex()
  3.     Dim D As Object, E As Variant, cts As Integer
  4.    
  5.     Set D = CreateObject("Scripting.dictionary")         '  ¦r¨åª«¥ó
  6.    
  7.     For Each E In Sheet1.Range("A1").CurrentRegion.Rows  '  ª«¥ó: A1 ©Ò©µ¦ù½d³òªº¦C
  8.         If D.exists(E.Cells(1, 1) & E.Cells(1, 2) & E.Cells(1, 3) & E.Cells(1, 5)) = False Then _
  9.                D(E.Cells(1, 1) & E.Cells(1, 2) & E.Cells(1, 3) & E.Cells(1, 5)) = E.Value
  10.     Next
  11.    
  12.     With Sheet2
  13.         .Cells.Clear
  14.         cts = 1
  15.         For Each E In D.KEYS
  16.             .Cells(cts, "A").Resize(1, UBound(D(E), 2)).Value = D(E)   '  Åª¨ú¦r¨åª«¥óªº ITEM (°}¦C)
  17.         cts = cts + 1
  18.         Next
  19.     End With

  20.     Set D = Nothing
  21. End Sub
½Æ»s¥N½X
¥[¤J¤F¹LÂo§PÂ_¡AIf D.exists(E.Cells(1, 1) & E.Cells(1, 2) & E.Cells(1, 3) & E.Cells(1, 5)) = False Then ....¡A
jackyliu ½Ð¦A¸Õ¬Ý¬Ý¡I

TOP

­«½Æ­È¤©¥H¹LÂo½Õ,©M§Ú»¡ªº­«½Æ­È,¤£­n½Æ»s¨ì Sheet2 ªº·N«ä¶Ü?
¦³¸Ñ¶Ü?

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD