![]() |
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!! |
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 |
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!! |
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!! |
All times are GMT +1. The time now is 11:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com