Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
referring to columns by number
Hi All,
I can refer to one column with its number like this: colNo = 2 Columns(colNo).Delete Shift:=xlToLeft How can I refer to more than one columns without converting column numbers to column letters, something like this: colNoFrom = 2 colNoTo = 5 Columns(colNoFrom:colNoTo).Delete Shift:=xlToLeft Thanks, Stefi |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
referring to columns by number
Columns(colNoFrom).Resize(, ColNoTo - ColNoFrom + 1).Delete Shift:=xlToLeft -- __________________________________ HTH Bob "Stefi" wrote in message ... Hi All, I can refer to one column with its number like this: colNo = 2 Columns(colNo).Delete Shift:=xlToLeft How can I refer to more than one columns without converting column numbers to column letters, something like this: colNoFrom = 2 colNoTo = 5 Columns(colNoFrom:colNoTo).Delete Shift:=xlToLeft Thanks, Stefi |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
referring to columns by number
Thanks Bob, I didn't think that it can be solved so tricky!
Stefi €˛Bob Phillips€¯ ezt Ć*rta: Columns(colNoFrom).Resize(, ColNoTo - ColNoFrom + 1).Delete Shift:=xlToLeft -- __________________________________ HTH Bob "Stefi" wrote in message ... Hi All, I can refer to one column with its number like this: colNo = 2 Columns(colNo).Delete Shift:=xlToLeft How can I refer to more than one columns without converting column numbers to column letters, something like this: colNoFrom = 2 colNoTo = 5 Columns(colNoFrom:colNoTo).Delete Shift:=xlToLeft Thanks, Stefi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referring to columns from within a macro | Excel Discussion (Misc queries) | |||
Referring to merged columns in range object | Excel Programming | |||
Referring to non constant columns | Excel Programming | |||
Number of Columns | Excel Discussion (Misc queries) | |||
referring to columns/cells using numbers | Excel Programming |