From: J.W. Aldridge on
Selection.Cut Destination:=Columns("B:B")

I recenty got a new pc at work with msoffice 2007.
A macro that i had previously recorded is no longer working.
The error message is as follows: (Followed by the code)

A selections including both inside a table and below it cannot be
copied and inserted into that table. Select cells outside the table
and try inserting the data again.
You have attempted to fill data in a way not supportted by the table.

code:

Sub work_nesi()

Columns("F:K").Select
Range("K1").Activate
Selection.Delete Shift:=xlToLeft
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Columns("F:F").Select
Selection.Cut Destination:=Columns("B:B")
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Range("A1").Select
End Sub
From: Gary Keramidas on

i only tested in 2010, but try this. no need to select

Sub work_nesi()

Columns("F:K").Delete Shift:=xlToLeft
Columns("B:B").Insert Shift:=xlToRight
Columns("F:F").Cut Destination:=Columns("B:B")
Columns("F:F").Delete Shift:=xlToLeft
Range("A1").Select
End Sub
--


Gary Keramidas
Excel 2003


"J.W. Aldridge" <jeremy.w.aldridge(a)gmail.com> wrote in message
news:1045f570-9f78-4230-9688-6763b75e736a(a)k31g2000vbu.googlegroups.com...
> Selection.Cut Destination:=Columns("B:B")
>
> I recenty got a new pc at work with msoffice 2007.
> A macro that i had previously recorded is no longer working.
> The error message is as follows: (Followed by the code)
>
> A selections including both inside a table and below it cannot be
> copied and inserted into that table. Select cells outside the table
> and try inserting the data again.
> You have attempted to fill data in a way not supportted by the table.
>
> code:
>
> Sub work_nesi()
>
> Columns("F:K").Select
> Range("K1").Activate
> Selection.Delete Shift:=xlToLeft
> Columns("B:B").Select
> Selection.Insert Shift:=xlToRight
> Columns("F:F").Select
> Selection.Cut Destination:=Columns("B:B")
> Columns("F:F").Select
> Selection.Delete Shift:=xlToLeft
> Range("A1").Select
> End Sub

From: Don Guillett on
If you desire to move col F to insert in col B, then this should work
Sub MoveColF()
Columns("F").Cut
Columns("B").Insert 'Shift:=xlToRight
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett(a)gmail.com
"J.W. Aldridge" <jeremy.w.aldridge(a)gmail.com> wrote in message
news:1045f570-9f78-4230-9688-6763b75e736a(a)k31g2000vbu.googlegroups.com...
> Selection.Cut Destination:=Columns("B:B")
>
> I recenty got a new pc at work with msoffice 2007.
> A macro that i had previously recorded is no longer working.
> The error message is as follows: (Followed by the code)
>
> A selections including both inside a table and below it cannot be
> copied and inserted into that table. Select cells outside the table
> and try inserting the data again.
> You have attempted to fill data in a way not supportted by the table.
>
> code:
>
> Sub work_nesi()
>
> Columns("F:K").Select
> Range("K1").Activate
> Selection.Delete Shift:=xlToLeft
> Columns("B:B").Select
> Selection.Insert Shift:=xlToRight
> Columns("F:F").Select
> Selection.Cut Destination:=Columns("B:B")
> Columns("F:F").Select
> Selection.Delete Shift:=xlToLeft
> Range("A1").Select
> End Sub