¼ÐÃD:
[µo°Ý]
¬Û¦P®æ¦¡ªº2Ó¤u§@ªí¦X¦¨¤@Ó(¬Û²§¸ê®Æ·s¼W)
[¥´¦L¥»¶]
§@ªÌ:
pitera88
®É¶¡:
2012-3-23 15:27
¼ÐÃD:
¬Û¦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®¦!!
§@ªÌ:
Hsieh
®É¶¡:
2012-3-23 21:21
¦^´_
1#
pitera88
VBA»²§U¤ñ¸û²³æ
Private Sub CommandButton1_Click()
Dim Sh As Worksheet
Set d = CreateObject("Scripting.Dictionary")
For Each Sh In Sheets(Array("A", "B"))
With Sh
For Each a In .Range(.[B2], .[B2].End(xlDown))
d(a.Value) = a.Offset(, -1).Resize(, 4).Value
Next
End With
Next
With Sheets(3)
.UsedRange.Offset(1).ClearContents
.[A2].Resize(d.Count, 4).Value = Application.Transpose(Application.Transpose(d.items))
.[A2].Resize(d.Count, 4).Sort key1:=.Cells(1, 1), Header:=xlNo
End With
End Sub
½Æ»s¥N½X
[attach]10115[/attach]
§@ªÌ:
pitera88
®É¶¡:
2012-3-24 13:11
¦^´_
2#
Hsieh
¦¬¤U¤F¡A·P®¦!!
§â§Úªº¸ê®Æ®M¤W¥h¥Î¬Ý¬Ý¡A
§@ªÌ:
pitera88
®É¶¡:
2012-3-24 14:02
¦^´_
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®¦!!! [attach]10126[/attach]
§@ªÌ:
Hsieh
®É¶¡:
2012-3-24 14:55
¦^´_
4#
pitera88
B¤u§@ªí¦³¸ê®Æ´N¼g¤JB¤u§@ªí¡A¨S¦³ªº´N¥HA¤u§@ªí¬°·Ç
Private Sub CommandButton1_Click()
Dim Sh As Worksheet, A As Range
Set d = CreateObject("Scripting.Dictionary")
For Each Sh In Sheets(Array("A", "B"))
With Sh
For Each A In .Range(.[B2], .[B2].End(xlDown))
If IsEmpty(d(A.Value)) Then
d(A.Value) = Application.Transpose(Application.Transpose(A.Offset(, -1).Resize(, 7).Value))
Else
ar = d(A.Value)
For i = LBound(ar) To UBound(ar)
If A.Offset(, -1).Resize(, 7).Cells(1, i) <> "" Then ar(i) = A.Offset(, -1).Resize(, 7).Cells(1, i).Value
d(A.Value) = ar
Next
End If
Next
End With
Next
With Sheets(3)
.UsedRange.Offset(1).ClearContents
.[A2].Resize(d.Count, 7).Value = Application.Transpose(Application.Transpose(d.items))
.[A2].Resize(d.Count, 7).Sort key1:=.Cells(1, 1), Header:=xlNo
End With
End Sub
½Æ»s¥N½X
§@ªÌ:
pitera88
®É¶¡:
2012-3-24 15:24
¦^´_
5#
Hsieh
ok¤F
·PÁÂ Hsieh ¤j¤j
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)