ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   if then insert and add (https://www.excelbanter.com/excel-programming/414186-if-then-insert-add.html)

Ted

if then insert and add
 
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"

StumpedAgain

if then insert and add
 
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!
--
-SA


"Ted" wrote:

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"



All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com