End Of File in Code

  • Thread starter Thread starter BatMan
  • Start date Start date
B

BatMan

I import files into a workbook. Is there a way in code, to determine the
last row in the file. Much like the CTRL END command takes you the
end of the file. I want to be able to get a numeric value that I store into
a variable.
 
this gives the last row in col A. of the active worksheet.
x=cells(rows.count,"a").end(xlup).row

BTW, file means workbook. there are worksheets within the workbook.
 

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