• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

locking cell with formatting

marioDC

New Member
Hi, I was wondering if it would be possible to lock cells by conditional formatting (or any other possibility).

For instance : i have a chart with the days of the year in each column. Every row will have a color when the column is a saterday or sunday (so actually i'm highlighting the weekends).

What i would like to accomplish is that all these colored weekends are automatically locked so users can only adjust the cells from monday to friday.

I know i can lock them all myself, but in this example I used sat-sunday, while actually I want to change these days frequently. Sometimes these weekends are mon-tuesday, sometimes wed-friday ....
 
Depends on what all you mean by locking? If you mean a complete format lockdown, like cell width/height, borders, etc., you can not do that w/o physically changing the cell properties and then locking the sheet. Granted, you could write a macro to speed things up, but it would be doing the same thing.


If you mean to prevent users from inputting data, that can be accomplished via Data Validation. For example, a Data Validation rule to prevent people from writing in cells with col A contains "Saturday" would be:

=$A2<>"Saturday"
 
Back
Top