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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,290
Messages
5,836,445
Members
430,430
Latest member
Tomexcel2022

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