Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Sub Button4_Click()
  2. x = 15
  3. Do While Cells(x, 1) <> ""
  4. If Cells(x, 1) <> "" Then
  5. Worksheets("Sheet1").Rows(x).Copy
  6. Rows(x).PasteSpecial xlPasteValues
  7. Worksheets("Sheet2").Activate
  8. erow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
  9. ActiveSheet.Paste Destination:=Worksheets("Sheet2").Rows(erow)
  10. End If
  11. Worksheets("Sheet1").Activate
  12. x = x + 1
  13. Loop
  14. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement