Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ted Ted is offline
external usenet poster
 
Posts: 48
Default 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"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 192
Default 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"

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert new Worksheet with name, and insert the sheet into itsalphabetical / numerical location S Davis Excel Programming 0 May 12th 08 07:13 PM
insert row / insert column command buttons fairgreen Excel Worksheet Functions 1 October 29th 07 02:41 PM
How can I insert a date with an icon (calendar) insert Alfredo Mederico[_2_] Excel Discussion (Misc queries) 4 September 21st 07 01:20 AM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
Insert cell/format/text/fontsize and auto insert into header? Unfurltheflag Excel Programming 2 November 3rd 04 05:39 PM


All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"