Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple Sheet copying | Excel Worksheet Functions | |||
Copying Data from Multiple Sheets to One sheet | Excel Worksheet Functions | |||
copying one cell in multiple sheets into a column on one sheet | Excel Worksheet Functions | |||
Copying Cells From Multiple Worksheets to Create Summary Sheet | Excel Discussion (Misc queries) | |||
Opening Multiple files and Copying the info all to one other sheet | Excel Discussion (Misc queries) |