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

[µo°Ý] ¦³±ø¥óªº²Î­p

¦^´_ 24# gctsai
µ{§Ç¸Ì½Ð¥[¤W¬õ¦r³¡¤À
f = Application.Match(.[b1].Text, Sheets("¨Ó·½").Rows(1), 0) 'f: ¦b¨Ó·½¤¤´M§ä²Î­pªºÄæ¦ì
f = f - 2    '§AAÄæ±q²¾¨ìCÄæ ***** Rng.Offset·|§ïÅÜ
If Rng = .Range("A2") Then D(Rng.Offset(, f- 1).Value) = D(Rng.Offset(, f - 1).Value) + 1

TOP

¤j¤j½Ð°Ý¤@¤U¬°¤°»ò§â"±ø¥ó"±q[A2]²¾¨ì[C2],µ²ªG§Ç¸¹[E2]´NÅܦ¨¤F°Ó«~«~¦W[G2]
text.rar (12.51 KB)

TOP

Privateªí¥Ü Sub µ{§Ç¥u¦b«Å§i¥¦¤§¼Ò²Õùتºµ{§Ç©Ò¨Ï¥Î¡C
»P¦Û°Ê§ó·s²@µLÃö«Y¡C

TOP

¥»©«³Ì«á¥Ñ gctsai ©ó 2011-7-31 11:15 ½s¿è
§A§âPrivate Sub Ex()
«e­±ªºPrivate ®³±¼
´N¥i¦b¤u§@¦C~¥¨¶°¤º¬Ý¨ì¥¦
«Ø¥ß¥¨¶°®É¹ï¸Ü¤è¶ô¦s©ñ¦ì¸m´N¿ï" ...
oobird µoªí©ó 2011-7-31 09:02

ÁÂÁ¤j¤j,¥i¬O¦pªG§â"«e­±ªºPrivate ®³±¼"ªº¸Ü¨ºÁÙ¥i¥H¦Û°Ê§ó·s¶Ü?

¼W¯q¶°¤£ª¾¹D­n¿ï¨º¤@­Ó??

TOP

§A§âPrivate Sub Ex()
«e­±ªºPrivate ®³±¼
´N¥i¦b¤u§@¦C~¥¨¶°¤º¬Ý¨ì¥¦
«Ø¥ß¥¨¶°®É¹ï¸Ü¤è¶ô¦s©ñ¦ì¸m´N¿ï"­Ó¤H¥¨¶°¬¡­¶Ã¯"
³o¼Ë¶}¨C­ÓÀɮ׳£·|ÀH¤§¶}±Ò
¦s¼W¯q¶°¬O¥t¦s¡A¿ï"xla",¦s¦n«á¦b¼W¯q¶°¤¤¸ü¤J

TOP

±`¥Î¨ìªº¸Ü¥i§â¥¨¶°¦s©ñ¦b­Ó¤H¥¨¶°¬¡­¶Ã¯
¤]¥i°µ¦¨¼W¯q¶°¸ü¤J
oobird µoªí©ó 2011-7-30 23:30



½Ð°Ý¤j¤j¥¨¶°¬¡­¶Ã¯©Î¼W¯q¶°­n¦p¦ó°µ©O?

TOP

±`¥Î¨ìªº¸Ü¥i§â¥¨¶°¦s©ñ¦b­Ó¤H¥¨¶°¬¡­¶Ã¯
¤]¥i°µ¦¨¼W¯q¶°¸ü¤J

TOP

ÁÂÁ¤j¤j,§Ú¤w¸g¦³¸ò¹q¸£»¡¤F,¥¦»¡ok!
¦ý¬O°ÝÃDÄ_Ä_¤S¦³¤@­Ó°ÝÃD,´N¬O:
¦pªG¦³§OªºÀɮפ]¬O­n¥Î³o­Óvba,¥i¬O§Ú¦b¥¨¶°¤º§ä¤£¨ì

TOP

¦^´_ 16# gctsai
¨º¦pªG­n²Î­pªºÄæ¦ì¤£¦b®ÇÃä©O
¨º§A­n¸ò¹q¸£»¡ªü ¦p¹Ï

   
  1. Private Sub Ex()
  2.     Dim D As Object, Rng As Range, f As Variant
  3.     Set D = CreateObject("SCRIPTING.DICTIONARY") '³]¥ß¦r¨åª«¥ó
  4.     Set Rng = Sheets("¨Ó·½").[a2]    '³]¥ßÀx¦s®æª«¥ó
  5.     With Sheets("²Î­p")
  6.          f = Application.Match(.[b1].Text, Sheets("¨Ó·½").Rows(1), 0) 'f: ¦b¨Ó·½¤¤´M§ä²Î­pªºÄæ¦ì
  7.          If IsError(f) Then MsgBox "²Î­pªºÄæ¦ì¤£¦s¦b!!!": Exit Sub
  8.         Do While Rng <> ""        'Rngªº­È¬°ªÅ¥Õ®É¤£°õ¦æ Doªº°j°é
  9.             If Rng = .Range("A2") Then D(Rng.Offset(, f - 1).Value) = D(Rng.Offset(, f - 1).Value) + 1
  10.             '        .[A2] ->Sheets("²Î­p")[A2]      '¦r¨åª«¥ó(KEY)=ITEM + 1
  11.             Set Rng = Rng.Offset(1)  'Rng¤U²¾¤@¦C¦ì
  12.         Loop
  13.         With .[B2:C2]
  14.             .Resize(.CurrentRegion.Rows.Count, 2) = ""
  15.             .Cells(1).Resize(D.Count) = Application.Transpose(D.KEYS)
  16.             .Cells(2).Resize(D.Count) = Application.Transpose(D.ITEMS)
  17.             .Resize(D.Count, 2).Sort Key1:=.Cells(1), Order1:=xlAscending, Header:=xlNo
  18.         End With
  19.     End With
  20.     Set D = Nothing
  21.     Set Rng = Nothing
  22. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ¤j¤jªº«ü¾É,¤w¸g¥i¥H¥Î¤F,­ì¨Ó¬O¼Ò²Õªº°ÝÃD
¨º¦pªG­n²Î­pªºÄæ¦ì¤£¦b®ÇÃä©O
If Rng = "¤T¬v" Then D(Rng.Offset(, 3).Value) = D(Rng.Offset(, 3).Value) + 1
°£¤F¤W­z¤§¥~¬O§_¥i¥H¦³¥t¥~ªº¤è¦¡¦]¬°¦³®É­Ô­n²Î­pªºÄæ¦ì·|Â÷ªº«Ü»·¬Æ¦Ü·|¦b±ø¥óªº«e­±
text.rar (13.72 KB)

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD