Excel macro to copy rows in one sheet and insert into another sheet

V

Vasanth

I need a excel macro to copy some rows in worksheet 1 to insert int
3rd row of worksheet 2. The number of rows to be copied depends on th
value present in column A3 of worksheet 1


eg .


AAA 123 2
BBB 456
DDD 789

here 2 in 1st row decides the number of rows to be copied


Please help me in this issue.


Thanks
Vasant
 
G

Gord Dibben

An observation and a question.

1. Looks like the number 2 is in C1, not A3

2. Which two of the three rows shown would you want copied to Sheet2?


Gord
 
H

harishchet

'Gord Dibben[_2_ said:
;1601782']An observation and a question.

1. Looks like the number 2 is in C1, not A3

2. Which two of the three rows shown would you want copied to Sheet2?


Gord

On Tue, 15 May 2012 05:51:23 +0000, Vasanth
I need a excel macro to copy some rows in worksheet 1 to insert into
3rd row of worksheet 2. The number of rows to be copied depends on the
value present in column A3 of worksheet 1


eg .


AAA 123 2
BBB 456
DDD 789

here 2 in 1st row decides the number of rows to be copied


Please help me in this issue.


Thanks
Vasanth-


Gord,
Even I have the same Issue.I need to copy data from one Excel t
another.Second Excel is a master copy where I ahve to Insert the dat
from the First sheet form the 2nd Row.Could you please help me out i
doing so!!!

Regards
H
 
G

Gord Dibben

Your great lack of detail makes it difficult to provide any help.

I am not sure what an "Excel" is

So far I see you have two sheets

Where would you like the data from row2 of First sheet inserted into
Master sheet?

This macro will copy row2 from sheet2 to last row in Master sheet.

Sub findbottom_paste()
Dim rng1 as Range
Set rng1 = Sheets("Master").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
Worksheets("Sheet2").Range("2:2").Copy _
Destination:=rng1
End Sub


Gord
 
H

harishchet

'Gord Dibben[_2_ said:
;1601855']Your great lack of detail makes it difficult to provide an
help.

I am not sure what an "Excel" is

So far I see you have two sheets

Where would you like the data from row2 of First sheet inserted into
Master sheet?

This macro will copy row2 from sheet2 to last row in Master sheet.

Sub findbottom_paste()
Dim rng1 as Range
Set rng1 = Sheets("Master").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
Worksheets("Sheet2").Range("2:2").Copy _
Destination:=rng1
End Sub


Gord

On Thu, 17 May 2012 13:05:07 +0000, harishchet
Gord,
Even I have the same Issue.I need to copy data from one Excel to
another.Second Excel is a master copy where I ahve to Insert the data
from the First sheet form the 2nd Row.Could you please help me out in
doing so!!!

Regards
HC-


Thnaks Gord for the reply.....

Let me tell you the requirement clearly.

I have 2 Workbooks...Workbook1 and workbook2.

I have to copy data from sheet1 in Workbook1 and insert to the 2nd ro
in sheet1 of workbook2.

Data can be of more than 1 row so this has to be inserted form Row2 o
sheet1 in workbook 2.

Hoping I am clear with my explaination.

Thanks and Regards
H
 
G

Gord Dibben

Getting closer.

Copy data from workbook1 sheet1 to workbook2 sheet1.

Insert copied data at row 2 of workbook2 sheet1.

Questions.................

Shift any existing data down?

Copied data from workbook1 sheet1 can be be more than one
row..........where is the data and how is the number of rows in that
data range determined?


Gord
 

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