+ Reply to Thread
Results 1 to 4 of 4

Automatically Sort data in three columns when I update column E (Protected Sheet)

  1. #1
    Registered User
    Join Date
    03-08-2016
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Question Automatically Sort data in three columns when I update column E (Protected Sheet)

    I need to automatically sort the data in Columns E B and G in a worksheet which is protected for changes.
    The macro below is mainly recorded. It appears to work fine but when I close and op the workbook I get the following error

    The workbook has to be recovered and the following error displays
    Removed Records: Sorting from /xl/worksheets/sheet1.xml part.
    There does not appear to be any data missing.

    Does anyone know how to fix the error/correct the macro?

    Please Login or Register  to view this content.
    Last edited by alansidman; 03-08-2016 at 11:11 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Automatically Sort data in three columns when I update column E (Protected Sheet)

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-08-2016
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Re: Automatically Sort data in three columns when I update column E (Protected Sheet)

    Ok Alan you got me. I forgot about debugging. Tried this and it finds nothing. The macro runs like a dream until I save the file and try to reopen it again.

    On further investigation it seems that the error only occurs the second time the macro runs.
    If I open the file having recovered it save it over the original. Open it fresh run the macro by chaging a M to and X in column E, I can save and open no problem. If I make a second change it produces the error as before and has to recover the workbook. I think I need code to clear the sort settings each time?
    ""The workbook has to be recovered and the following error displays
    Removed Records: Sorting from /xl/worksheets/sheet1.xml part.
    There does not appear to be any data missing
    .""

  4. #4
    Registered User
    Join Date
    03-08-2016
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Re: Automatically Sort data in three columns when I update column E (Protected Sheet)

    Hey Alan

    Thanks for sending me down the right track. I added
    Please Login or Register  to view this content.
    in the line before sort keys added and it fixed the problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Transfer/update columns from 1 sheet to another + update chart & data selection
    By Julien355 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2015, 11:54 PM
  2. Data Valitdation List Update and Sort Automatically.........
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2014, 05:56 AM
  3. Update link (Update values) on a protected sheet excel 2010
    By sonu1975 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2014, 09:49 AM
  4. Replies: 1
    Last Post: 10-22-2012, 01:16 PM
  5. Automatically sort new data by multiple columns
    By burtonlang in forum Excel General
    Replies: 3
    Last Post: 10-26-2009, 08:03 AM
  6. Data Sort A Protected Sheet
    By marko71 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2008, 10:35 AM
  7. Copying (Master) column to another sheet to automatically update
    By LostInVirtualSpace in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-19-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1