Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default getting the adress on the last row

Hi
can i with
Set myRange2 = Range(Range("a1"), Range("a1").End(xlDown))

Get the last rows adress
like if the last post i have is in A11 then
get the adress A11

Reagrds
Alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default getting the adress on the last row

Try this

set myRange2 = Range(Range("a1"), Range("a1").End(xlDown))

With myRange2
i = .rows.count
j = .myRange2.cells(i,0).address
end with

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default getting the adress on the last row

Sorry
Have found out how

Alvin


"alvin Kuiper" wrote:

Hi
can i with
Set myRange2 = Range(Range("a1"), Range("a1").End(xlDown))

Get the last rows adress
like if the last post i have is in A11 then
get the adress A11

Reagrds
Alvin

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default getting the adress on the last row

Set rng = Cells(Rows.Count, "A").End(xlUp)
MsgBox rng.Address

"alvin Kuiper" wrote:

Hi
can i with
Set myRange2 = Range(Range("a1"), Range("a1").End(xlDown))

Get the last rows adress
like if the last post i have is in A11 then
get the adress A11

Reagrds
Alvin

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default getting the adress on the last row

To display the horizontal and vertical bounds on a range:


Sub Macro1()
Dim s As String
Set myRange2 = Range(Range("a1"), Range("a1").End(xlDown))
s = myRange2.Address
MsgBox (s)
With myRange2
nLastRow = .Rows.Count + .Row - 1
nLastColumn = .Columns.Count + .Column - 1
nFirstRow = .Row
nFirstColumn = .Column
End With
MsgBox ("first row " & nFirstRow)
MsgBox ("last row " & nLastRow)
MsgBox ("first column " & nFirstColumn)
MsgBox ("last column " & nLastColumn)
End Sub

--
Gary's Student


"Toppers" wrote:

Set rng = Cells(Rows.Count, "A").End(xlUp)
MsgBox rng.Address

"alvin Kuiper" wrote:

Hi
can i with
Set myRange2 = Range(Range("a1"), Range("a1").End(xlDown))

Get the last rows adress
like if the last post i have is in A11 then
get the adress A11

Reagrds
Alvin

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
can i import an adress book Rick New Users to Excel 2 May 16th 10 05:06 PM
error with adress function denbee Excel Discussion (Misc queries) 2 July 16th 08 08:48 PM
Can Excel Adress Envelopes? Donald Excel Worksheet Functions 1 September 20th 06 07:52 PM
Find value and adress acces[_6_] Excel Programming 1 January 23rd 04 12:42 PM
Adress of Copied Range Luis Carrion Excel Programming 1 August 14th 03 04:05 AM


All times are GMT +1. The time now is 04:17 PM.

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"