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

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

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

½Ð°Ý¦U¦ì¤j¤j:
§Ú¦³¤@­Ó¤u§@ªí¦p¤U(SHEET1)

§Ú»Ý­n²Î­pA¤½¥qªº«~¦W¤Î¼Æ¶q¦p¤U(SHEET2)
2.JPG
­n¦p¦ó°µ©O?

1.jpg (23.72 KB)

1.jpg

«Øij¥Î¼Ï¶s§a
Z.gif

TOP

¦pªG¥u¬O­n±o¨ì¦U§O¤p­p¼Æ, «Øij¥i¥H¸Õ¸Õ¥Îsumproduct§â¤½¥q, ¤ë¥÷, «~¦Wªº±ø¥ó©ñ¶i¥h

TOP

ÁÂÁÂchin15¤j¤j
§Ú²{¦b¬O¥Î¼Ï¯Ã,¦ý¬O¦sÀÉ«áÀÉ®×Åܪº«Ü¤j
©Ò¥H§Ú·Q¦pªG¥Îvba·|¤£·|ÀÉ®×Åܪº¤ñ¸û¤p
ÁÙ¦³¦pªG¦³¨â­Ó¥H¤Wªº±ø¥ó©O
¦p "A" ¤½¥q¦b "1" ¤ë¥÷ªº«~¦W¼Æ¶q©O?
PS.¦]¬°¦P¼ËªºÀɮצ³«Ü¦h©Ò¥H¦pªG¥ÎVBA«á¦A°µ­Ó«ö¶s´N¥i¥H¨Ï¥Î«Ü¦h­ÓÀɮפF(¤£¥Î¨C­ÓÀɮ׳£°µ¼Ï¯Ã).

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-22 07:37 ½s¿è

¦^´_ 4# gctsai
¥ý¾Ç°ò¥»¥\  3¼Ó´£Ä³ªº¤u§@ªí¨ç¼ÆSUMPRODUCT
¹Ï¤@  SHEET1 (¸ê®Æ°Ï)

¹Ï¤G SHEET2

¼Æ¶qªº¤½¦¡
B5=SUMPRODUCT((Sheet1!$A$2:$A$65525=$A$2)*(Sheet1!$B$2:$B$65525=$B$2)*(Sheet1!$C$2:$C$65525=$C$2)*(Sheet1!$D$2:$D$65535=A5))
B6=SUMPRODUCT((Sheet1!$A$2:$A$65525=$A$2)*(Sheet1!$B$2:$B$65525=$B$2)*(Sheet1!$C$2:$C$65525=$C$2)*(Sheet1!$D$2:$D$65535=A6))
B7=SUMPRODUCT((Sheet1!$A$2:$A$65525=$A$2)*(Sheet1!$B$2:$B$65525=$B$2)*(Sheet1!$C$2:$C$65525=$C$2)*(Sheet1!$D$2:$D$65535=A7))
B8=SUMPRODUCT((Sheet1!$A$2:$A$65525=$A$2)*(Sheet1!$B$2:$B$65525=$B$2)*(Sheet1!$C$2:$C$65525=$C$2)*(Sheet1!$D$2:$D$65535=A8))

TOP

ÁÂÁÂGBKEE¤j¤j
1.¦]¬°¥uª¾¹D¤½¥q¤Î¤ë¥÷¦Ó«~¦Wªº¦WºÙ¤ÎºØÃþµLªkª¾¹D(¦p¥i¯à·|¦³¼W¥[»ñ±ù,Às²´¤§Ãþªº)
2.¦]¬°§Ú¥Ø«e¦³50­ÓÃþ¦üªºÀÉ®×,¤£·Q¤@­Ó­ÓÀÉ®×¥h°µ,©Ò¥H¤~·Q»¡¥Îvbaªº

TOP

¦^´_ 6# gctsai
VBAµ{§Ç¬O­n¶q¨­®M»sªº,©Ò¥HªþÄÒ¤W¨Ó³W©w±ø¥ó­n©ñ¨º¸Ì»¡©ú¥Õ, ¦^µª¤~·|©ú½T.

TOP

1.¤j¤j§Úªº°ÝÃD¬O­n¦p¦ó¥Îvba°µ(¦pªþÀÉ)
2.­n¦p¦ó±q¨Ó·½ªº¤u§@­¶¤¤²Î­p¥X"¤T¬v"¤½¥qªº§Ç¸¹¥X²{ªº¦¸¼Æ
3.¨ä¤¤±ø¥ó"¤T¬v"¬O¤£¥ÎÅã¥Üªº
4.¦]¬°¦³«Ü¦hÀɮצpªG¥Î¼Ï¯Ã¤ÀªRªº¸Ü­n¨C¤@­ÓÀɮ׳£°µ,­«ÂI¬OÀÉ®×·|Åܫܤj
text.rar (4.68 KB)

TOP

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

TOP

ÁÂÁÂGBKEE¤j¤j
¤w¸g¥i¥H¥Î¤F,¦Ó¥BÁÙ¥i¥Hª½±µ§â±ø¥ó(¦p"¤T¬v")¥´¦bvba¤º

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD