View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default xlCellTypeLastCell

Depends on your data, but perhaps

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

--
Regards,
Tom Ogilvy

"Kevin McCartney" wrote in
message ...
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