How to copy data from sheet1 to sheet2
Solved/Closed
Related:
- How to copy data from sheet1 to sheet2
- How to copy data from one excel sheet to another - Guide
- How to copy data to multiple worksheets in Excel - Guide
- How to check t mobile data - Guide
- How to export data from facebook - Guide
- How to reinstall windows 10 without losing data - Guide
8 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
8 Sep 2009 à 20:43
8 Sep 2009 à 20:43
why not use a simple macro(no need for looping etc )
first check whether this macro works.
insert a button in sheet 1 from from toollbar and assign this macro to the button.
Sub test()
Worksheets("sheet1").Cells.Copy
Worksheets("sheet2").Range("a1").PasteSpecial
End Sub
first check whether this macro works.
insert a button in sheet 1 from from toollbar and assign this macro to the button.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
8 Sep 2009 à 06:18
8 Sep 2009 à 06:18
you want ot copy complete sheet1 to sheet2. It depends upon whether sheet 2 is blank or does it contain alrready some data. sp,e tomes macro may not be necessary.
plese claiify.
plese claiify.
The sheet 2 is blank, I want a VBA code of abutton named 'Copy' on sheet1 once I click this it will copy alll the data from sheet1 and paste to sheet2 which is blank.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
9 Sep 2009 à 06:02
9 Sep 2009 à 06:02
does it loop? I do not know. I thought it highlight the whole sheet and just coy ,does it take long time have you checked.
if you are intuitively unhappy about he macro try this macro
if you are intuitively unhappy about he macro try this macro
worksheets("sheet1").usedrange.copy
worksheets("sheet2").range("a1").pastespecial
Its a easiest way to do this, but I think this is not a good idea because its copying all whole sheet1. Lets think in this way I have only 2 columns. I want to copy only these columns and rows which have data. So the loop should search column and row wise if its reach to empty cell (last row with no data) it exit by copying all data and paste to sheet2.
Deepak~
Deepak~
Yes it is copying whole sheet, let me try by loop myself, if I succced I will let you know or wait for others if they are alive they will respond.
Deepak~
Deepak~
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
9 Sep 2009 à 06:57
9 Sep 2009 à 06:57
see the definition of usedrange in excel help usedrange means only the data that are entered why should you loop.
19 Oct 2010 à 00:48
19 May 2017 à 09:32
I have a question .i want to copy from one workbook to another workbook.how it will be done .kindly reply.