- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
¸ê®Æ¤£¦h, ¥i¥Î³oÓ:
Sub AAA()
Dim Clmn As Range
Set Clmn = [¤u§@ªí2!K2].Resize([¤u§@ªí2!B65536].End(xlUp).Row - 1)
Clmn = "=B2&C2"
With [¤u§@ªí1!C2].Resize([¤u§@ªí1!A65536].End(xlUp).Row - 1, 3)
.Formula = "=SUMIF(¤u§@ªí2!$K:$K,$A2&C$1,¤u§@ªí2!$E:$E)"
.Value = .Value
.Replace 0, "", Lookat:=xlWhole
End With
Clmn.ClearContents
End Sub
'================================
¸ê®Æ«Ü¦h, ¥Î³oÓ:
Dim xD, Arr, Brr, i&, j&, T$
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([¤u§@ªí2!E1], [¤u§@ªí2!B65536].End(xlUp))
For i = 2 To UBound(Arr)
T = Arr(i, 1) & Arr(i, 2)
xD(T) = xD(T) + Arr(i, 4)
Next i
'----------------------------
Arr = Range([¤u§@ªí1!E1], [¤u§@ªí1!A65536].End(xlUp))
ReDim Brr(1 To UBound(Arr) - 1, 1 To 3)
For i = 2 To UBound(Arr)
For j = 1 To 3
T = Arr(i, 1) & Arr(1, j + 2)
Brr(i - 1, j) = xD(T)
Next j
Next i
'----------------------------
[¤u§@ªí1!C2].Resize(UBound(Arr) - 1, 3).Value = Brr
End Sub
'>>>> |
|