Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
If I want to select Column A programmatically then Columns(A:A).select would work. Suppose I have a variable column to select and the counter for this column number is from a FOR loop then how do I use this counter to select that column. For ColumnCounter = 4 to 54 Columns (ColumnCounter & ":" & ColumnCounter).select 'do required stuff 'do required stuff Next ColumnCounter Now when i run the above, I would get an error as within Columns syntax above, ColumnCounter should be a string (from "A" to "IV"). So, how do I Translate/Map Column Numbers in to equivalent column letter/s. Can that be done programmatically? (One way is in my Personal.xls I can build a mapping with column A containing numbers from 1 to 256 and corresponding rows in column B having A to IV and then do a vlookup of ColumnCounter against A1 to B256. But is there a more efficient way?) Thanks a lot, Hari India |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB Syntax to select a range | Excel Discussion (Misc queries) | |||
Need help with creating a Range Name syntax | Setting up and Configuration of Excel | |||
Need help with creating a Range Name syntax | Setting up and Configuration of Excel | |||
Range syntax | Excel Programming | |||
range and cells syntax | Excel Worksheet Functions |