ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Row number of last cell with data (https://www.excelbanter.com/excel-programming/393064-row-number-last-cell-data.html)

Sue

Row number of last cell with data
 
Hi all.

I'm trying to find the code for obtaining the row number of the last cell
with data in a spreadsheet. This is probably an easy one. I don't see any
posts jumping out at me about it though.
--
Sue
Programmer/Data Analyst
Minnesota

Dan R.

Row number of last cell with data
 
Sub Test()
lRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
MsgBox lRow
End Sub

--
Dan


Ron de Bruin

Row number of last cell with data
 
See
http://www.rondebruin.nl/last.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Sue" wrote in message ...
Hi all.

I'm trying to find the code for obtaining the row number of the last cell
with data in a spreadsheet. This is probably an easy one. I don't see any
posts jumping out at me about it though.
--
Sue
Programmer/Data Analyst
Minnesota


Sue

Row number of last cell with data
 
Thanks, Dan!
--
Sue
Programmer/Data Analyst
Minnesota

Sue

Row number of last cell with data
 
Thanks, Ron! Nice website!
--
Sue
Programmer/Data Analyst
Minnesota



All times are GMT +1. The time now is 10:05 AM.

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