if then insert and add

T

Ted

I am trying to put together a bill of materials for requesting hardware quotes.
My worksheet has drop down validation for getting the part numbers and
descriptions. What i need to happed is that when I a certain part number is
selected it automatically inserts a row below with another part numer and
quantity.
There are several partnumbers that would need to generate the same
additional required part number.

How can I tell it that if "Part A" selected add "Part C with qty X" or "Part
B" selected add "Part C with qty Y"
 
S

StumpedAgain

I am fairly new to event programming, but it seems that you could do this
through such a method. You could paste something like the following in the
worksheet VBA editor:

Private Sub Worksheet_Change(ByVal Target As Range)

Set Target = Range("B8")

If Target = "Part A" Then
Range("B9").Value = "Part C with qty X"
Else If Target = "Part B" Then
Range("B9").Value = "Part C with qty Y"
End If
End If

End Sub

Something like that. If you want more specific help, just post what you
have in more detail and I/Someone can do more specific work. Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top