View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Luc Luc is offline
external usenet poster
 
Posts: 23
Default Retrieving the last cell in a column and using this row number in

Thanxxxxx,

That did the job !!

Greetzzzzz,

Luc



"Jim Thomlinson" wrote in message
...
dim lngLastRow as Long

lngLastRow = cells(rows.count, "A").End(xlUp).Row

for cnt = 1 to lngLastRow
--
HTH...

Jim Thomlinson


"Luc" wrote:

I want the row number of the last cell in a column (column A) to be the
'To'
value in the counter below

For cnt = 1 To 500
.......

So i do not want to put 500 there, but the row of the last cell that
contains a value.(there are empty rows!)
Lets say the last cell would be A5412

What do i have to put there in place of the '500'



Thanx,

Luc

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
323 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!




--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
323 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!