Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Er - somehow (how!) I read you wanted to insert 6 columns. Ignore my
previous and go with Dana's, or Columns("E").Insert Regards, Peter T "Peter T" <peter_t@discussions wrote in message ... Hi Swamy, If you record a macro - Columns("E:J").Select Selection.Insert Shift:=xlToRight But as recording macros also record unnecessary key strokes like selecting cells or, in this case, columns, it can be simplified - Sub InsertColumns() Columns("E:J").Insert Shift:=xlToRight End Sub This assumes of course you want to insert 6 columns between D & E. Regards, Peter T "Swamy" wrote in message ... Hi, I have 6 columns already in my Excel document. How can i insert a column between 4 and 5 using VBA macros? Thanks for your help. Swamy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Introduce Value in a cell with formula, option | Excel Discussion (Misc queries) | |||
Introduce decimal point in a list of values in column. | Excel Discussion (Misc queries) | |||
please introduce sorting by colors in excel | Excel Discussion (Misc queries) | |||
please introduce sorting by colors in excel | Excel Discussion (Misc queries) |