Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Last row as value

Hi all,

Is there a way to get the last used cell's row number as value? For example,
if the last used cell is in the 78th row, I could get 78 as value.

thanks in advance!
--
sisco98
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Last row as value

If you want the last row in column A try:

lastRowNo = Range("A65536").End(xlUp).Row


"sisco98" wrote in message
...
Hi all,

Is there a way to get the last used cell's row number as value? For
example,
if the last used cell is in the 78th row, I could get 78 as value.

thanks in advance!
--
sisco98



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Last row as value

Either

Range("A2"),End(xlDown).Row

if there are no blanks in the data, otherwise

Cells(Rows.Count,"A").End(xlUp).Row

--
HTH

Bob Phillips

"sisco98" wrote in message
...
Hi all,

Is there a way to get the last used cell's row number as value? For

example,
if the last used cell is in the 78th row, I could get 78 as value.

thanks in advance!
--
sisco98



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Last row as value

thanks for both tips!
--
sisco98


"Bob Phillips" wrote:

Either

Range("A2"),End(xlDown).Row

if there are no blanks in the data, otherwise

Cells(Rows.Count,"A").End(xlUp).Row

--
HTH

Bob Phillips

"sisco98" wrote in message
...
Hi all,

Is there a way to get the last used cell's row number as value? For

example,
if the last used cell is in the 78th row, I could get 78 as value.

thanks in advance!
--
sisco98




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"