J
john smith
Hello,
I have the following lookup formula that gets prices from the partlist sheet
and enters them in the cells when I enter a part#
The column next to each of these price columns is the extended value. The
Qty in column F * the Price.
How do I code this to happen when I enter the Qty in Column F?
Thanks in advance for any help
Dan
Private Sub Worksheet_Change(ByVal Target As Range)
With Target(1)
If .Column = 4 Then
Application.EnableEvents = False
.Offset(0, 1).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C,2,FALSE)"
.Offset(0, 3).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C:E,3,FALSE)"
.Offset(0, 5).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C:F,4,FALSE)"
.Offset(0, 10).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C:H,6,FALSE)"
Application.EnableEvents = True
End If
End With
End Sub
I have the following lookup formula that gets prices from the partlist sheet
and enters them in the cells when I enter a part#
The column next to each of these price columns is the extended value. The
Qty in column F * the Price.
How do I code this to happen when I enter the Qty in Column F?
Thanks in advance for any help
Dan
Private Sub Worksheet_Change(ByVal Target As Range)
With Target(1)
If .Column = 4 Then
Application.EnableEvents = False
.Offset(0, 1).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C,2,FALSE)"
.Offset(0, 3).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C:E,3,FALSE)"
.Offset(0, 5).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C:F,4,FALSE)"
.Offset(0, 10).Formula = _
"=VLOOKUP(" & .Address(False, False) & _
", partlist!C:H,6,FALSE)"
Application.EnableEvents = True
End If
End With
End Sub