lundi 5 octobre 2015

In Excel, is there a way to combine if-then with lock cell in a macro?

I have a checklist with two columns. Both are drop-downs using Data Validation. The left column is YES/NO, while the right column is A/B.

I unlocked the two columns and protected the sheet.

What I want is for the user to first select the YES/NO cell. If they select YES, they will go on to select A/B. If they select NO, the right column turns black and gets locked such that the user cannot select or edit it.

I know how to use conditional formatting to do the 'turn black' part. However, I am unsure how to lock cells as described. I tried using macros but am unfamiliar with VBA and how to run such a macro.

Could anyone please advise on how to set-up such a macro?

Aucun commentaire:

Enregistrer un commentaire