Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Row from address of range

Is is possible to extract just the row number from a range address...
so I have E185 in a variable, How can I get just the 185 into a different
variable?
Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Row from address of range

On Thu, 21 Apr 2005 18:16:02 -0700, "KyWilde"
wrote:

Is is possible to extract just the row number from a range address...
so I have E185 in a variable, How can I get just the 185 into a different
variable?
Thanks!!


You could use the Row property:

Sub ExtractRow()
Dim Adr As Range
Set Adr = Range("E185")

Debug.Print Adr.Row

End Sub


--ron
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Row from address of range

If cell is active, var = activecell.row

"KyWilde" wrote:

Is is possible to extract just the row number from a range address...
so I have E185 in a variable, How can I get just the 185 into a different
variable?
Thanks!!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Row from address of range

As given, use the .Row property. There's also the .Column property
Useful too are the .Rows.Count and .Columns.Count properties.

For a safe and fast way to copy tables, this is my preferred method...
eg copy a named range from one sheet to another...

DIM Source as Range
DIM Target as Range
SET Source = Thisworkbook.Names.Item("MyList").RefersToRange
With Source
Set Target = _
Worksheets("Sheet2").Range("B2").Resize(.Rows.Coun t,.Columns.Count)

Target.Value = .Value
End with





"KyWilde" wrote:

Is is possible to extract just the row number from a range address...
so I have E185 in a variable, How can I get just the 185 into a different
variable?
Thanks!!

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
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),Range ... ? sarah Excel Worksheet Functions 0 February 17th 09 02:06 PM
How to create a range address with ADDRESS function? Steve McLeod Excel Worksheet Functions 1 December 18th 08 02:02 PM
Address Range [email protected] Excel Worksheet Functions 5 August 23rd 07 06:07 PM
Deleting Range name's listed in the range address box. Satnam Patel Excel Discussion (Misc queries) 4 May 5th 05 01:42 PM
range.address ? Mark Kubicki Excel Programming 3 November 26th 03 08:01 AM


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

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

About Us

"It's about Microsoft Excel"