ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Total of rows in UsedRange Area (https://www.excelbanter.com/excel-programming/299158-total-rows-usedrange-area.html)

me[_7_]

Total of rows in UsedRange Area
 
Hello All.

I have the following Code:

Option Explicit
Public Sub LastCell()
Dim X As Range
Set X = Range("A65536").End(xlUp).Offset(1, 0)
X.Select
X.Value = ????
End Sub

I need help getting the value of the number of rows in the usedrange area to
put in a cell that is in the row just under the last row.
Any suggestions?

Any help appreciated






Tom Ogilvy

Total of rows in UsedRange Area
 
Option Explicit
Public Sub LastCell()
Dim X As Range
Set X = Range("A65536").End(xlUp).Offset(1, 0)
X.Select
X.Value = x.row - 1
End Sub

--
Regards,
Tom Ogilvy



"me" wrote in message
om...
Hello All.

I have the following Code:

Option Explicit
Public Sub LastCell()
Dim X As Range
Set X = Range("A65536").End(xlUp).Offset(1, 0)
X.Select
X.Value = ????
End Sub

I need help getting the value of the number of rows in the usedrange area

to
put in a cell that is in the row just under the last row.
Any suggestions?

Any help appreciated









All times are GMT +1. The time now is 09:40 AM.

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