|
发表于 2012-3-13 13:02
|
显示全部楼层
本楼为最佳答案
本帖最后由 happym8888 于 2012-3-13 13:06 编辑
- Sub hz()
- Dim irows As Integer
- Dim trows As Integer
- sj = Sheet2.[B65536].End(xlUp).Row
- For irows = sj To 2 Step -1
- For trows = sj To irows + 1 Step -1
- If Sheet2.Cells(irows, 1) = Sheet2.Cells(trows, 1) And Sheet2.Cells(irows, 2) = Sheet2.Cells(trows, 2) Then
- Sheet2.Cells(irows, 3) = Sheet2.Cells(irows, 3) + Sheet2.Cells(trows, 3)
- Sheet2.Rows(trows).Delete
- End If
- Next
- Next
- End Sub
复制代码
Book1.rar
(8.54 KB, 下载次数: 11)
|
|