copy and paste special question

T

tweacle

I have copied some data over using copy and paste special and trying t
find a easy way to continue on sheet i.e I have on sheet 1 cell a
copied from sheet 2 cell a2 and sheet 1 cell b2 copied from sheet
cell e2. what im trying to do is to be able to copy the copy and past
special formula on. Therefore sheet 1 a3 is from sheet 2 a3 and sheet
b3 is from sheet 2 cell e3. I want to be able to copy the columns dow
so I dont have to copy and paste special every cell. Can anyone help
 
S

Sandy Mann

tweacle,

Assuming that there is no other data below the data that you want to copy
then try the Macro:

Sub CopyIt()

Dim LasteRow As Long
Dim LastaRow As Long

LastaRow = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
LasteRow = Sheets("Sheet2").Cells(Rows.Count, 5).End(xlUp).Row

Application.ScreenUpdating = False
Sheets("Sheet2").Activate

Sheets("Sheet2").Range(Cells(2, 1), Cells(LastaRow, 1)).Copy
Sheets("Sheet1").Range("A2").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Sheets("Sheet2").Range(Cells(2, 5), Cells(LasteRow, 5)).Copy
Sheets("Sheet1").Range("B2").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Application.CutCopyMode = False

Sheets("Sheet1").Activate

Application.ScreenUpdating = True
End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
T

tweacle

Sandy said:
tweacle,

Assuming that there is no other data below the data that you want to
copy
then try the Macro:

Sub CopyIt()

Dim LasteRow As Long
Dim LastaRow As Long

LastaRow = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
LasteRow = Sheets("Sheet2").Cells(Rows.Count, 5).End(xlUp).Row

Application.ScreenUpdating = False
Sheets("Sheet2").Activate

Sheets("Sheet2").Range(Cells(2, 1), Cells(LastaRow, 1)).Copy
Sheets("Sheet1").Range("A2").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Sheets("Sheet2").Range(Cells(2, 5), Cells(LasteRow, 5)).Copy
Sheets("Sheet1").Range("B2").PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Application.CutCopyMode = False

Sheets("Sheet1").Activate

Application.ScreenUpdating = True
End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk


"tweacle" (e-mail address removed) wrote in message

I have copied some data over using copy and paste special and trying
to
find a easy way to continue on sheet i.e I have on sheet 1 cell a2
copied from sheet 2 cell a2 and sheet 1 cell b2 copied from sheet 2
cell e2. what im trying to do is to be able to copy the copy and
paste
special formula on. Therefore sheet 1 a3 is from sheet 2 a3 and sheet
1
b3 is from sheet 2 cell e3. I want to be able to copy the columns
down
so I dont have to copy and paste special every cell. Can anyone help?







Brilliant Many Thanks
 
S

Sandy Mann

You're Very welcome, I'm glad that you got it to work

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top