extracting information from populated cells

  • Thread starter Thread starter sds
  • Start date Start date
S

sds

I need to export data from one excel file to another but
without defining a set selection area as the amount of
data varies and i do not want any blank entries or entries
missed. Any help please!!??
 
activesheet.copy After:=Workbooks("Book2.xls").Worksheets(1)

as far as removing blanks and so forth, one would need to know more
information about the data being copied.
 
on my spreadsheet, the first columns used for data are A:8
to U:8 as all above is used for company logo. The A to U
will remain constant, however 8 may goto 10 one day, or
200 the next. Ive been doing by selecting A:8 to U:8, down
to A:50 to U:50. This bypasses the logo, but if there only
30 entries then i still get 20 empty fields extracted
across.
Many thanks
 
Dim rng as Range
With Activesheet
set rng = .Range(.Range("A8"),.Cells(rows.count,1).End(xlup)).Resize(,21)
End With
rng.copy Workbooks("Book2.xls").Worksheets(1).Range("A1")

if column A will have an entry in the last row.
 
Back
Top