A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
If you just want the result of the formula, try
ActiveSheet.Range("E" & r).Value = ActiveSheet.Range("E1").Value
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I have a protected sheet contain formula in each row depends to above row( for example C2=C1+1; C3=C2+1;...).and cells contained these formula are locked.
I like to allow users to insert row everywhere by keeping formula without unprotecting the sheet. When I am clicking "insert row" while protecting the sheet, users could insert a row but the locked inserted cells are not including any formula and excel doesn't permit to copy formula of above cells. is there any solution?
Thanks
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
If you just want the result of the formula, try
ActiveSheet.Range("E" & r).Value = ActiveSheet.Range("E1").Value
The most likely explanation is that the row above the one that is inserted by the code does not contain any formulas.
Hello HansV.
Sorry to bother you again (in fact I thought i sent this once already but it doesn't show that i did).
I tested this at home and it worked, tried it at work on the spreadsheet i will actually use and it does not.
It says I have to debug it and highlights this part
Rows(CurRow - 1).SpecialCells(xlCellTypeFormulas).Resize
It will unlock and insert a row but won't carry the formula. Any clue as to what is wrong. It calls it an error 1004, an application or object error.
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
Good to hear that. Thanks for the feedback.