Need assistance to accomplish the following b/c the code we have now is pulling too much; need this filtering in place asap:
'Look for only rows that have no colorization present
'If "J3" of the "PARTS" sheet finds a match in column "P" of the "TECH ORDER" sheet THEN
'look to adjacent cell "H" while on the "TECH ORDER" sheet for a code to use for matching in the 2nd layer of filtering
'FOR EXAMPLE: if there's a code "B" in that adjacent cell "H" then
'locate uncolorized rows that are = "B" (OR) are = "" (blank)
'copy data from that TRUE match from the TECH ORDER sheet to the PARTS sheet
specifically:
'paste a formula into next available empty row of the PARTSto feed in from the "TECH ORDER" sheet
'Specifically:
'what resides in columns G, F, B and A of TECH ORDER sheet should feed into
'.....................columns E, O, P and R of PARTS sheet
' rest of code something like this - where it pastes either the data itself or a formula to auto-pull the data using the formula (don't care
' which method is used -- whichever is easiest
Code:
Sub IfMatchThenSelectCodeAndPasteAdjacentData()
Sheets("PARTS").Select
'If "J3" of the "PARTS" sheet finds a match in column "P" of the "TECH ORDER" sheet THEN
Code:
If Range("J3").Value = Range("P5:P9") Then '(this needs updated of course)
'look to adjacent cell "H" while on the "TECH ORDER" sheet for a code to use for matching in the 2nd layer of filtering
'FOR EXAMPLE: if there's a code "B" in that adjacent cell "H" then
'locate uncolorized rows that are = "B" (OR) are = "" (blank)
'copy data from that TRUE match from the TECH ORDER sheet to the PARTS sheet
specifically:
'paste a formula into next available empty row of the PARTSto feed in from the "TECH ORDER" sheet
'Specifically:
'what resides in columns G, F, B and A of TECH ORDER sheet should feed into
'.....................columns E, O, P and R of PARTS sheet
' rest of code something like this - where it pastes either the data itself or a formula to auto-pull the data using the formula (don't care
' which method is used -- whichever is easiest
Code:
Sheets("PARTS").Select
Range("E").Select '(next available expty row for pasting formula
ActiveCell.FormulaR1C1 = _
' "=formula goes here that will draw the data in from Column "G" of the other sheet)"
Range("O").Select '(next available expty row for pasting formula
ActiveCell.FormulaR1C1 = _
' "=formula goes here that will draw the data in from Column "F" of the other sheet)"
Range("O").Select '(next available expty row for pasting formula
ActiveCell.FormulaR1C1 = _
' "=formula goes here that will draw the data in from Column "B" of the other sheet)"
Range("R").Select '(next available expty row for pasting formula
ActiveCell.FormulaR1C1 = _
' "=formula goes here that will draw the data in from Column "A" of the other sheet)"
End If
End Sub
Last edited: