I use the following to move and delete row for a one worksheet, I would like one macro to do the same for all sheets except "Master" and "Discontinued" in the workbook.
Sub move_if_Discontinued()
r = 7
Do Until Sheets("Brick").Cells(r, 2).Value = ""
If Sheets("Brick").Cells(r, 10).Value = "Yes" Or _
Sheets("Brick").Cells(r, 10).Value = "YES" Or _
Sheets("Brick").Cells(r, 10).Value = "yes" Then
Sheets("Discontinued").Rows(7).EntireRow.Insert
Rng = "a" & r & ":k" & r
Sheets("Brick").Range(Rng).Copy _
Destination:=Sheets("Discontinued").Range("a7")
Sheets("Brick").Rows(r).EntireRow.Delete
End If
r = r + 1
Loop
End Sub
Thanks
Johnboy
Sub move_if_Discontinued()
r = 7
Do Until Sheets("Brick").Cells(r, 2).Value = ""
If Sheets("Brick").Cells(r, 10).Value = "Yes" Or _
Sheets("Brick").Cells(r, 10).Value = "YES" Or _
Sheets("Brick").Cells(r, 10).Value = "yes" Then
Sheets("Discontinued").Rows(7).EntireRow.Insert
Rng = "a" & r & ":k" & r
Sheets("Brick").Range(Rng).Copy _
Destination:=Sheets("Discontinued").Range("a7")
Sheets("Brick").Rows(r).EntireRow.Delete
End If
r = r + 1
Loop
End Sub
Thanks
Johnboy