Adding Data at the End of a excisting Collum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to add data from a file of which the content changes every day, into
an other file in which a database is allready implanted.

To go short, how can I insert data from a collum beneath the allready
available data?

For now I use this code:

Windows("Bron.xls").Activate
Range("A2:A109").Select
Selection.Copy
Windows("Kostenbeheerssysteem Vorm I 3 februari 2005.xls").Activate
Range("C27:C134").Select
ActiveSheet.Paste

Thanks in advance!
 
use this statement

range("a2").end(xldown).offset(1,0)
will take you to the cell after the last cell in column A
 
Sub AppendColumn()
Dim sh as Worksheet
Dim rng as Range, rng1 as Range
set sh = Workbooks("Bron.xls").Activesheet
set rng = sh.Range(sh.Cells(1,2),sh.Cells(1,2).End(xldown))
With Workbooks ("Kostenbeheerssysteem Vorm I 3 februari 2005.xls") _
.Activesheet
set rng1 = .Cells(rows.count,3).End(xlup)(2)
End with
rng.copy Destination:=rng1
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top