|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub text()
- Dim rng As Range
- Sheets("分配").Range("e2", Cells(Cells(Rows.Count, "c").End(xlUp).Row, "j")).ClearContents
- arr = Sheets("存量").UsedRange
- brr = WorksheetFunction.Transpose(WorksheetFunction.Index(arr, 0, 1))
- For Each rng In Sheets("分配").Range("c2", Cells(Rows.Count, 3).End(xlUp))
- r = WorksheetFunction.Match(rng.Value, brr, 0)
- If r > 0 Then
- rng.Offset(0, 2) = arr(r, 2) + arr(r, 3)
- rng.Offset(0, 4) = arr(r, 2)
- rng.Offset(0, 5) = arr(r, 3)
- End If
- Next
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|