r1c1 referencing in macros


Posted by Phil Riley on September 13, 2001 6:24 AM

R1C1 referencing is supposed to be much easier than A1 style in macros, but I can't figure out how to use it! How can I write the equivalent of :

Sheets("sheet1").Range("A1:C2").select

in R1C1 style?



Posted by Juan Pablo on September 13, 2001 7:16 AM

Range forces the references to be in "A1" style, but you can use the Cells property to work "like" in R1C1 style. Your range should look like this:

Sheets("sheet1").Range(Cells(1,1),Cells(2,3)).Select

What i do is tell Range the Upper left corner of the area and the lower right corner to select them.

Juan Pablo