Row Count

E

Edgar Thoemmes

I have the following code but what i would like to do is
instead of using Range("A1:A15") i would like Range("A1 to
Row count)

so i would have a row count on column a and then to use
this value so it pastes all values from that column.

i have tried

aa = Columns("a").Rows.Count and then replacing the a15
with aa but this is returning an error - any ideas?

Range("A1:A15").Copy Destination:=outfile.Worksheets
("Remittance").Range("A16")
 
T

Tom Ogilvy

Range("A1:A" & cells(rows.count,1).End(xlup).row).Copy _
Destination:=outfile.Worksheets("Remittance").Range("A16")
 

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

Top