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

[µo°Ý] ±a¤J¹ïÀ³ªº¤é´Á

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦r¨å,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

¥æ´Áªí:


WIPªí°õ¦æ«e:


WIPªí°õ¦æµ²ªG:



Option Explicit
Sub TEST() '¡ô
Dim Arr, Brr, Crr, V$, Y, R&, i&, S&, T1$, T3$
Set Y = CreateObject("Scripting.Dictionary")
Brr = Range([¥æ´Á!C2], [¥æ´Á!A65536].End(xlUp))
For i = 1 To UBound(Brr): Y(Brr(i, 1)) = Y(Brr(i, 1)) & "/" & i: Next
Crr = Range([WIP!C2], [WIP!A65536].End(xlUp))
ReDim Arr(1 To UBound(Crr), 1 To 1)
For i = 1 To UBound(Crr)
   T1 = Crr(i, 1): T3 = Crr(i, 3)
   If Y(T1) = "" Then Arr(i, 1) = "µL­q³æ": GoTo i01
i00: S = Y(T1 & "|¾l¶q")
   If S <= 0 Then
      V = Mid(Y(T1), InStr(Y(T1), "/") + 1) & "/": R = Val(V)
      If R = 0 Then Arr(i, 1) = "µLÄò³æ": GoTo i01
      Y(T1) = V: Y(T1 & "|¾l¶q") = Brr(R, 3) + S
      If Y(T1 & "|¾l¶q") <= 0 Then GoTo i00
      Y(T1 & "|¥æ´Á") = Brr(R, 2)
   End If
   Arr(i, 1) = Y(T1 & "|¥æ´Á")
   Y(T1 & "|¾l¶q") = Y(T1 & "|¾l¶q") - Crr(i, 3)
i01: Next
[WIP!D2].Resize(UBound(Arr)) = Arr
Set Y = Nothing: Erase Arr, Brr, Crr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ­×¦æ­nô½t­×¤ß¡AÂǨƽm¤ß¡AÀH³B¾i¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD