Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
i would like to know how i can move entire columns within a worksheet itself. eg.- if i want to move column D and its entire contents, and insert it in between column A and B, how should i go about it? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i forgot to mention.. i have to use macros for that purpose
|
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub MoveColumns()
Columns("D:D").Cut Range("B1").Insert Shift:=xlToRight End Sub This should do the trick I like to refer to columns using their number left to right This example is a little more flexible Sub MoveColumns() x = 4 ' column to move y = 1 'to the right of which column Columns(x).Cut Cells(1, y + 1).Insert Shift:=xlToRight End Sub change the values of x and y accordingly http://www.excel-ant.co.uk 'underconstruction ruchie wrote: i forgot to mention.. i have to use macros for that purpose |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks!!
that helped! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
columns(4).Cut Columns(2)
-- Regards, Tom Ogilvy "ruchie" wrote: hi i would like to know how i can move entire columns within a worksheet itself. eg.- if i want to move column D and its entire contents, and insert it in between column A and B, how should i go about it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move two columns of data to four columns | Excel Discussion (Misc queries) | |||
move or copy sheets doesn't copy format | Excel Worksheet Functions | |||
Can I Move replace instead of Move copy | Excel Discussion (Misc queries) | |||
move multiple columns into single set of columns | Excel Discussion (Misc queries) | |||
Move/Copy or Copy/Insert worksheet? | Excel Discussion (Misc queries) |