- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
回復 10# oiggu - Sub Ex()
- Dim D As Range, R As Range, M$
- Set D = CreateObject("Scripting.Dictionary")
- With Sheets("date")
- For Each R In .Range("b2", .Cells(.[a1].End(xlDown).Row, .[a1].End(xlToRight).Column))
- M = .Cells(R.Row, 1) & .Cells(1, R.Column)
- D(M) = D(M) + R
- Next
- End With
- With Sheets("A")
- For Each R In .Range("b3", .Cells(.[a3].End(xlDown).Row, .[a1].End(xlToRight).Column))
- M = .Cells(R.Row, 1) & .Cells(1, R.Column)
- R = D(M)
- Next
- End With
- End Sub
複製代碼 |
|