|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
请大神们帮看一下我的代码问题 ,表格已上传 本想输入单价会跳总价 输入总价又会跳单价.但我的只能输入单价跳总价,不能输总价跳单价 看是哪里出错了.麻烦大神帮我弄一下,谢谢
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect([g19:g168,i19:i168,k19:k168], Target) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
Dim r&
r = Target.Row
Application.EnableEvents = False
If Target.Column = 69 Then
If Cells(r, "g") <> 0 Then
Cells(r, "i") = Cells(r, "k") / Cells(r, "g")
Else
End If
Application.EnableEvents = True
Else
Cells(r, "k") = Cells(r, "i") * Cells(r, "g")
Application.EnableEvents = True
End If
End Sub
|
|