finalrow question

J

joemeshuggah

i am using the following bit of code for a macro i am putting together:

Sheets("KPI").Select
Range("A2").Select
FinalRow = Range("A65536").End(xlUp).Row
Range("A2" & FinalRow).Select

at present (varies daily), column a on this sheet has data in cells
a2:a132...when i execute this portion of code, cell A2132 is selected instead
of a2 through the last row. i tried clearing contents and deleting all cells
from a133:iv65536, executed again, and still the same result. what would
cause this problem to occur?
 
M

Mike H

Try

Sheets("KPI").Select
FinalRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Range("A2:A" & FinalRow).Select

Mike
 
J

joemeshuggah

Worked perfectly!!! Thank you so much!!!

Mike H said:
Try

Sheets("KPI").Select
FinalRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Range("A2:A" & FinalRow).Select

Mike
 

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