Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate the total area under a curve in excel? jjjjj Excel Worksheet Functions 1 January 26th 08 02:29 PM
total print area Brie Cheese Excel Discussion (Misc queries) 2 November 30th 07 05:38 PM
Real Value of .UsedRange.Rows.Count dazman Excel Worksheet Functions 2 August 25th 05 03:24 PM
how can i find total width of the columns in a printing area ? EXCELL COLUMN WIDTH Excel Discussion (Misc queries) 1 May 24th 05 11:35 PM
Problem with UsedRange.Rows.Count alainB[_15_] Excel Programming 4 April 29th 04 10:29 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"