Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 10
Post Excel macro to copy rows in one sheet and insert into another sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Excel macro to copy rows in one sheet and insert into another sheet

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
wrote:


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

  #3   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by Gord Dibben[_2_] View Post
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
wrote:


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 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
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Excel macro to copy rows in one sheet and insert into another sheet

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

On Thu, 17 May 2012 13:05:07 +0000, harishchet
wrote:

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

  #5   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by Gord Dibben[_2_] View Post
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

On Thu, 17 May 2012 13:05:07 +0000, harishchet
wrote:

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 row in sheet1 of workbook2.

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

Hoping I am clear with my explaination.

Thanks and Regards
HC


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Excel macro to copy rows in one sheet and insert into another sheet

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


On Fri, 18 May 2012 05:34:18 +0000, harishchet
wrote:

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 row
in sheet1 of workbook2.

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

Hoping I am clear with my explaination.

Thanks and Regards

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro: insert rows anywhere in the sheet excel Excel Programming 4 June 27th 10 08:20 PM
Macro to insert value from range on different sheet and copy sheet Diddy Excel Programming 3 August 15th 09 09:29 PM
copy rows based on conditions and insert them into another sheet... [email protected] Excel Programming 3 November 25th 07 10:22 PM
copy cells in two columns if in bold to another sheet and insert rows [email protected][_2_] Excel Programming 4 June 12th 07 06:01 PM
MAcro to copy and insert a sheet JackR Excel Programming 7 March 20th 06 01:07 AM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"