Get Last Row

  • Thread starter Thread starter efi
  • Start date Start date
E

efi

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.
 
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.
 

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