+ Reply to Thread
Results 1 to 4 of 4

Inserting copied rows (some locked cells, some not) in a protected sheet

  1. #1
    Registered User
    Join Date
    03-07-2014
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    2

    Inserting copied rows (some locked cells, some not) in a protected sheet

    I've spent the afternoon searching the forum, and I haven't found a solution to my current problem. I would appreciate any help anyone can offer.

    I have a simple spreadsheet, protected to prevent accidental override of formulas. Each row has formulas (locked) and input cells (unlocked).

    I have several rows of data with a sum below, but I'd like to keep 2 unused rows (with locked formulas, but without inputs) between the last data row and the sum. Additional rows are often needed. Rather than simply "insert rows", I want to be able to copy the first unused row and insert the copied cells just above that row, so that the new row has all of the same formulas and there are still 2 unused rows between the data lines and the sum. I have no problem copying, but the sheet protection prevents me from inserting the copied cells.

    Users of the sheet need this copy/insert ability, but they will not have the capability to unprotect the sheet. Is there code that I could add to the sheet that would allow this action without unprotecting the sheet?

    Thank you!
    Last edited by kmartinez0180; 03-07-2014 at 08:10 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Inserting copied rows (some locked cells, some not) in a protected sheet

    Hi K,

    You could unprotect for just a moment and then reprotect after your insertion.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Inserting copied rows (some locked cells, some not) in a protected sheet

    Hi,

    You could create a macro that first switched off sheet protection, then copyied/inserted the unused row then finished by switching sheet protection back on.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    03-07-2014
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Inserting copied rows (some locked cells, some not) in a protected sheet

    Sorry, I should have been more clear. I need users of the sheet to be able to copy and insert copied cells, but those users will not have the ability to unprotect. I'll edit my original request to reflect this information. Thanks for the suggestion, though.

+ 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. Inserting copied cells (some locked, some not) in a protected sheet
    By kmartinez0180 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2014, 07:46 PM
  2. [SOLVED] Still move locked cells in a protected sheet.
    By Dinus in forum Excel General
    Replies: 2
    Last Post: 11-26-2013, 06:53 PM
  3. Protected Sheet and Locked Cells Compromised!
    By Winon in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-04-2012, 10:15 AM
  4. No Selection of Locked Cells on Protected Sheet
    By leaning in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 11:29 AM
  5. [SOLVED] Still can select locked cells in protected sheet
    By Andy in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 10-29-2005, 03: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