xlCellTypeLastCell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I've been using the following code to ascertain the last typed cell, but
I have the problem of that when there is a data filter selected it doesn't
include the hidden rows, so it just returns the last visible cell, therefore
is there another function that will return the actual last cell even if there
is a data filter selected.

TIA

KM
 
Depends on your data, but perhaps

set rng = range("A1").currentRegion
lastRow = rng.rows(rng.rows.count).Row
 

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

Similar Threads


Back
Top