ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   R1C1 type refences in VBA for column identification (https://www.excelbanter.com/excel-programming/300651-re-r1c1-type-refences-vba-column-identification.html)

JWolf

R1C1 type refences in VBA for column identification
 
Range(Columns(1), Columns(3)).Select

John R. Reagan wrote:

How can you use R1C1 type identification when refering to columns? I would like to replace the statement
Columns("A:C").select with variables (say x and y) but cannot figure out the formating. The new statement
would look something like Columns( x & ":" & y).select.


keepITcool

R1C1 type refences in VBA for column identification
 
another road to Rome..
Activesheet.Columns(1).Resize(,3).Select

keepITcool

JWolf wrote:
Range(Columns(1), Columns(3)).Select
John R. Reagan wrote:
would look something like Columns( x & ":" & y).select.




John R. Reagan

R1C1 type refences in VBA for column identification
 
Thanks!


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com