Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting range from address 2

Status
Not open for further replies.

venkman

Programmer
Oct 9, 2001
467
US
If I have a string variable that has an absolute address stored in it in r1c1 format (for insance "R13C2"), how do I get a range from that? I thought Range(sAddress) would work (where sAddress is the string in question), but it didn't.

I'm looking for a very simple solution. In the meantime I'm parsing the string using Instr() and Mid() to find out which number is the column and which number is the row.

Thanks,
Venkman
 
Here's a couple of examples:

Code:
r1c1Address = "R13C2"
Range(Application.ConvertFormula(r1c1Address, xlR1C1, xlA1)).Select

r1c1Address = "R13C2:R13C7"
Range(Application.ConvertFormula(r1c1Address, xlR1C1, xlA1)).Select[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top