+ Reply to Thread
Results 1 to 7 of 7

Trying to clear contents of a range of contiguous cells. Taking a very long time.

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    4

    Trying to clear contents of a range of contiguous cells. Taking a very long time.

    I am trying to clear the contents of a range of contiguous cells (containing formula) in Excel 2010 64bit. But it is taking a LONG time (read >30min to clear a range 288 x 100). Originally was doing it in VBA but it was taking too long so I started stepping through the macro and identified that the slow down was occurring on a particular sheet only. So the problem is in Excel....not VBA because it is still very slow when deleting the same range in Excel without using VBA. I've tried all the usual suspects including: Application.EnableEvents = False (run from the VBA Immediate window when using Excel without VBA), Setting to Example of slow clear contents5.xlsxExample of slow clear contents5.xlsxManual Calculation, Turning off screen updating, deleting all the conditional formatting on the sheet, removing any data validation from the sheet (yes all these at the same time). There are no links to external workbooks. I've even tried in VBA changing from .ClearContents to .Value = vbNullString. All to NO AVAIL! By way of background the file is about 72Mb #.xlsm. If I try to clear contents of larger ranges on other sheets in the same workbook it is instantaneous. If I copy the problem worksheet off to a new workbook, I can delete the problem range almost instantly.I look forward to hearing from anybody who has a solution to why deleting a range of cells should take so long! Again to clarify, I am using the terms "delete" and "clear contents" interchangeably, but they both mean "clear contents" (not delete and move up cells). P.S I've also looked into the reported conflict between Excel and Google Desktop Office Add-in (Office Button–>Excel Options–>Addins–>Com Addins and deselect Google Desktop Office Addin) but I didn't have Google Desktop Office Add-in so it isn't that.
    Last edited by DKahler; 06-04-2013 at 10:02 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Trying to clear contents of a range of contiguous cells. Taking a very long time.

    Does the culprit sheet contain volatile functions?

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Registered User
    Join Date
    06-04-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    4

    Re: Trying to clear contents of a range of contiguous cells. Taking a very long time.

    Example of slow clear contents5.xlsx

    Marcol,

    Thanks for your help. Attached a stripped down version of the problem file. Sheet "Readme" points to problem area

  4. #4
    Registered User
    Join Date
    06-04-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    4

    Re: Trying to clear contents of a range of contiguous cells. Taking a very long time.

    Marcol,

    Thanks for your reply. Stripped down file attached below.
    Example of slow clear contents5.xlsx

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Trying to clear contents of a range of contiguous cells. Taking a very long time.

    I had a bit of a problem loading your file (insufficient resources - on a 12gig ram I7, 5T hdd on win8 ????)

    But when it did load, i deleted that entire range pretty much instantly
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    06-04-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    4

    Re: Trying to clear contents of a range of contiguous cells. Taking a very long time.

    SOLUTION! MS Excel taking a long time to delete rows, delete columns, clear contents, copy or paste.
    There are a number of potential solutions to this problem. The ones found by others (in the forum) are indicated below, as are the ones which I identified pertinent to my particular situation.
    I suggest trying all of the following:
    Conflict between Excel and Google Desktop Office Add-in (Office Button–>Excel Options–>Addins–>Com Addins and deselect Google Desktop Office Addin) but I didn't have Google Desktop Office Add-in (found by others).
    Setting to Manual Calculation (found by others).
    Application.EnableEvents = False (run from the VBA Immediate window when using Excel without VBA) (found by others)
    Turning off screen updating (found by others).
    Deleting all the conditional formatting on the sheet (me).
    Removing any data validation from the sheet (me).
    Removing links to external workbooks (found by others).
    AND THE FINAL SOLUTION TO MY PROBLEM….
    The formulas were referencing out to column XFD as a design contingency. Even though there was no data beyond column KL, and the last cell with useful data (CTRL+End) was KL100, for some reason, on that particular sheet only, and in Excel 2010 only, Excel decided that there WAS data out to XFD (despite the CTRL+End test saying otherwise). To make matters even harder to identify the problem, running the same sheet in Excel 2007 32 bit does NOT have this problem. By changing the formula references back to a more reasonable range, the delete problem has disappeared.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Trying to clear contents of a range of contiguous cells. Taking a very long time.

    Im happy you found a solution, and that is, indeed, a very interesting "quirk" with 2010 - good to know/remember, thank you sharing that with us

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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