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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

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,118,661
Messages
5,573,477
Members
412,532
Latest member
crazzyapple
Top