+ Reply to Thread
Results 1 to 9 of 9

Want to delete all non-protected cells in a worksheet

  1. #1
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Want to delete all non-protected cells in a worksheet

    I've tried recording a macro for this, but it seems to lose something in the VBA

    Basically, I want a macro that I can use on any sheet (so will live in my PERSONAL file) that will delete the contents of all non protected cells within the active worksheet. I do not need (or want) to specify a range.

    If it's possible to have a version that will cycle through all worksheets with the workbook, great, but I'll be happy with just the active sheet.

    Thanks as always

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Want to delete all non-protected cells in a worksheet

    Hi Bill,

    Does this help? http://www.ehow.com/how_6047045_dele...readsheet.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Want to delete all non-protected cells in a worksheet

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-07-2013
    Location
    TOronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Want to delete all non-protected cells in a worksheet

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Re: Want to delete all non-protected cells in a worksheet

    Thanks all, I'll check when I'm back at work

  6. #6
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Re: Want to delete all non-protected cells in a worksheet

    Hi MarvinP the link seems all messed up??

    checked the link on my phone, that worked. The process is what I'd tried to record as a macro earlier, but it doesn't seem to record the steps to be able to rerun it.

  7. #7
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Re: Want to delete all non-protected cells in a worksheet

    UD2, this seems to work, but once it's used on a large sheet it pretty much seizes the PC up

  8. #8
    Registered User
    Join Date
    01-07-2013
    Location
    TOronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Want to delete all non-protected cells in a worksheet

    Hmmmm.

    The yeah it would be a slow operation. Did you include the screenuodating=false? It helps with the seizing .

  9. #9
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Shropshire, England
    MS-Off Ver
    Excel 2007 /10 /13
    Posts
    118

    Re: Want to delete all non-protected cells in a worksheet

    yes, but it ends up with me having to crash out of excel, as it's taking over 10 mins (well it's at that point I've stopped it, so probably longer)

+ 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