Excel VBA to copy row where 2 cells meet criteria
Posted on 2011-09-13
I have 2 workbooks.
One is named "total parts" (has 1 sheet named Total Parts)
The other "PLGFP" (Has 3 sheets Sheet 1 ...)
I want to copy 2 types of data from the 'total parts' sheet which usually has a few thousand rows.
I need to look for any row in 'total parts' that has "OGM" in Col J and "YTD" in Col O and copy that row into Sheet 1 of PLGFP
I need to look for any row in 'total parts' that has "TS CRU" in Col J and "YTD" in Col O and copy that row into Sheet 2 of PLGFP.
So I expect to have a few hundred rows in each Sheet 1 & 2 of book PLGFP, which I will save and then perform some calculations
This will be a monthly automated macro and the number of rows will vary.