title: moveColumns not moving to correct location when column number is lower than target
body: <p>I am currently using the moveColumns() function to move a column whenever it is not placed as column J (10). When the column is moved to a higher position, the function correctly moves the column back to J. However, when the column is placed at a lower position, the column is moving to I instead.</p>
  <p>My script is as follows currently:</p>
  <pre><code>  var ss = SpreadsheetApp.getActiveSpreadsheet();
    var dataName = &quot;Data&quot;;
  
    var dataSheet = ss.getSheetByName(dataName); // Data sheet
  
    var barOnePos = 10;
    var barOnePosA1Notation = columnToLetter(barOnePos);
    var barOneName = &quot;Royalty Splits / Rights Management&quot;;
  
    var currBarOnePos = getColumnId(dataSheet, barOneName);
    var currBarOnePosA1Notation = columnToLetter(currBarOnePos) + &quot;1&quot;;
  
    Logger.log(currBarOnePos);
    Logger.log(currBarOnePosA1Notation);
  
    if (currBarOnePos != barOnePos) {
      SpreadsheetApp.getUi().alert(&quot;\&quot;&quot; + barOneName + &quot;\&quot; should be column &quot; + barOnePosA1Notation + &quot;. This will be fixed automatically.&quot;, SpreadsheetApp.getUi().ButtonSet.OK);
      dataSheet.moveColumns(dataSheet.getRange(currBarOnePosA1Notation), barOnePos);
    }
  }
  </code></pre>
  <p>Could anyone explain why this is the case?</p>