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

[µo°Ý] ¬Û¦P®æ¦¡ªº2­Ó¤u§@ªí¦X¦¨¤@­Ó(¬Û²§¸ê®Æ·s¼W)

[µo°Ý] ¬Û¦P®æ¦¡ªº2­Ó¤u§@ªí¦X¦¨¤@­Ó(¬Û²§¸ê®Æ·s¼W)

½Ð°Ý§Ú¦³2­Ó¤u§@ªí¡A®æ¦¡³£¬O ©m¦W ¨­¥÷ÃÒ¦r¸¹ ¥Í¤é ¦a§}

²{¦ba¤u§@ªí¬Oªº¸ê®Æ  b¤u§@ªí¬O·sªº¸ê®Æ(¤]¦³¨Ç¬O¸ê®Æ)¡A¤]´N¬O2­Ó¤u§@ªí¦³¤@¨Ç¬Û¦Pªº¸ê®Æ

§Ú·Q±q2­Ó¤u§@ªí¤¤­«¾ã¸ê®Æ¡Aaªº¤u§@ªí§@¥À¤u§@ªí¡A±qb¤u§@ªí§ó·s¤Î·s¼W¸ê®Æ(¥H¨­¥÷ÃÒ¦r¸¹¬°°ò·Ç)

¥H«e³£¬OÂà¨ì access ¥h§@¡A¤£ª¾¦bexcel¤¤«ç»ò¾Þ§@?

((¥t«Ø¤@­Ó·s¤u§@ªí¤]ok))

·P®¦!!
¤¯¥S

¦^´_ 1# pitera88
VBA»²§U¤ñ¸û²³æ
  1. Private Sub CommandButton1_Click()
  2. Dim Sh As Worksheet
  3. Set d = CreateObject("Scripting.Dictionary")
  4. For Each Sh In Sheets(Array("A", "B"))
  5.    With Sh
  6.       For Each a In .Range(.[B2], .[B2].End(xlDown))
  7.          d(a.Value) = a.Offset(, -1).Resize(, 4).Value
  8.       Next
  9.     End With
  10. Next
  11. With Sheets(3)
  12. .UsedRange.Offset(1).ClearContents
  13. .[A2].Resize(d.Count, 4).Value = Application.Transpose(Application.Transpose(d.items))
  14. .[A2].Resize(d.Count, 4).Sort key1:=.Cells(1, 1), Header:=xlNo
  15. End With
  16. End Sub
½Æ»s¥N½X
¾ã²z.rar (12.03 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


    ¦¬¤U¤F¡A·P®¦!!

§â§Úªº¸ê®Æ®M¤W¥h¥Î¬Ý¬Ý¡A
¤¯¥S

TOP

¦^´_ 2# Hsieh


    ª©¥D¦w¦w

§âµ{¦¡®M¥Î¨ì¸ê®ÆùØ­±¬Ookªº

¦ý~~~§Ú§Ñ¤F!!ùØ­±ÁÙ¦³¤@­Ó¬O¹q¸ÜÄæ¡A§Ú¬O¥Î¤å¦rªº®æ¦¡¦sªº¡A¾ã¦X«áªº®æ¦¡¬O¡u³q¥Î¡v¡A¸ê®Æ´N¶Ã±¼¤F¡C½Ð°Ý¥i¥H³s®æ¦¡³£½Æ»s¶Ü? ((§Ú¸Õ¹L¥ý¥h¡uµ²ªG¡v¨º§â®æ¦¡§ï¦¨¡u¤å¦r¡v¡A¦A¾ã¦X¤@¦¸´Nok¤F¡A©Ò¥H³o³¡¥÷¡A¦pªG³Â·Ðªº¸Ü¡A´N¤£¥Î¤F))

¤ñ¸û­«­nªº¬O¡A­ì¨Óªº¡uA¡v¸ê®Æ¡A¦³¥t2­ÓÄæ¦ì ¬O¡uB¡v¸ê®ÆùبS¦³ªº¡A¥i¥H«O¯d¡uA¡v¸ê®Æªº³o2­ÓÄæ¦ì¾ã¦X¹L¥h¶Ü?

·P®¦!!! ¾ã²z.rar (12.15 KB)
¤¯¥S

TOP

¦^´_ 4# pitera88

B¤u§@ªí¦³¸ê®Æ´N¼g¤JB¤u§@ªí¡A¨S¦³ªº´N¥HA¤u§@ªí¬°·Ç
  1. Private Sub CommandButton1_Click()
  2. Dim Sh As Worksheet, A As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. For Each Sh In Sheets(Array("A", "B"))
  5.    With Sh
  6.       For Each A In .Range(.[B2], .[B2].End(xlDown))
  7.          If IsEmpty(d(A.Value)) Then
  8.             d(A.Value) = Application.Transpose(Application.Transpose(A.Offset(, -1).Resize(, 7).Value))
  9.             Else
  10.             ar = d(A.Value)
  11.             For i = LBound(ar) To UBound(ar)
  12.               If A.Offset(, -1).Resize(, 7).Cells(1, i) <> "" Then ar(i) = A.Offset(, -1).Resize(, 7).Cells(1, i).Value
  13.               d(A.Value) = ar
  14.             Next
  15.             End If
  16.       Next
  17.     End With
  18. Next
  19. With Sheets(3)
  20. .UsedRange.Offset(1).ClearContents
  21. .[A2].Resize(d.Count, 7).Value = Application.Transpose(Application.Transpose(d.items))
  22. .[A2].Resize(d.Count, 7).Sort key1:=.Cells(1, 1), Header:=xlNo
  23. End With
  24. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# Hsieh


    ok¤F

·PÁÂ Hsieh ¤j¤j
¤¯¥S

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD