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

[µo°Ý] ¬Y±ø¥ó¤U ¤£­«´_¥X²{¶µ¥Ø²Î­p

[µo°Ý] ¬Y±ø¥ó¤U ¤£­«´_¥X²{¶µ¥Ø²Î­p

½Ð±Ð¦U¦ì¤j®v:
¦p¦ó¥ÎVBA²Î­p¬Y±ø¥ó¤U ¤£­«´_¥X²{¶µ¥Ø²Î­p¡A¥H¤U¹Ï¬°¦C:±ø¥ó«h¬O102¦~1¤ëAÃþ§Oªº¤£­«´_¶µ¥Ø²Î­p¡A
½Ð°ÝVBA¸Ó¦p¦ó³]©w¡A¦]ÀɮפӤj(¦n´X¸Uµ§¼Æ¾Ú)¡A¥Î¨ç¼Æ·Pı¶]¦nºC!

¤é´Á¬O¤°»ò®æ¦¡¡H
«Øij¤W¶ÇÀɮסA
¤£­nÅý·QÀ°¦£ªº¤H¦A¦hªá®É¶¡¥h«Ø¥ß´ú¸Õ¸ê®Æ¡I

TOP

¤£¦n·N«ä§Ñ°O¸É¤Wªþ¥ó¡Aªþ¥ó¦p¤U!

¤£­«´_²Î­p.rar (3.59 KB)

TOP

¦^´_ 2# ­ã´£³¡ªL
·PÁ´£¿ô~ªþ¥ó¥H¸É¤W

TOP

¥»©«³Ì«á¥Ñ yen956 ©ó 2016-3-19 15:58 ½s¿è

'1. ¥i¯à¬OÁ{®É Key in ªºÃö«Y, ÄæA¤£¬OExcelªº¤é´Á®æ¦¡,
Sub Âà´«¬°Excel¤é´Á®æ¦¡()
Dim I As Integer, Ar
For I = 2 To Range("A" & Rows.Count).End(xlUp).Row
    Ar = Split(Cells(I, 1), ".")
    x = Trim(Str(Val(Ar(0)) + 1911)) & "/" & Ar(1) & "/" & Ar(2)
    Cells(I, 1) = Trim(Str(Val(Ar(0)) + 1911)) & "/" & Ar(1) & "/" & Ar(2)
Next
End Sub

'2. ­Y Ãþ§O ªø«×¤@¼Ë
  1. Sub CountDist()
  2.     Dim Rng As Range, I As Integer, s1 As String, E
  3.     Set d = CreateObject("Scripting.Dictionary")
  4.     [F5:Q5] = "": [F9:Q9] = ""
  5.     Set Rng = Range([A2], "A" & Range("A" & Rows.Count).End(xlUp).Row)
  6.    
  7.     For Each E In Rng
  8.         d(Str(Month(E.Value)) & E(1, 3).Value & E(1, 2)) = Month(E.Value)
  9.     Next
  10.         
  11.     For I = 0 To d.Count - 1
  12.         If Right(d.keys()(I), 1) = "A" Then       '­Y Ãþ§O ¬° "A"(ªø«×¬°1)
  13.             Cells(5, d.items()(I) + 5) = Cells(5, d.items()(I) + 5) + 1
  14.         ElseIf Right(d.keys()(I), 1) = "B" Then   '­Y Ãþ§O ¬° "B"(ªø«×¬°1)
  15.             Cells(9, d.items()(I) + 5) = Cells(9, d.items()(I) + 5) + 1
  16.         End If
  17.     Next
  18. End Sub
  19. '3. ­Y Ãþ§O ªø«×¤£¤@
  20. Sub CountDist2()
  21.     Dim Rng As Range, I As Integer, s1 As String, E
  22.     Set d = CreateObject("Scripting.Dictionary")
  23.     [F5:Q5] = "": [F9:Q9] = ""
  24.     Set Rng = Range([A2], "A" & Range("A" & Rows.Count).End(xlUp).Row)
  25.    
  26.     For Each E In Rng
  27.         '»²§UÄæ(ÄæS), ±N Ãþ§O ¥ªÃä¥Î # ¦r¤¸¸É¨¬¬°10­Ó¦r¤¸
  28.         E(1, 19) = "=right(""#########""&RC[-17],10)"
  29.         d(Str(Month(E.Value)) & E(1, 3).Value & E(1, 19)) = Month(E.Value)
  30.     Next
  31.    
  32.     For I = 0 To d.Count - 1
  33.         If Right(d.keys()(I), 3) = "Axx" Then       '­Y Ãþ§O ¬° "Axx"(ªø«×¬°3)
  34.             Cells(5, d.items()(I) + 5) = Cells(5, d.items()(I) + 5) + 1
  35.         ElseIf Right(d.keys()(I), 2) = "Bx" Then    '­Y Ãþ§O ¬° "Bx"(ªø«×¬°2)
  36.             Cells(9, d.items()(I) + 5) = Cells(9, d.items()(I) + 5) + 1
  37.         End If
  38.     Next
  39. End Sub
½Æ»s¥N½X
test.gif

TOP

¦^´_ 5# yen956
½Ð°Ý¦pªG­n¥[¦~¤Àªº§PÂ_¦¡¡A­n¦p¦ó¥[?¥Ø«e¦n¹³¥u²Î­p¤ë¥÷!
·Q§ï¬°102¦~1¤ë------
¦]¦³®É·|¦³¦h¦~ªº¸ê®Æ¥á¤@°_
ÁÂÁÂ~~

TOP

¥þ³¡¡eÃþ§O¡f¦U¡e¦~¤ë¡f¤£­«ÂÐ¥þ¦C¥X¨Ó¡G
  1. Sub TEST()
  2. Dim Arr, Brr, xD(1 To 3), i&, T1, T2, T3, R&, C%
  3. [E:IV].Clear
  4. For i = 1 To 3: Set xD(i) = CreateObject("Scripting.Dictionary"): Next
  5. Arr = Range([A1], [C65536].End(xlUp))
  6. ReDim Brr(1 To UBound(Arr), 1 To 200): Brr(1, 1) = "Ãþ§O"

  7. For i = 2 To UBound(Arr)
  8.     T1 = Replace(Left(Arr(i, 1), 6), ".", "¦~"): If T1 = "" Then GoTo 101
  9.     C = xD(1)(T1)
  10.     If C = 0 Then C = xD(1).Count: xD(1)(T1) = C: Brr(1, C + 1) = T1 & "¤ë"

  11.     T2 = Arr(i, 2): If T2 = "" Then GoTo 101
  12.     R = xD(2)(T2)
  13.     If R = 0 Then R = xD(2).Count: xD(2)(T2) = R: Brr(R + 1, 1) = T2

  14.     T3 = Arr(i, 3): If T3 = "" Then GoTo 101
  15.     If xD(3)(T1 & T2 & T3) = 0 Then Brr(R + 1, C + 1) = Brr(R + 1, C + 1) + 1
  16.     xD(3)(T1 & T2 & T3) = 1
  17. 101: Next

  18. With [E4].Resize(xD(2).Count + 1, xD(1).Count + 1)
  19.      .Value = Brr
  20.      .Offset(, 1).Sort Key1:=.Item(1), Order1:=xlAscending, Header:=xlNo, Orientation:=xlLeftToRight '¾î±Æ§Ç
  21.      .Offset(1, 0).Sort Key1:=.Item(1), Order1:=xlAscending, Header:=xlNo, Orientation:=xlTopToBottom 'ª½±Æ§Ç
  22.      .Borders.LineStyle = 1
  23. End With
  24. End Sub
½Æ»s¥N½X

¡@
¡@
20160319(¤£­«´_²Î­p).rar (11.51 KB)

TOP

¦^´_ 7# ­ã´£³¡ªL
ÁÂÁ¤j¤jªº«ü¾É, ¤S­n¦n¦nªº¬ã¨s¤@¤U¤F, ÁÂÁÂ!!

TOP

¦^´_ 7# ­ã´£³¡ªL
·PÁ«ü¾É...¨ü±Ð¤F~~

TOP

        ÀR«ä¦Û¦b : ¤â¤ß¦V¤U¬O§U¤H¡A¤â¤ß¦V¤W¬O¨D¤H¡F§U¤H§Ö¼Ö¡A¨D¤Hµh­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD