title: Moving a columns in all tables in a workbook
body: <p>I'm trying to move the columns &quot;pass/fail&quot; to the end of each table in my workbook, but I'm getting an error message:</p>
  <blockquote>
  <p>You can't rearrange cells within a table this way, because it might
  affect other table cells in an unexpected way.</p>
  </blockquote>
  <p>If I debug it vba highlights this part:</p>
  <pre><code>Range(&quot;A1&quot;).End(xlToRight).Offset(0, 1).EntireColumn.Insert
  </code></pre>
  <p>The macro:</p>
  <pre><code>Sub Macro1()
  
  Dim Sht     As Worksheet
  Dim Tbl     As ListObject
  
  For Each sht In Worksheets
      If sht.Name &lt;&gt; &quot;Original&quot; Then
          Set Tbl = sht.ListObjects(1)
          
          With Tbl
          .ListColumns(&quot;Pass/fail&quot;).Range.Cut
          Range(&quot;A1&quot;).End(xlToRight).Offset(0, 1).EntireColumn.Insert
          End With
          
          
          With Tbl.Sort.SortFields
                  .Clear
                  .Add Key:=Tbl.DataBodyRange.Columns(9), _
                       SortOn:=xlSortOnValues, _
                       Order:=xlDescending, _
                       DataOption:=xlSortNormal
          End With
          With Tbl.Sort
              .Header = xlYes
              .MatchCase = False
              .Orientation = xlTopToBottom
              .SortMethod = xlPinYin
              .Apply
          End With
  
  
  End If
  Next sht
  End Sub
  </code></pre>
  <p>How can I move the columns without the error message?</p>