Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have been trying to figure out how to do this. I have 2 worksheets, A and B.
Need to copy row 3 on worksheet B and paste it down as many rows as there are on worksheet A. Example, if the last row of data on A is in row 4500, then I need to copy Row 3 on B and paste it from row 4 through 4500 of worksheet B. The # of rows on A will change each time. I know how to do all the copy/paste stuff, but am stuck on how to direct VB on how many rows to paste down. Would appreciate help very much on this.....thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this should help
lastrow = Sheets("sheet3").Cells(Rows.Count, "a").End(xlUp).Row MsgBox lastrow -- Don Guillett SalesAid Software "Paige" wrote in message ... Have been trying to figure out how to do this. I have 2 worksheets, A and B. Need to copy row 3 on worksheet B and paste it down as many rows as there are on worksheet A. Example, if the last row of data on A is in row 4500, then I need to copy Row 3 on B and paste it from row 4 through 4500 of worksheet B. The # of rows on A will change each time. I know how to do all the copy/paste stuff, but am stuck on how to direct VB on how many rows to paste down. Would appreciate help very much on this.....thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
lastrow = Worksheets("A").Cells(rows.count,1).End(xlup).row
worksheets("B").Rows(3).copy Destination:= _ Worksheets("A").Range("A4").Resize(lastrow-3).EntireRow -- Regards, Tom Ogilvy "Paige" wrote: Have been trying to figure out how to do this. I have 2 worksheets, A and B. Need to copy row 3 on worksheet B and paste it down as many rows as there are on worksheet A. Example, if the last row of data on A is in row 4500, then I need to copy Row 3 on B and paste it from row 4 through 4500 of worksheet B. The # of rows on A will change each time. I know how to do all the copy/paste stuff, but am stuck on how to direct VB on how many rows to paste down. Would appreciate help very much on this.....thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Don and Tom; they both work great!
"Tom Ogilvy" wrote: lastrow = Worksheets("A").Cells(rows.count,1).End(xlup).row worksheets("B").Rows(3).copy Destination:= _ Worksheets("A").Range("A4").Resize(lastrow-3).EntireRow -- Regards, Tom Ogilvy "Paige" wrote: Have been trying to figure out how to do this. I have 2 worksheets, A and B. Need to copy row 3 on worksheet B and paste it down as many rows as there are on worksheet A. Example, if the last row of data on A is in row 4500, then I need to copy Row 3 on B and paste it from row 4 through 4500 of worksheet B. The # of rows on A will change each time. I know how to do all the copy/paste stuff, but am stuck on how to direct VB on how many rows to paste down. Would appreciate help very much on this.....thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting specific rows out of one worksheet based on an identifi | Excel Discussion (Misc queries) | |||
Insert Rows Based on values in another worksheet | Excel Discussion (Misc queries) | |||
Cutting Rows from one Worksheet to another based on a value | Excel Discussion (Misc queries) | |||
Worksheet Parsing of Rows Based Upon Column Value | Excel Programming | |||
searching for specific criteria and then doing an action based on | Excel Discussion (Misc queries) |