Locking cells based on conditions

Solved
dédé65000 Posted messages 11 Status Membre -  
Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   -
Hello,

I would like to perform an operation in Excel and I don't see how to do it other than through a macro. Unfortunately, my programming skills are limited, so I'm turning to you for help.

I have a calendar spanning several years broken down by week. I need to enter a date into a cell.
Once the date from that cell is entered, I would like to ensure that all data to the left of the entered date cannot be modified (lock the cells) unless the user enters a predetermined code.

Is this possible?


If you could lend me a hand, that would be really nice.

Thank you in advance

Configuration: Windows 7 / Chrome 37.0.2062.124

9 réponses

Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   5 145
 
Re,

So select the range B9:DA21
Data/Data Validation/Option tab/in Allow, select Custom/in Formula enter this formula that will take into account the year and the week
=AND(B$6=$C$2;B$7>$C$3)

you can also add a custom message in the dialog box, to do this before closing the wizard go to the Error Alert tab
in Title enter a title and in Error message a short custom text

A+
Mike-31

A period of failure is a perfect time to sow the seeds of knowledge.
1