Guest User

Untitled

a guest
Jan 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Sub sbCopyRangeToAnotherSheet()
  2.  
  3. 'Method 1
  4. Sheets("Sheet1").Range("A1:B10").Copy Destination:=Sheets("Sheet2").Range("E1")
  5.  
  6. 'Method 2
  7. 'Copy the data
  8. Sheets("Sheet1").Range("A1:B10").Copy
  9. 'Activate the destination worksheet
  10. Sheets("Sheet2").Activate
  11. 'Select the target range
  12. Range("E1").Select
  13. 'Paste in the target destination
  14. ActiveSheet.Paste
  15.  
  16. Application.CutCopyMode = False
  17.  
  18. End Sub
  19.  
  20. Sheets("Sheet1").Range("A1:B10").SpecialCells(xlCellTypeVisible).Copy _
  21. Destination:=Sheets("Sheet2").Range("E1")
Add Comment
Please, Sign In to add comment