- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 277
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-12-23
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-8-6 18:48 ½s¿è
¦^´_ 17# °²±¶W¤H
¬On·ÓSheet1ªº±Æ§Ç¶Ü?- Sub nn()
- Dim Ar(), A As Range, B As Range
- With Sheets("Sheet1")
- For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp)) ²Ä¤@¶A2¥H¤U°µ°j°é
- For Each Sh In Sheets(Array("Sheet2", "Sheet3")) 'ì¸ê®Æ©Ò¦b¤u§@ªí
- With Sh
- For Each B In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp)) '¦bA2¥H¤UÀx¦s®æ°µ°j°é
- If B = A Then '¸ò²Ä¤@¶AÄæÀx¦s®æ°µ¤ñ¹ï¡A¦pªG²Å¦X
- ReDim Preserve Ar(s) 'ÂX¤j°}¦C
- Ar(s) = Array(B.Value, B.Offset(, 1).Value, B.Offset(, 2).Value, B.Offset(, 4).Value) '±Nȼg¤J°}¦C
- s = s + 1 '·Ç³Æ¤U¤@¦¸ÂX¤j°}¦C
- End If
- Next
- End With
- Next
- With Sheets("³Ì²×µ²ªG")
- If s > 0 Then .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Resize(s, 4).Value = Application.Transpose(Application.Transpose(Ar)) '¦pªG°}¦C¦³¼g¤J¡A´N±N°}¦C¼g¤Jµ²ªG
- Erase Ar: s = 0 '²MªÅ°}¦C¡A¨Ã·Ç³Æ¤U¤@Ó°}¦Cªì©l¤j¤p
- End With
- Next
- End With
- End Sub
½Æ»s¥N½X |
|