ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Last used row (https://www.excelbanter.com/new-users-excel/445622-last-used-row.html)

tofimoon4

Last used row
 
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.

Gord Dibben[_2_]

Last used row
 
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
wrote:


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.


tofimoon4

Quote:

Originally Posted by Gord Dibben[_2_] (Post 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
wrote:


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.

Gord Dibben[_2_]

Last used row
 
rng.Select


Gord


On Sun, 1 Apr 2012 17:17:25 +0000, tofimoon4
wrote:


'Gord Dibben[_2_ Wrote:
;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
wrote:
-

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.



All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com