copying data

kevin1970

New Member
Joined
Jun 2, 2011
Messages
11
Hi
I am trying to copy the data from two sheets in to one

Sheets("Details").Range("a2:m2").Select
Selection.Copy

Dim Row As Long
Dim ws1 As Worksheet
Set ws1 = Worksheets("list")
Row = ws.Cells.Find(What:="", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False


this works well for a single sheet but don't know how to get the information from two sheets and add it to one sheet.
thanks
kevin
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,484
I don't believe I'd use the "keyword" Row as a variable as:

Dim Row As Long

Change as follows (the red portion) - and retry running...

Dim r As Long
Dim ws1 As Worksheet
Set ws1 = Worksheets("list")
r = ws.Cells.Find(What:="", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
 

kevin1970

New Member
Joined
Jun 2, 2011
Messages
11
Hi Jim
sorry i may have not explained it very well.
The coding works fine, what i am trying to achieve is coping one line from two work sheets (ie; two line in total from two work sheets) and place them into another worksheet.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,218
Members
417,131
Latest member
Seanr19871

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