I know this is a very easy task but i need to know the macro to copy a certain range of data from one sheet to another.
This range is dynamic and changes on a regular basis.
I know this is a very easy task but i need to know the macro to copy a certain range of data from one sheet to another.
This range is dynamic and changes on a regular basis.
The basic syntax is:
[VBA]Worksheets("sheet1").Range("Data").Copy Worksheets("Sheet2").Range("A1")[/VBA]
where Data is the name of the range to copy.
Regards,
Rory
sorry about my lack of VB knowledge, but can you send me the entire code?
Eg:
I need to copy whatever data is from column A to D on sheet 1
and then paste the entire data in sheet 2 as values only.
Off the top of my head, something like this:
[VBA]Dim lngRows as Long
With Worksheets("sheet1")
lngRows = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range("A1" & lngRows).Copy
End With
Worksheets("Sheet2").Range("A1").PasteSpecial xlPasteValues[/VBA]
Regards,
Rory
Thanks