Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am using the following macro (it is one of three that are all the
same but point to different Month Sheets) to do two jobs at once, and the second part is acting oddly when copying from the Suggestions sheet and moving it into the Suggested Changes sheet. The first part copies to its month sheet just fine, but I want the suggestions copied too one sheet and to be one after the other. A1-A20 have values in my test run, so the effect if I run this twice, is I should see the same 20 lines of data one after the other, but I do not, the first run puts the data perfectly at the top starting at A1, but running it a second time places the next data starting in A996 not A21 as I think it should. Now if it is because I grab A1-Z1000 to copy, can I set it in the macro to only copy the used rows on suggestions sheet and correct this? Any ideas please? Sub copy2() ' ' copy1 Macro ' Macro recorded 8/22/2006 by ryk ' ' Keyboard Shortcut: Ctrl+t ' Range("A4:AX1006").Select Selection.Copy Sheets("Month Two").Select Range("A4").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Month Two").Select Range("A1").Select Selection.Copy Sheets("Month Two").Select Range("A1").Select ActiveSheet.Paste Range("B6:B1006").SpecialCells(xlCellTypeBlanks).E ntireRow.Delete Sheets("Suggestions").Select Range("A5:Z1000").Select Selection.Copy Sheets("Suggested Changes").Select Range("A1").Select mycell = Cells(Rows.Count, "A").End(xlUp).Row Range("A" & mycell).Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A" & mycell).Select End Sub Thanks for any help given... Ryk |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & Replace in VB macro | Excel Discussion (Misc queries) | |||
hide a worksheet so that a macro can still find it | Excel Worksheet Functions | |||
How do I use find in a macro in Excel | Excel Worksheet Functions | |||
Macro problem | New Users to Excel | |||
Macro to simply bring up the Find dialogue box?? | Excel Discussion (Misc queries) |