è¿ç§è¡¨æ ¼è¦èªå¨æ±æ»çè¯éç¨vbaæ¯è¾åéï¼
Sub æ±æ»()
Set d=CreateObject(âScripting.Dictionaryâ)
For i=1 to cells(rows.count,1).end(3).row
If IsNumeric(Range("a" & i) then
d(Range("a" & i).value)= d(Range("a" & i).value)+ Range("b" & i).value
End if
Next
y=d.keys
t=d.items
For i=0 to Ubound(y)
Sheets(2).Cells(i +2,1)=y(i)
Sheets(2).Cells(i+2,2)=t(i)
next
End sub
温馨提示:内容为网友见解,仅供参考