Forum Discussion
How can I protect multiple columns and still be able to add rows in an Excel table?
I have this table where I have to be very careful not to change data in certain columns. I need to protect the columns that contain formulas from accidentally entering data in those cells, but I need to still be able to insert new rows in the table with new data but not in the protected columns. Thank you for your help.
With the permission of everyone to add an example here.
In the uploaded file, a double click in column A (from line 2) opens an input box in which you can enter how many lines can be inserted.The lines are then inserted under the line that was double-clicked.
The password for the sheet protection is Onofrio (if necessary change in the code).
I don't think it's good to automatically insert rows when changes are made in a specific cell.Otherwise you have the problem that a new line is inserted with every change in the corresponding cell. For example, when you enter a value in the cell.
If you have made a mistake and change the value, a new line will be inserted again.
*I had the idea a long time ago somewhere on the Internet, I just don't know where, and I can't remember the source.
Anyway is just an additional example.
If it doesn't fit your project, please just ignore it.I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote any reply if it helps please, as it will be beneficial to more Community members reading here.
5 Replies
- NikolinoDEGold Contributor
With the permission of everyone to add an example here.
In the uploaded file, a double click in column A (from line 2) opens an input box in which you can enter how many lines can be inserted.The lines are then inserted under the line that was double-clicked.
The password for the sheet protection is Onofrio (if necessary change in the code).
I don't think it's good to automatically insert rows when changes are made in a specific cell.Otherwise you have the problem that a new line is inserted with every change in the corresponding cell. For example, when you enter a value in the cell.
If you have made a mistake and change the value, a new line will be inserted again.
*I had the idea a long time ago somewhere on the Internet, I just don't know where, and I can't remember the source.
Anyway is just an additional example.
If it doesn't fit your project, please just ignore it.I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote any reply if it helps please, as it will be beneficial to more Community members reading here.
- LuladraoCopper Contributor
NikolinoDE Thank you for the help. It worked exactly the way I need it. I'd like to have this macro handy if possible, so I could use it in another file.
- NikolinoDEGold ContributorYou Welcome.
I was glad to be able to help you.
Nikolino
I know I don't know anything (Socrates)
See for example Insert row in a table on protected worksheet
- LuladraoCopper ContributorThank you Hans. It worked as I need it.