Copying column data from one sheet to another

petenaylor

New Member
Joined
Jan 29, 2010
Messages
5
Hi all

I am new to Macros and I need a little help with a project I have just been given. I have two sheets in an Excel workbook. One has the information in column D starting in cell D2 in my 'source' sheet.

I want to be able to copy all the entries in that column to another sheet called 'empty' and start the import in cell D10.

The thing is there will be a different amount of entries in the column in the 'source' sheet so I will need a loop.

Can anyone help?

Many thanks
Pete
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try:

Code:
Sub test()
With Sheets("Source")
.Range("D2:" & .Cells(Rows.Count, 4).End(xlUp).Row).Copy Sheets("Empty").Range("D10")
End With
End Sub

Dom
 
Upvote 0
Try

Code:
Sub Cpy()
Dim LR As Long
With Sheets("Source")
    LR = .Range("D" & Rows.Count).End(xlUp).Row
    .Range("D2:D" & LR).Copy Destination:=Sheets("Empty").Range("D10")
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,054
Latest member
juliecooper255

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