Copy all data in Sheet1 to Sheet2

Nick70

Active Member
Joined
Aug 20, 2013
Messages
304
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have some data that I need to copy from Sheet1 onto Sheet2.

The data in Sheet1 changes every day so I cannot have a predefined range but need to make sure I select it correctly every time I want to copy it.

In order to select my data I would need to start on cell A4 and then select all cells with data to the right and all cells with data going down.
This way I make sure I have selected all data to copy onto Sheet2 (so I have my range).

Once data selected I need to copy it and paste it onto Sheet2 in cellA1.

How do I do this?

Thanks,
N.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try using
VBA Code:
Sub MM1()
Dim lr As Long, lc As Integer
lr = Cells.Find("*", , xlValues, , xlRows, xlPrevious).Row
lc = Cells.Find("*", , xlValues, , xlByColumns, xlPrevious).Column
Range("A4", Cells(lr, lc)).Copy Sheets("Sheet2").Range("A1")
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,216,119
Messages
6,128,941
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top