Not looping copy & paste, find each X, paste to new sheet?
Posted by Joe Was on August 15, 2001 11:12 AM
This code only works for the first test. It tests for a "X" in column "A" if it finds a "X" it copies the whole row and pastes it to a different sheet. It should loop back and find the next "X" but it does not?
A fix or other solution would be much appreciated!
'Find all the rows that have a "X" in column "A" copy
'that row to the next blank row on a different sheet.
X = 1
X = X + 1
'Look for row in column "A" that meets test.
If Cells(X, 1) = "X" Then
'Select row that meets test.
Range(Cells(X, 1), Cells(X, 7)).Select
'Copy row that meets test.
'Paste to next blank row on different sheet.
'Find all the rows that have "X" in column "A"
'and do the copy & paste from above.
Loop Until Cells(X + 1, 1) = "X"