Board logo

¼ÐÃD: [µo°Ý] ½Ð°Ý­n«ç»ò¥ÎVBA¼g¥XÃþ¦ü¼Ï¯Ã¤ÀªRªº¥\¯à [¥´¦L¥»­¶]

§@ªÌ: sandra_wang    ®É¶¡: 2010-11-24 16:29     ¼ÐÃD: ½Ð°Ý­n«ç»ò¥ÎVBA¼g¥XÃþ¦ü¼Ï¯Ã¤ÀªRªº¥\¯à

¤j®a¦n:
¤p©f§Ú¦³­Ó°ÝÃD·Q½Ð±Ð¤j®a¡C
­ì¥»§Ú¦Û¤v¿ý»s¼Ï¯Ã¤ÀªR¨Ó§âHR¬Û¦P¦WºÙªºªF¦è¡AHXÄæ¦ì¼Æ¶q¥[Á`ªº°Ê§@¡A
µM«á¦A§â¼Ï¯Ã¤ÀªRªºµ²ªG«öCtrl+alt+¡õ ¶K¨ìHZ & IFÄæ¦ì¡A
¦ý¬O¼Ï¯Ã¤ÀªR³Ì©³¤U·|¦³¤@Äæ¦X­p¡A¥i¬O§Ú¤£·Q­n¦³¦X­p³oÄæ¡A
¦Ó¥B¤¤¶¡ªºHS~HWÄæ¦ì¸ê®Æ§ÚÁÙ­n¤â°Ê¶ñ¹L¥h¡A

©Ò¥H·Q°Ý¤j®a­n«ç»ò¥ÎVBA¼g¥XÃþ¦ü¼Ï¯Ã¤ÀªRªº¥\¯à©O?
§Úªº»Ý¨D¬O:·íHRÄæ¦ì¦WºÙ¬Û¦P®É¡A«h§âHXÄæ¦ì¼Æ¦r¦X­p¡A¨Ã¨Ì§Ç¶ñ¨ìHZ~IFÄæ¦ì¡C
§@ªÌ: GBKEE    ®É¶¡: 2010-11-24 17:34

¦^´_ 1# sandra_wang
  1. Sub Ex()
  2.     Dim D As Object, R, S$, Rng As Range
  3.     Set D = CreateObject("Scripting.Dictionary")
  4.     With ActiveSheet
  5.          .[HR9].Resize(, 7).Copy .[HZ9]
  6.          .[HZ9].CurrentRegion.Offset(1).Clear
  7.         For Each R In .Range(.[HR10], .[HR10].End(xlDown))
  8.             S = Join(Application.Transpose(Application.Transpose(R.Resize(, 6))), ",")
  9.             D(S) = D(S) + R(1, 7)
  10.         Next
  11.         Set Rng = .[HZ9].Offset(1)
  12.         For Each R In D.KEYS
  13.             Rng.Resize(, 6) = Split(R, ",")
  14.             Rng.Offset(, 6) = D(R)
  15.             Set Rng = Rng.Offset(1)
  16.         Next
  17.     End With
  18. End Sub
½Æ»s¥N½X

§@ªÌ: oobird    ®É¶¡: 2010-11-24 19:58

³oÃþ°ÝÃD§Ú¤ñ¸û«Øij¼ô²ß¼Ï¯Ã¤ÀªRªí¡C
[attach]3744[/attach]
§@ªÌ: HUNGCHILIN    ®É¶¡: 2010-11-25 00:16

³oÃþ°ÝÃD§Ú¤ñ¸û«Øij¼ô²ß¼Ï¯Ã¤ÀªRªí¡C
oobird µoªí©ó 2010-11-24 19:58



§Ú¤]¬O»{¬°³o¼Ë¤ñ¸û§Ö
§@ªÌ: sandra_wang    ®É¶¡: 2010-11-25 09:19

¥»©«³Ì«á¥Ñ sandra_wang ©ó 2010-11-25 09:41 ½s¿è

½Ð°Ý#3 oobird
§Ú­n«ç»ò±q¼Ï¯Ã¤ÀªRªº"ª©­±°t¸m"§Ë¥X¹³§A¤@¼Ëªºªí®æ©O?
§Ú§Ë±o¸ò§A³£¤£¤@¼Ë­C!!
§@ªÌ: oobird    ®É¶¡: 2010-11-25 11:04

[attach]3756[/attach]
§@ªÌ: sandra_wang    ®É¶¡: 2010-11-26 08:35

To oobird:
§Ú¦³¸Õ¹L§Aªº¤èªk¤F¡A¥i¥H°µ¥X¨Ó¡A
¦ý¬O§Ú¦³¥t¤@­Ó°ÝÃD¬O¡A¦]¬°³o¨Ç¹Lµ{§Ú·Q©ñ¶i¥h¥¨¶°ùØ­±¡A
¦pªG§Ú¥Î¿ý»s¥¨¶°ªº¸Ü¡A¨º¥u­n¨C¦¸¶i¨Óªº¸ê®Æ¶q¤£¦P¡A¨Ï¥Î¿ý»s¥¨¶°´N·|¦³°ÝÃD~
©Ò¥H§Ú¬O¤£¬OÀ³¸Ó¥ÎVBA¼g·|¤ñ¸û¦n©O?
§@ªÌ: oobird    ®É¶¡: 2010-11-26 08:54

¥»©«³Ì«á¥Ñ oobird ©ó 2010-11-26 08:57 ½s¿è

©w¸q°ÊºA½d³ò¦WºÙ¡C
«e´X¤ÑHsª©¥D¦³±Ð¹L¡C¤£¹L~³Q§R¤F¡I
GBª©¥DªºVBA¤]¬O«Ü¦nªº¿ï¾Ü¡C




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)