Boy do I have a dooze!!! lol, I am having trouble figuring this out and would love some help!
SO I have this code that I was using that you would put a number in a cell on sheet 1, it would pull the data from sheet 2, and put it int he cells I had set with offest. Now i would like to do the same, except add another sheet into the equation.
Sheet 1 = Parts Order List
Sheet 2 = Parts Master (master sheet where all the parts are listed for a specific Product)
Sheet 3 = Daily Build list (Products being built that day)
What I am trying to do is When the "Part Number" is typed into "D6" - "D30" it matches the part number in the "Parts Master and transfers all that row into row 1 on The parts "Order list". then moving onto the next row in both Parts order list and Daily Build list to add another part number and so on.... Several Cells also have "lists done through Data validation. I don't know if i am asking too much of Excel or not. But this is what we have been using for years to build out build lists and I was tasked with doing this within Excel.
I have all the values entered for the parts Master which was lengthy in itself...
The code I have started is this. But it errors out on this line below
Any help would be greatly appreciated!!! Thank you in advance!!!
SO I have this code that I was using that you would put a number in a cell on sheet 1, it would pull the data from sheet 2, and put it int he cells I had set with offest. Now i would like to do the same, except add another sheet into the equation.
Sheet 1 = Parts Order List
- Generally lists are numbered 1-25 With headings and such Starts
- This will have the parts of each daily list that gets built
Sheet 2 = Parts Master (master sheet where all the parts are listed for a specific Product)
- All the Product number is in Row A and then the parts go from cells B thru Sheet
Sheet 3 = Daily Build list (Products being built that day)
- This also is listed 1-25
- This is the list that I make every day that has all of the product being built that day
What I am trying to do is When the "Part Number" is typed into "D6" - "D30" it matches the part number in the "Parts Master and transfers all that row into row 1 on The parts "Order list". then moving onto the next row in both Parts order list and Daily Build list to add another part number and so on.... Several Cells also have "lists done through Data validation. I don't know if i am asking too much of Excel or not. But this is what we have been using for years to build out build lists and I was tasked with doing this within Excel.
I have all the values entered for the parts Master which was lengthy in itself...
The code I have started is this. But it errors out on this line below
Code:
If Not Intersect(Target, ws3.Range("D6")) Is Nothing Then
Code:
Private Sub Worksheet_Change(ByVal Target As Range)Dim LastRow As Long
Dim Rng As Range, Found As Range
Dim ws1 As Worksheet, ws2 As Worksheet, ws3 As Worksheet
Set ws1 = Sheets("Parts Order list")
Set ws2 = Sheets("Parts Master")
Set ws3 = Sheets("Monday")
LastRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = ws2.Range("A3:A" & LastRow)
If Not Intersect(Target, ws3.Range("D6")) Is Nothing Then
Set Found = Rng.Find(what:=Target.Value, LookIn:=xlValues)
If Not Found Is Nothing Then
ws1.Range("B1") = Found.Offset(0, 1)
ws1.Range("B2") = Found.Offset(0, 2)
ws1.Range("B3") = Found.Offset(0, 3)
ws1.Range("B4") = Found.Offset(0, 4)
End If
End If
End Sub
Any help would be greatly appreciated!!! Thank you in advance!!!