G
Guest
Hi,
I am trying to search through rows of data & copy rows which contain an 'X'
in column L to another sheet - I have written the below code;
Dim row1
row1 = 4
Do Until Sheets("O_S DIV'S").Range("A" & row1).Value = Empty
If Sheets("O_S DIV'S").Range("L" & row1).Value = "X" Then
Sheets("O_S DIV'S").Range("A" & row1 & ":M" & row1).Copy
Sheets("Sheet1").Range("A" & row2).PasteSpecial xlPasteAll
row2 = row2 + 1
End If
row1 = row1 + 1
Loop
This code works however I also want to search for rows containing Y & Z in
the same column & also return these rows to the same sheet.
So I end up with all returned rows containing either an X, Y or Z to the
selected sheet
I am trying to search through rows of data & copy rows which contain an 'X'
in column L to another sheet - I have written the below code;
Dim row1
row1 = 4
Do Until Sheets("O_S DIV'S").Range("A" & row1).Value = Empty
If Sheets("O_S DIV'S").Range("L" & row1).Value = "X" Then
Sheets("O_S DIV'S").Range("A" & row1 & ":M" & row1).Copy
Sheets("Sheet1").Range("A" & row2).PasteSpecial xlPasteAll
row2 = row2 + 1
End If
row1 = row1 + 1
Loop
This code works however I also want to search for rows containing Y & Z in
the same column & also return these rows to the same sheet.
So I end up with all returned rows containing either an X, Y or Z to the
selected sheet