Thread: Pasting Error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Pasting Error

Hi,
Try thiS;

' find next blank row in column A
nextrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Range("d5").Select
Range("d5").Resize(ActiveCell.End(xlDown)).Copy Range("a" & nextrow)

"halem2" wrote:


hI:

I'm getting an error with this code because Copy Area and Paste Area
are not same size. The Copy Area is the same column but I never know
how many cells it is going to have. The Paste Area is right below the
last cell that contains data in a different column. Any help is
welcome.

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''
Range("DS5").Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Selection.Copy
'
Range("A5").Select
Do
If ActiveCell.Select < "" Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell = ""
'
ActiveSheet.Paste


thanks


--
halem2
------------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=502069