copying multiple row to a new sheet
I got my code working where it copies a row and moves it over to the other sheet, but if I have multiple rows to move over it only moves the first row that is true, but not the others. How can I get it to move every row that is true over to a new sheet. Here's my code
Dim rng As Range, cell As Range, rng1 As Rang
Set rng = Range(Cells(2, "B"), Cells(Rows.Count, "B").End(xlUp)
Set rng1 = Nothin
For Each cell In rn
If cell.Value = "True" The
If rng1 Is Nothing The
Set rng1 = cel
Els
Set rng1 = Union(rng1, cell
End I
End I
Nex
If Not rng1 Is Nothing The
rng1.Range("B1:H1").Copy Destination:=Worksheets("Sheet2").Range("B2"
End I
|