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
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
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
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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
 

petenaylor

New Member
Joined
Jan 29, 2010
Messages
5
Brilliant! Thanks ever so much for the quick response, they work just as I want.

Cheers
Pete.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,393
Messages
5,601,403
Members
414,449
Latest member
Pashtun

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