Last used row

T

tofimoon4

Dear sir,with best regards,i have in my worksheet more than (10000) use
rows,how can i reach the last row which is full of data directly ( by
code )
Many thanks in advance
 
G

Gord Dibben

Assuming Column A represents all rows.........go to bottom of sheet
then come up to last filled cell.

Sub select_last()
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp)
msgbox rng.Address
End Sub


Gord
 
T

tofimoon4

'Gord Dibben[_2_ said:
;1600287']Assuming Column A represents all rows.........go to bottom o
sheet
then come up to last filled cell.

Sub select_last()
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp)
msgbox rng.Address
End Sub


Gord

On Fri, 30 Mar 2012 10:43:05 +0000, tofimoon4
Dear sir,with best regards,i have in my worksheet more than (10000 used
rows,how can i reach the last row which is full of data directly ( b a
code )
Many thanks in advance.-

Dear sir,with my thanks to your solution,i need a code that will guid
me to the last used row directly not point only.
My regards
 
G

Gord Dibben

rng.Select


Gord


'Gord Dibben[_2_ said:
;1600287']Assuming Column A represents all rows.........go to bottom of
sheet
then come up to last filled cell.

Sub select_last()
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp)
msgbox rng.Address
End Sub


Gord

On Fri, 30 Mar 2012 10:43:05 +0000, tofimoon4
Dear sir,with best regards,i have in my worksheet more than (10000) used
rows,how can i reach the last row which is full of data directly ( by a
code )
Many thanks in advance.-

Dear sir,with my thanks to your solution,i need a code that will guide
me to the last used row directly not point only.
My regards.
 

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

Top