Forum Discussion
聪聪 王
Feb 13, 2018Copper Contributor
Copy cells to other cells
when I run follow this code :
Sub copyCell()
Worksheets("Sheet1").Range("A11").Copy Destination:=Worksheets("Sheet2").Range("E5")
End Sub
then I run above code:
PS: Translatio...
- Feb 13, 2018
To make this code run, you must have two sheets in the workbook, the first sheet must be called Sheet1, and destination sheet must be called Sheet2.
It depends on a specific sheet name.
You can pass the index of each sheet instead of the name as follows:
Sub copyCell() Worksheets(1).Range("A11").Copy Destination:=Worksheets(2).Range("E5") End SubRegards
Haytham Amairah
Feb 13, 2018Silver Contributor
To make this code run, you must have two sheets in the workbook, the first sheet must be called Sheet1, and destination sheet must be called Sheet2.
It depends on a specific sheet name.
You can pass the index of each sheet instead of the name as follows:
Sub copyCell()
Worksheets(1).Range("A11").Copy Destination:=Worksheets(2).Range("E5")
End Sub
Regards
- 聪聪 王Feb 13, 2018Copper ContributorThank you for your reply, and I wish you a happy New Year!