+ Reply to Thread
Results 1 to 4 of 4

insert rows with the formula in a protected sheet

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    California, United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    insert rows with the formula in a protected sheet

    Hi,

    I have a spreadsheet that runs from A23 through Q31. I have formulas in column H, I, O and P. I protected the sheet but it wont let me insert/delete rows. And if i run a macro for inserting rows, the columns H, I, O and P doesnt have the formula and it wont even let me drag it because the sheet is protected. I am pretty new to VB and it would be great if someone can help me with this. I want to able to protect the sheet so that the user cant edit the formulas but at the same time they should be able to insert and delete rows.

    Thank you so much in advance.

  2. #2
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: insert rows with the formula in a protected sheet

    You could unlock you sheet in the macro and relock it at the end with these commands
    ActiveSheet.Unprotect
    ActiveSheet.Protect
    When you insert the new row/rows copy the cells with the formulas, then paste them into your new row/rows. All this can be done with VBA. I am not of you comfort level with writing the scripts. Good luck!

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    California, United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: insert rows with the formula in a protected sheet

    Thank you for your answer. But I do not want the user to know the password and unprotect the sheet at any moment. Can this be achieved by VBA? Again, I want to run a macro in my spreadsheet which lets users insert a row with the formula in the column. To simplify, L22 has formula = =E22*H22*K22 ; L23 has formula = =E23*H23*K23 and so on.

  4. #4
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: insert rows with the formula in a protected sheet

    This link will show you how to password protect you VBA code

    http://www.ozgrid.com/VBA/protect-vba-code.htm

    This way no one will be able to see you password.

+ 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. [SOLVED] Insert row and copy formula in protected sheet
    By impresxy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2017, 02:57 AM
  2. Insert rows in a protected sheet
    By aneshree in forum Excel General
    Replies: 7
    Last Post: 12-09-2013, 11:31 AM
  3. Insert row and then copy above formula on protected sheet
    By Rinto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2013, 02:45 AM
  4. Copy and paste insert rows with protected cells in protected worksheet
    By excel_gecko in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 05:50 PM
  5. [SOLVED] Code to cut and paste rows (insert cut cells) in a protected Excel sheet
    By bob.mc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-27-2012, 04:47 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