Random moves of excel columns RRS feed

  • Question

  • In a large 2010 Excel workbook with multiple spreadsheets, I sometimes experience that a table column is moved one cell up for no apparent reason. It happens sometimes, not always. And not always in the same column. It happens after a large VBA code has run and written something to the workbook. But not necessarily to the sheet in question! In the example below, the left column is moved up one cell. Before the VBA code started, the table looked OK. Next time it ran, it lokked like this. After running the code a third time, it again looked fine. Later, a similar error occurred in another sheet after running the same code!

    No, there is no error in the VBA code (I believe). It appears to be an Excel bug. Anyone out there experienced anything similar?

    Regards, Sigurd



    AvgPrice A B C D E F G

    WeightedPrice 370,6 386,1 302,6 315,2 315,2 369,3 394,3

    Unused 381,4 406,3 327,6 350,1 341,6 380,2 404,2

    0,00 0,00 0,00 0,00 0,00 0,25 0,00

    Thursday, October 20, 2016 12:28 PM

All replies

  • Hi Sigurd Pederson,

    Honestly speaking, I'm afraid there should exist something wrong in VBA code.

    Please NOT mix up no syntax error with no run-time error, and examine code line by line. 

    Best Regards,

    Thursday, October 20, 2016 2:15 PM
  • Hi,

    Based on your description, I suggest you provide the code about your problem. This might be the reason of your problem.

    I'll move your question to the MSDN forum for Excel

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Emi Zhang
    TechNet Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact

    Friday, October 21, 2016 7:06 AM
  • Hi Sigurd Pedersen,

    I think that there is something wrong with your code.

    I agree with the suggestion given by the another community member.

    to debug your code line by line and verify the changes in sheet.

    possible that you used a title row.

    because of that when the data added to the excel sheet it will take a first row for title and after that data added.

    and I can see that there is no title in the left side column. so the data in that column will be pasted from first cell and create effect like this.

    still if your issue is exist then let me know and try to post the code here.

    so that we can try to run the code and check we got the same result like yours or not.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, November 3, 2016 5:29 AM