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

[µo°Ý] ¨Ì«ü©w°Ï¶¡¤é´Á¡B±b¸¹ ¶ñ¤J¸ê®Æ

¦^´_ 3# ­ã´£³¡ªL
¦^´_ 2# °a¤ªºµ

·PÁ¨â¦ì¤j¤j,
¤G­Óµ{¦¡´ú¸Õµ²ªG³£¬Û¦P¡G
¦P¤@¤é´Á¡B¦P±b¸¹¦³¦hµ§¨úªO¸ê®Æ®É,±a¥Xªºµ²ªG¦³»~
¨úªO½s¸¹¥u·|±a¥X³Ì«á¤@µ§,¼Æ¶q·|Åܦ¨²Ö¥[

¥H¤U¹Ï¤ù¬°¶]µ{¦¡µ²ªG v.s. ¥¿½T¸ê®Æ

TOP

Sub ¹w¬ù§ó·s()
Dim Arr, xD, i&, T$
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([»¡©ú!R1], [»¡©ú!i65536].End(xlUp))
For i = 3 To UBound(Arr)
    If Arr(i, 1) = "" Or IsDate(Arr(i, 4)) Then
       T = Arr(i, 1) & "|" & Arr(i, 4)
       xD(T) = xD(T) + Val(Arr(i, 7)) '¦P¤é¦P¸¹¤£¥u¤@µ§,²Ö¥[
       xD(T & "/m") = "#0000" & Arr(i, 5) '¨úªO½s¸¹
    End If
Next i
Arr = Range([¹w¬ù!G1], [¹w¬ù!A65536].End(xlUp))
For i = 2 To UBound(Arr)
    T = Arr(i, 2) & "|" & Arr(i, 1)
    If xD.Exists(T) Then
       Arr(i, 3) = xD(T)
       Arr(i, 7) = xD(T & "/m")
    End If
Next i
[¹w¬ù!A1].Resize(UBound(Arr), 7) = Arr
End Sub


'==========================

TOP

¦^´_ 1# PJChen
¦³ªÅÀ°§Ú¸Õ¸Õ¬Ý¬O¤£¬O³o¼Ë¤ñ¹ï ·PÁ ^^"
  1. Public Sub ¸ó¤u§@ªí¤ñ¹ï½m²ß()

  2.     Arr = [»¡©ú!I2].CurrentRegion
  3.     Brr = [¹w¬ù!A1].CurrentRegion
  4.    
  5.     For X = 2 To UBound(Arr)
  6.         A = Arr(X, 1) & "-" & Arr(X, 4)
  7.         For Y = 2 To UBound(Brr)
  8.             B = Brr(Y, 2) & "-" & Brr(Y, 1)
  9.             If A = B And Arr(X, 4) <> "" Then
  10.                 Brr(Y, 3) = Arr(X, 7)
  11.                 Brr(Y, 7) = "#0000" & Arr(X, 5)
  12.             End If
  13.         Next Y
  14.     Next X
  15.    
  16.     [¹w¬ù!A1].Resize(UBound(Brr, 1), UBound(Brr, 2)) = Brr

  17. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : µoµÊ®ð¬Oµu¼ÈªºµoºÆ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD