Hello All,
I have posted in the excelforum.com website on this thread, but I haven't really received a response.
I have a list of 200 Parts and their associated Order Types on one sheet and the same type of list on a 2nd sheet. Column A has the list of Parts and Column B has the list of Order Types.
I think I need an array that can combine Sheet 1 column A and B together and compare it to Sheet 2 Column A and B. When a match is found then it needs to take the values in sheet 2 and paste them in the correct cell on sheet 1.
If you follow the link the attached spreadsheet should help explain what I am looking for. I have been working on this since Thursday and I really need to get this resolved so I can move on with other tasks. Below is the code that I have so far.
I appreciate any help you can provide.
Kelly
I have posted in the excelforum.com website on this thread, but I haven't really received a response.
I have a list of 200 Parts and their associated Order Types on one sheet and the same type of list on a 2nd sheet. Column A has the list of Parts and Column B has the list of Order Types.
I think I need an array that can combine Sheet 1 column A and B together and compare it to Sheet 2 Column A and B. When a match is found then it needs to take the values in sheet 2 and paste them in the correct cell on sheet 1.
If you follow the link the attached spreadsheet should help explain what I am looking for. I have been working on this since Thursday and I really need to get this resolved so I can move on with other tasks. Below is the code that I have so far.
I appreciate any help you can provide.
Code:
Sub Date_Range()
Dim MyArr3 As Variant
Dim MyArr1 As Variant
Sheet3.Select
Dim ItemLookup3 As Long
ItemLookup = Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
Sheet1.Select
Dim ItemLookup1 As Long
ItemLookup = Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
With Sheets(3): Set MyArr3 = .Range(.[a2], .Cells(Rows.Count, "a").End(xlUp)): End With
With Sheets(1): Set MyArr1 = .Range(.[a2], .Cells(Rows.Count, "a").End(xlUp)): End With: i = 1
Sheet3.Select
Dim LoopColumn As Long
Dim LoopColumn2 As Long
For LoopColumn = 2000 To 2 Step -1
If Cells(MyArr3, 1) = Cells(MyArr1, 1) Then
Range(Cells(LoopColumn, 3), Cells(LoopColumn, 11)).Copy
Sheet1.Select
Call Find_Part2
End If
Next LoopColumn
End Sub
Sub Find_Part2()
Dim ItemLookup1 As Long
ItemLookup = Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
Dim LoopColumn2 As Long
For LoopColumn2 = 2000 To 2 Step -1
If Cells(LoopColumn2, 1) = "MyArr3" And Cells(LoopColumn2, 2) = "MyArr1" Then
Cells(LoopColumn2, 4).Select '.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End If
Next LoopColumn2
End Sub
Kelly