ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How reference columns numerically (not Cells() ) (https://www.excelbanter.com/excel-programming/332327-how-reference-columns-numerically-not-cells.html)

McManCSU[_7_]

How reference columns numerically (not Cells() )
 

Is there a way to select columns on a numeric (vs alpha) notation? My
amount of columns is always changing so I want to reference them by
numbers. How can i do this and still get the WHOLE column?

This doesnt work...

Columns("2:numparts+2").Select

Thanks


--
McManCSU
------------------------------------------------------------------------
McManCSU's Profile: http://www.excelforum.com/member.php...o&userid=24379
View this thread: http://www.excelforum.com/showthread...hreadid=380629


keepITcool

How reference columns numerically (not Cells() )
 


Columns(2).Resize(,numparts).Select


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


McManCSU wrote :


Is there a way to select columns on a numeric (vs alpha) notation? My
amount of columns is always changing so I want to reference them by
numbers. How can i do this and still get the WHOLE column?

This doesnt work...

Columns("2:numparts+2").Select

Thanks



All times are GMT +1. The time now is 12:07 AM.

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