Cell locking is not hard to understand, if you get a really good explanation.
If I understand correctly, once a cell has been locked/protected (I don't know the difference between the two)
a user can't change the contents of the cell.
A cell is either locked or unlocked. A worksheet is either protected or unprotected. On a protected sheet, there are restrictions on what the user can do to a locked cell, in particular you cannot change its content. When you protect the sheet, you may select from a list of options as to what restrictions you want to impose. If the sheet is unprotected, then whether a cell is locked or unlocked doesn't matter.
I went through the steps to lock/protect a range (column) and near the end it asked for a password to 'unprotect' the range. I thought this rather odd, as I would expect a password request to lock/protect the range, not unprotect it!
That doesn't sound right. You can optionally provide a password when protecting a sheet, but there are no passwords for locking cells. Then you must enter that password to unprotect the sheet.
As a bonus, all of my unprotected cells that had previously had the green marker in the upper left hand corner, now were rid of the marker.
The green marker is an indicator that Excel has detected a condition that it considers undesirable. I personally think Excel is overly aggressive with this but if you see them you should take the trouble to understand why you're getting them. I am not sure why the marker was cleared in this case.
I was hoping that Excel would clear the cells of rangeA, but not touch the locked/protected range.
The cells were after all a locked/protected range, were they not?
Well guess what? The locked/protected range was cleared along with the other cells.
I think you must have locked the cells but did not protect the sheet. Hard for me to say if I'm not sitting next to you.
What must I do to genuinely lock/protect a range and also be able to clear a range that includes this locked area?
To genuinely protect a range, you lock the cells, then protect the sheet. If you run code to clear locked cells, you must unprotect the sheet first, clear, then re-protect the sheet. Attempting to clear locked cells on a protected sheet is not simply ignored, it will cause an error (a runtime error if you are doing it in VBA code).
Bookmarks