VBA Code to Protect and Unprotect a range of cells based on another cells' criteria

Anonymous
2024-10-31T21:08:08+00:00

Hi All, I've been scouring the internet for the past week for an answer and can't seem to find one similar to my situation. Hopefully you can help!

I have an excel with Data Validation (Drop Down Lists) in columns I:K, so I'm not able to use Data Validation for the protection/unprotect action.

Attached is my excel and what I'm trying to do is if column A = 'New', then Columns I:K will be protected (Uneditable), whereas columns M:P can be unprotect (Editable) and vice versa (if Column A = 'Carry Over', the Columns I:K will be unprotected (Editable), whereas columns M:P can be protect (Uneditable). I would also need this to be dynamic.

Any and all help would be greatly appreciated, thank you!

Season Code Season Launch Dept # Dept Name Class # Class Name Sub Class # Sub Class Name Collection Frame Finish Size Collection2 Frame3 Finish4 Size5
Carry Over 201 8 3
New
Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Newest
  1. Anonymous
    2024-11-01T12:53:49+00:00

    Phenomenal! Oh my gosh, this is amazing and works. Thank you so much for your help and quick response :)

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2024-10-31T22:00:01+00:00

    Oh, I'm sorry! I wasn't too sure if that would work. I removed the link and copied and pasted my table in the above.

    Was this answer helpful?

    0 comments No comments
  4. HansV 462.7K Reputation points MVP Volunteer Moderator
    2024-10-31T21:16:13+00:00

    The link requires a login.

    Was this answer helpful?

    0 comments No comments