select and copy from one worksheet to another

mort1703

Active Member
Joined
Sep 13, 2008
Messages
265
Hi

I have a worksheet called "BILLS", this worksheet contains multiple rows of data; in essence a list of bills; I need to select all of the data and copy to another worksheet.

Can anyone help
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
start in cell A1 and do a ctrl+shift+end and copy
go to other sheet and paste where you want it
 

mort1703

Active Member
Joined
Sep 13, 2008
Messages
265
sorry I meant using vba, I have a macro in place and want to add this routine so its automated, rather than a manual process
 

mort1703

Active Member
Joined
Sep 13, 2008
Messages
265
Code:
        Sheets("BILLS").Select
        Range("A1:F24").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("APRIL BILLS").Select
        ActiveSheet.Paste

How do I adjust this code to adjust for unlimited rows, ie the number for rows required is random, at the moment I have 24 rows of data however this could change I need to make the above code a bit more robust
 

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
Code:
Sub copy_bills()
Dim LR As Long
LR = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

    Sheets("BILLS").Select
    Range("A1:F" & LR).Copy Destination:=Sheets("APRIL BILLS").Range("A1")
    Application.CutCopyMode = False

End Sub

HTH
 

Watch MrExcel Video

Forum statistics

Threads
1,122,511
Messages
5,596,576
Members
414,079
Latest member
Frills

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
Top