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

Hi,
How can I retrieve the last row in a specified colum that full with
information?

I tried to use in Sheet2.Cells.SpecialCells(xlLastCell).Row
but in big numbers it flew.
thanks.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get Last Row

Hi Efi,

"Sheet2.Cells.SpecialCells(xlLastCell).Row"
This will give you the last row irrespective of column. As you asked,
you need to find out last row of a particular column that filled with
data. Try following but, some function should be there to minimize the
code.

Dim i As Integer

i=1

While ActiveSheet.Rows.Cells(i, 1).Value < "" '## here 1
represents column "A" ##'
i = i + 1
Wend
MsgBox i - 1

Nilopher.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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 05:44 PM.

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

About Us

"It's about Microsoft Excel"