I am trying to copy from one work sheet to another in excel 03. Every time something is copied to the next file I want want it to move over a column or down a row. So far I have the the code to copy from one sheet to another but can not get it to move to the next row or column.If you could help me out that would be great!
This is what I have for rows:
I want to be able copy from a sheet and then add to row H. Is there a loop that I could run for this?Sub cablef() ' ' cablef Macro ' Macro recorded 7/27/2011 by Anthony Bryant ' ' Keyboard Shortcut: Ctrl+q ' Range("C8").Select Selection.Copy Sheets("Cable Fab").Select Range("C19").Select ActiveSheet.Paste End Sub I want it to paste at C20 next time and C21 after that. Is there a loop or something that I can do for this. This is what the code I have for selecting columns. Sub start() ' ' start Macro ' Macro recorded 7/27/2011 by Anthony Bryant ' ' Keyboard Shortcut: Ctrl+u ' Sheets("Start #'s").Select Range("F2").Select Selection.AutoFill Destination:=Range("F2:G2"), Type:=xlFillDefault Range("F2:G2").Select Range("G3").Select Sheets("Jun 11").Select Range("D8").Select Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G4").Select Sheets("Jun 11").Select Range("D10").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G5").Select Sheets("Jun 11").Select Range("D13").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G6").Select Sheets("Jun 11").Select Range("D14").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Sheets("Jun 11").Select Range("D15").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select Range("G7").Select ActiveSheet.Paste Range("G8").Select Sheets("Jun 11").Select Range("D16").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G9").Select Sheets("Jun 11").Select Range("D17").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G10").Select Sheets("Jun 11").Select Range("D18").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G11").Select Sheets("Jun 11").Select Range("D19").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G12").Select Sheets("Jun 11").Select Range("D22").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select Range("G13").Select ActiveSheet.Paste Range("G14").Select Sheets("Jun 11").Select Range("D23").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste Range("G12").Select Sheets("Jun 11").Select Range("D21").Select Application.CutCopyMode = False Selection.Copy Sheets("Start #'s").Select ActiveSheet.Paste End Sub
Any information would help!
Thanks!
Last edited by Paul; 07-27-2011 at 06:17 PM. Reason: Added code tags for user. Please do so yourself in the future.
Hi ajbryant
From your description and code I can't visualize what you're trying to do. Please post a before and after example workbook (with whatever code you have). Perhaps then we can help.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks