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

vba ²Ö¥[°ÝÃD

·PÁª©¥DªºÀ°¦£, ¦Û¤v­n¦n¦n¥Î¥\®ø¤Æ¤@¤U....
ªì¾ÇªÌcolor

TOP

¦^´_ 1# color790


    ÁÂÁ½׾Â,ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦r¨å,¾Ç²ßªº¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

°õ¦æ«e:


°õ¦æµ²ªG:



Option Explicit
Sub TEST()
Dim Brr, Y, N&, i&, j&, T&, T2&, T3&
Dim xR As Range, Ra As Range, Sh As Sheets
Set Y = CreateObject("Scripting.Dictionary")
Set xR = Range([C1], Cells(Rows.Count, "A").End(xlUp))
Brr = xR: N = 1
For i = 2 To UBound(Brr)
   T = Brr(i, 1): T2 = Brr(i, 2): T3 = Brr(i, 3)
   If Y(T) = "" Then
      N = N + 1: Y(T) = N: Brr(N, 1) = T: Brr(N, 3) = T3
      Y(T & "|sd") = T2: Brr(N, 2) = T2 - Y(T & "|sd")
      Else
         Brr(Y(T), 2) = T2 - Y(T & "|sd")
         Brr(Y(T), 3) = Brr(Y(T), 3) + T3
   End If
Next
With xR.Offset(, 15)
   .EntireColumn.ClearContents: .Resize(N, 3) = Brr
End With
Set Y = Nothing: Set xR = Nothing: Erase Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦r¨å,²K¥[³Ì§C»ù/³Ì°ª»ù/§¡»ù,½Ð¦U¦ì«e½ú«ü±Ð

°õ¦æµ²ªG:



Option Explicit
Sub TEST_1()
Dim Brr, Y, N&, S&, i&, j&, T&, T2&, T3&
Dim xR As Range, Ra As Range, Sh As Sheets
Set Y = CreateObject("Scripting.Dictionary")
Set xR = Range([F1], Cells(Rows.Count, "A").End(xlUp))
Brr = xR: N = 1
For i = 2 To UBound(Brr)
   T = Brr(i, 1): T2 = Brr(i, 2): T3 = Brr(i, 3)
   If Y(T) = "" Then
      N = N + 1: Y(T) = N: S = N: Brr(N, 1) = T: Brr(N, 3) = T3
      Y(T & "|sd") = T2: Y(T & "|mi") = T2: Y(T & "|ma") = T2
      Else
         N = Y(T): Brr(N, 3) = Brr(N, 3) + T3
         Y(T & "|mi") = IIf(T2 > Y(T & "|mi"), Y(T & "|mi"), T2)
         Y(T & "|ma") = IIf(T2 < Y(T & "|ma"), Y(T & "|ma"), T2)
   End If
   Y(T & "|q") = Y(T & "|q") + T3: Y(T & "|tot") = Y(T & "|tot") + (T2 * T3)
   Brr(N, 2) = T2 - Y(T & "|sd")
   Brr(N, 4) = Y(T & "|mi"): Brr(N, 5) = Y(T & "|ma")
   Brr(N, 6) = Y(T & "|tot") / Y(T & "|q")
Next
With xR.Offset(, 15)
   .EntireColumn.ClearContents: .Resize(S, 6) = Brr
   .Item(1, 4).Resize(1, 3) = [{"³Ì§C»ù","³Ì°ª»ù","§¡»ù"}]
End With
Set Y = Nothing: Set xR = Nothing: Erase Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD