So this code does what I want it to (mostly) the only thing that is missing is a way to move onto the next line down in the program. This sub right now, finds and pulls the row in "Parts Master" after inputting the part number in ("D6") on "Monday" and puts the data in Row "A" on "Parts Order List". It should move onto the next row in both "Parts Order List" to be ready to accept the part number in the next row on "Monday" sheet which would be ("D7"). There has to be a way to condense the code I have written and to move on to the next line for input. I'm not proficient enough to know how to do this. Is anybody available to help me? I know I am asking a lot, but I appreciate any help!!! thank you in advance!!!!
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("A2:A" & LastRow)
If Not Intersect(Target, ws3.Range("D7")) Is Nothing Then
Set Found = Rng.Find(what:=Target.Value, LookIn:=xlValues)
If Not Found Is Nothing Then
ws1.Range("B3") = Found.Offset(0, 0)
ws1.Range("C3") = Found.Offset(0, 1)
ws1.Range("D3") = Found.Offset(0, 2)
ws1.Range("E3") = Found.Offset(0, 3)
ws1.Range("F3") = Found.Offset(0, 4)
ws1.Range("G3") = Found.Offset(0, 5)
ws1.Range("H3") = Found.Offset(0, 6)
ws1.Range("I3") = Found.Offset(0, 7)
ws1.Range("J3") = Found.Offset(0, 8)
ws1.Range("K3") = Found.Offset(0, 9)
ws1.Range("L3") = Found.Offset(0, 10)
ws1.Range("M3") = Found.Offset(0, 11)
ws1.Range("N3") = Found.Offset(0, 12)
ws1.Range("O3") = Found.Offset(0, 13)
ws1.Range("P3") = Found.Offset(0, 14)
ws1.Range("Q3") = Found.Offset(0, 15)
ws1.Range("R3") = Found.Offset(0, 16)
ws1.Range("S3") = Found.Offset(0, 17)
ws1.Range("T3") = Found.Offset(0, 18)
ws1.Range("U3") = Found.Offset(0, 19)
ws1.Range("V3") = Found.Offset(0, 20)
End If
End If
End Sub
Last edited: