|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
参与一下。。。- Private Sub Worksheet_Change(ByVal T As Range)
- r = Me.Cells(Rows.Count, 1).End(3).Row
- Set d = CreateObject("Scripting.Dictionary")
- With Sheets("机物料单价")
- r = .Cells(Rows.Count, 2).End(3).Row
- arr = .Range("a1").Resize(r, 6)
- For i = 2 To UBound(arr)
- S = CStr(Trim(arr(i, 2)))
- d(S) = Array(arr(i, 3), arr(i, 4), arr(i, 5), arr(i, 6))
- Next
- End With
- If T.Column = 4 And T.Row > 6 Then
- r = T.Row
- S = CStr(T.Value2)
- For j = 5 To 8
- Me.Cells(r, j) = d(S)(j - 5)
- Next
- Me.Cells(r, 10) = Val(Me.Cells(r, 8)) * Val(Me.Cells(r, 9))
- End If
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|