|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Target.Address(0, 0) <> "Y11" Then Exit Sub
- Application.EnableEvents = False
- Dim ar, i, dic
- Sheet1.[y10] = "=(VLOOKUP($BQ$7,胶料性能表!$A$1:$AA$416,20,FALSE))"
- t = Sheet1.[y10]
- Set dic = CreateObject("scripting.dictionary")
- ar = [{"困气1",0.8;"困气2",0.6;"困气3",0.4;"困气4",0.2;"困气5",0.1}]
- For i = 1 To UBound(ar)
- dic(ar(i, 1)) = ar(i, 2)
- Next
- s = Sheet1.Range("y11").Value
- Sheet1.[y10] = t * dic(s)
- Application.EnableEvents = True
- End Sub
复制代码 |
|