select and copy from one worksheet to another

mort1703

Active Member
Joined
Sep 13, 2008
Messages
266
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
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
start in cell A1 and do a ctrl+shift+end and copy
go to other sheet and paste where you want it
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,636
Members
449,043
Latest member
farhansadik

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