• 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 cells / rows after a specific date

mr_ordinaryboy

New Member
dear all,

I'm currently stuck with Excel and I hope you guys can help me.
I am looking to lock specific rows (in the screenshot: the forecast quantity) D6-O6, D9-O9, D12-O12, D15-O15, etc (until D24-O24) after a specific date has passed.
This date will be defined in D3-O6.
So the way it should work is as follow:
For Jan: Once the date in D3 has passed, then all cell the forecast quantity in D6, D9, D12, ... , D24 will be locked and no changes can be made again.
For Feb: Once the date in E3 has passed, then all cell the forecast quantity in E6, E9, E12, ... , E24 will be locked and no changes can be made again.
For March - Dec would be the same as above.

Other cells or rows like D7,D8,etc should be still editable.

Can someone help me with this? I think I might need Excel VBA but I'm just a newbie in this area.

Thank you very much in advance for all the help and support.

BR,
 

Attachments

  • excel worksheet.png
    excel worksheet.png
    40 KB · Views: 21
  • excel worksheet_data filled in.png
    excel worksheet_data filled in.png
    55 KB · Views: 19
Hi, you must first unlock manually all editable cells.​
Once a date has passed then your VBA procedure must unprotect the worksheet, lock the cells then protect the worksheet …​
 
Hey Marc,

thanks for your reply.
I have unlock all the editable cells.
as for the VBA, any help/guidance how to do so? I'm still very new in VBA and have unfortunately little to no experience in writing it :(
 
Last edited by a moderator:
as for the VBA, any help/guidance how to do so? I'm still very new in VBA and have unfortunately little to no experience in writing it
As it depends on what we can't see, missing informations, I have no experience in mind reading …​
 
Back
Top