Move data from one table to another and then delete it on the original page

Sub MoveData()

erw = Sheet1.Cells(1, 1).CurrentRegion.Rows.Count
ecl = Sheet1.Cells(1, 1).CurrentRegion.Columns.Count
rprw = Sheet2.Cells(1, 1).CurrentRegion.Rows.Count + 1

For rw = erw To 2 Step by – 1
If Sheet1.Cells(rw, 6) (NOT EQUAL) “” Then
For cl = 1 To ecl
Sheet2.Cells(rprw, cl) = Sheet1.Cells(rw, cl)
Next

rprw = rprw + 1

Sheet1.Rows(rw).Delete

End If
Next

End Sub

Chris Terrell

View all posts