LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ryk Ryk is offline
external usenet poster
 
Posts: 36
Default Find last row macro problem

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
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
Find & Replace in VB macro JackC Excel Discussion (Misc queries) 1 August 24th 05 09:22 PM
hide a worksheet so that a macro can still find it frendabrenda1 Excel Worksheet Functions 1 June 17th 05 04:30 PM
How do I use find in a macro in Excel Layna Excel Worksheet Functions 2 May 20th 05 02:20 PM
Macro problem Jim New Users to Excel 2 March 16th 05 07:36 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM


All times are GMT +1. The time now is 11:47 PM.

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

About Us

"It's about Microsoft Excel"