I would appreciate if someone can help me figure out a macro that will copy range (A3:T112) from "Step 1" sheet to next available row in "Step 2" sheet.
I would appreciate if someone can help me figure out a macro that will copy range (A3:T112) from "Step 1" sheet to next available row in "Step 2" sheet.
Last edited by koklok; 01-28-2009 at 05:37 PM.
Hello koklok,
Here is the code...
Sincerely,![]()
Worksheets("Step 1").Range("A3:T112").Copy Destination:=Worksheets("Step 2").Cells(Rows.Count, "A").End(xlUp)
Lieth Ross
Leith, unfortunately it's not working and I don't know what needs to be fixed.
I'm attaching an example and more details if that helps.
Thanks
Hello koklok,
This macro will paste only the values from the Range("A3:H6") on "Step 1" to the next empty row on "Step 2". Copy this code and paste it into a VBA module in your project.
Sincerely,![]()
Sub CopyData() Worksheets("Step 1").Range("A3:H6").Copy Worksheets("Step 2").Cells(Rows.Count, "A").End(xlUp).PasteSpecial Paste:=xlPasteValues End Sub
Leith Ross
Leith,
Thanks for your help but there seems to be a small glitch.
When range A3:H6 is pasted to sheet(step2), my last row has underscore in the last row and that's good, but when I run a macro for the 2nd time range pastes over the underscore.
So the bottom line is that every time I run a macro it pastes over the last row of previous macro.
I appreciate your help
Thanks
Hello koklok,
This should fix the problem...
Sincerely,![]()
Sub CopyData() Worksheets("Step 1").Range("A3:H6").Copy With Worksheets("Step 2") .Cells(Rows.Count, "A").End(xlUp)Offset(1,0).PasteSpecial Paste:=xlPasteValues End With End Sub
Leith Ross
Capture.JPGHello Friends... I have similar problem where I need some help.
I want to write a macro which would first autofilter based on "1" and than copy the specific range from one sheet and paste it to the next available row of a different sheet.
I have written a very basic macro for it but what I was is a loop so it could perform the same fucntion for n number of time.
I am putting down example of the data
Look forward to your reply.![]()
Sub test() Sheets("sheet1").Select Selection.AutoFilter Field:=3, Criteria1:="1" Set rng = Range("A1:C255") rng.Offset(1, 0).Resize(rng.Rows.Count - 1).Copy _ Destination:=Worksheets("sheet2").Range("A65536").End(xlUp).Offset(2, 0).Range("A1") ActiveSheet.ShowAllData Application.ScreenUpdating = False Range("A1").AutoFilter End Sub
Sam
Last edited by Cutter; 08-28-2012 at 07:24 PM. Reason: Added code tags
Hello sam_1981, and welcome to the forum.
Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.
Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
When you start your own thread please use code tags on your code - click Forum Rules button @ top of page to see instructions in rule #3.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks