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

½Ð°Ý¦r¦ê­n¦p¦ó²Î­p¦¸¼Æ¤£­«´_?

½Ð°Ý¦r¦ê­n¦p¦ó²Î­p¦¸¼Æ¤£­«´_?

¥»©«³Ì«á¥Ñ oiggu ©ó 2010-7-24 12:47 ½s¿è

½Ð°Ý¦r¦ê­n¦p¦ó²Î­p¦¸¼Æ¤£­«´_

¦r¦ê²Î­p.JPG (54.67 KB)

¦r¦ê²Î­p.JPG

¦r¦ê²Î­p.zip (2.35 KB)

oiggu

¥»©«³Ì«á¥Ñ kimbal ©ó 2010-7-24 16:31 ½s¿è

¦bd3 ©ñ¤W³o­Ó¤½¦¡:
  1. =SUMPRODUCT((MID($A$1:$A$30,2,4)=D$2&"")*(LEFT($A$1:$A$30,1)=$C3)*($A$1:$A$30<>"")/COUNTIF($A$1:$A$30,$A$1:$A$30))
½Æ»s¥N½X
µM«á§Û¨ì¨ä¥L®æ
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 1# oiggu
¿ï¨úd3Àx¦s®æ,¥[¤J©w¸q¦WºÙx
¤½¦¡=OFFSET(Sheet1!$A:$A,,,COUNTA(Sheet1!$A:$A),)

d3°}¦C¤½¦¡
{=IF(ISNUMBER(MATCH($C3&D$2,LEFT(x,5),0)),SUM(1/COUNTIF(OFFSET($A$1,MATCH($C3&D$2,LEFT(x,5),0)-1,,COUNTIF(x,"="&$C3&D$2&"*")),OFFSET($A$1,MATCH($C3&D$2,LEFT(x,5),0)-1,,COUNTIF(x,"="&$C3&D$2&"*")))),0)}
¦V¤U¦V¥k½Æ»s
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ gong ©ó 2010-7-24 17:08 ½s¿è

d3=SUMPRODUCT((LEFT($A$1:$A$30,5)=$C3&D$2)*1/COUNTIF($A$1:$A$30,$A$1:$A$30))
ª¾¤§¬°ª¾¤§¡A¤£ª¾¬°¤£ª¾¡A¸Û¹ê¤]¡I

TOP

ÁÂÁ¦U¦ì:
¸g´ú¸Õ³£¥i¥H¨Ï¥Î¡A¦ý¹J¨ì¤@­Ó°ÝÃD¸ê®Æ¦³5000µ§·|¼vÅT°õ¦æ³t«×·|«D±`摱
½Ð°Ý¬O§_¥i§ïvba ¦A¶×¤J®æ¤l¥[§Ö°õ¦æ³t«×¡C
oiggu

TOP

¦^´_ 5# oiggu
  1. Sub MyCount()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. With Sheet1
  4. For Each a In .Range(.[A1], .[A65536].End(xlUp))
  5.    If d(Left(a, 5)) = "" Then
  6.       d(Left(a, 5)) = a
  7.       ElseIf InStr(d(Left(a, 5)), a) = 0 Then
  8.       d(Left(a, 5)) = d(Left(a, 5)) & "," & a
  9.     End If
  10. Next
  11. For Each a In .[C3:C5]
  12.    For Each b In .[D2:F2]
  13.       .Cells(a.Row, b.Column) = UBound(Split(d(a & b), ",")) + 1
  14.     Next
  15. Next
  16. End With
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ oiggu ©ó 2010-7-26 06:29 ½s¿è

ÁÂÁ¶W¯Åª©¥D¡A¤Ó¯«¤F¡C
¤w¸g¥i¥H²Î­p¦¸¼Æ
½Ð°Ý­n¦p¦ó¥ÎVBA§âª÷ÃB²Î­p¥X¨Ó
©ñ¤J®æ¦¡¤º¡B¦r¦ê¶}ÀY+¦~¤ë²Î­p

²Î­p.JPG (99.92 KB)

²Î­p.JPG

²Î­p.zip (9.51 KB)

oiggu

TOP

¦^´_ 7# oiggu
  1. Sub MyCount()

  2. Set d = CreateObject("Scripting.Dictionary")
  3. Set d1 = CreateObject("Scripting.Dictionary")

  4. With Sheet1

  5. For Each a In .Range(.[A1], .[A65536].End(xlUp))
  6. d1(Left(a, 5)) = d1(Left(a, 5)) + Application.Sum(a.Offset(, 1).Resize(, 3))
  7.    If d(Left(a, 5)) = "" Then

  8.       d(Left(a, 5)) = a

  9.       ElseIf InStr(d(Left(a, 5)), a) = 0 Then

  10.       d(Left(a, 5)) = d(Left(a, 5)) & "," & a

  11.     End If

  12. Next

  13. For Each a In .[F5:F7]

  14.    For Each b In .[G3:L3]
  15.       
  16.      If (b.Column Mod 2) = 1 Then Cells(a.Row, b.Column) = UBound(Split(d(a & b), ",")) + 1
  17.      If (b.Column Mod 2) = 0 Then Cells(a.Row, b.Column) = d1(a & b)

  18.     Next

  19. Next

  20. End With

  21. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2010-7-27 18:57): À³¸Ó¹ï¤W­z§Þ¥©¥[¥H¤F¸Ñ,¦Û¤v¹Á¸Õ«á¦A°w¹ï°ÝÃDµo°Ý

¦^´_ 8# Hsieh


·PÁ¶W¯Åª©¥D
§A¼gªº vba ²¼ä¦³¤O¡A¤w¸g¥i¥H²Î­p¦¸¼Æ¨Ï¥Î¥¿±`¡A
ÁٽбФ@­Ó°ÝÃD¡A¦p¦ó§â¦P¦WºÙªº¼Æ¦rÁ`­p°_¨Ó¡B
¹ï·Ó §÷®Æ¶µ¥Ø¤ÀÃþ­pºâ¡A¦A¥Î VBA ¶×¤J®æ¦¡­n¦p¦ó§@?

test.zip (3.29 KB)

oiggu

TOP

¦^´_ 9# oiggu

Sub sum()
For k = 2 To 10
Set d = CreateObject("Scripting.Dictionary")
With Sheets("date")
For Each a In Sheets("date").Range(.[a3], .[a65536].End(xlUp))
   d(a) = d(a) + a.Offset(, k - 1)
Next
For Each a In Sheets("a").Range([a3], [a65536].End(xlUp))
      Sheets("a").Cells(a.Row, k) = d(a)
    Next
End With
Next
End Sub

·PÁªO¥D
¤£¾å±o¨ºùØ¥X¿ù¡B ´ú¸Õ¥X¨Óªº­È=0 ¤£¥¿½T
½Ð°Ý Sheets("a").Cells(a.Row, k) = d(a) ¿ù¦b¨ºùØ?
oiggu

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD