going to last row of data in a spreadsheet

N

North for Short

I have a spreadsheet which is connected to another spreadsheet, which I
have called Historical and youv'e guessed it, it contains lots and lots
of data. I have a macro which copies the daily data and transfers it to
the historical data but I want to be able to see the last row of data
and that is where my cusor is. I have asked mates and they have come
up with various formulas but it doesn't want to work. Can anybody help
me.:)

I have a formula but I can't get it to work:(

Sheets("Historical").Select
lastrow = Cells(Rows.Count, "a").End(xlUp).Row
Range("A: & Lastrow").Select
 
A

Andy Pope

Hi,

Nearly, just don't wrap you variable in quotes.

Range("A:" & Lastrow).Select

Cheers
Andy
 
N

North for Short

Andy Thanks I took out out the colon after trying your line and it work
a trea
 

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