View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JohnDK[_3_] JohnDK[_3_] is offline
external usenet poster
 
Posts: 1
Default Recognize first emtpy Cell in column


How can i code to copy range (which is not always going to be the same
from one book.sheet to another. The code would have to look for th
first emtpy cell in
the latter book, and thenn paste.
Currently i select all cells (which i dont want, i need to select al
data cells without header row) and paste in new book after selectin
range. Range is dynamic , so i have to code to look for first emtp
cell where i need to paste.

any ideas.
Thanx

[color=RoyalBlue][color=Blue]ActiveSheet.Cells.Select
ActiveSheet.Cells.EntireColumn.AutoFit
ActiveSheet.Range("c1").Sort _
Key1:=ActiveSheet.Columns("c"), _
Header:=xlYes
ActiveSheet.Cells.Select
Selection.Copy

Workbooks.Open "C:\Documents and Settings\User\Desktop\ALLTIE.xls",
False
AppActivate "Microsoft Excel"ActiveSheet.Cells.Select
ActiveSheet.Past

--
JohnD
-----------------------------------------------------------------------
JohnDK's Profile: http://www.excelforum.com/member.php...nfo&userid=718
View this thread: http://www.excelforum.com/showthread.php?threadid=48240