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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,383
Messages
6,119,198
Members
448,874
Latest member
Lancelots

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
Back
Top