Last Row and Column

  • Thread starter Thread starter Pubert
  • Start date Start date
P

Pubert

Is there a VBA Function that will give me the last used
column and row? Or what suggestions does anybody have?
 
Courtesy of John Peltier in an earlier post........

This tells me the address of the highest nonblank cell in column C:

Range("$C$65536").End(xlup).Address

This tells you the row:

Range("$C$65536").End(xlup).Row
 
Pubert said:
Is there a VBA Function that will give me the last used
column and row? Or what suggestions does anybody have?

lastRow = Cells(rows.Count, ActiveCell.Column).End(xlUp).row
lastColumn = Cells(ActiveCell.row, Columns.Count).End(xlToLeft).Column
 

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