• 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.

Disable cell

delta

Member
i want to disable few cells. first worksheet "sheet1" is disable except cells A2, C7, D12, E5, H11, H12, H13, H14. when i put data in cell A2 and hit enter then cell C7 is enable for put the data, and then respectively enter data and enable cell.
i need a macro for this problem.
 
Don't need macro, could do this with data validation.

Have all the cells except the first set listed be locked (cell format - Protection - locked), then protect sheet.

For the downstream cells, you use a Data Validation formula like

=$A$2<>""

That will prevent anything from being entered until A2 is filled. If you need multiple cells to be filled in first, can do

=AND($A$2<>"", $C$7<>"")

and so on.
 
Don't need macro, could do this with data validation.

Have all the cells except the first set listed be locked (cell format - Protection - locked), then protect sheet.

For the downstream cells, you use a Data Validation formula like

=$A$2<>""

That will prevent anything from being entered until A2 is filled. If you need multiple cells to be filled in first, can do

=AND($A$2<>"", $C$7<>"")

and so on.

Hi Luke M,

I tried the same but didn't work!

I locked all the cells except for A1 cell.
I put DV for B1 cell as =$a$1<>""
protected the sheet.

I still see the B1 as protected, and even if I have entered some text in A1?

How would this custom formula in DV helps to enable cell for editing?

Regards,
Prasad DN
 
Sorry, when I said "first set", I mean have cells A2, C7, D12, etc. be unlocked. Not just A1. The DV is what will prevent the downstream cells from being edited until the criteria is met.
 
Don't need macro, could do this with data validation.

Have all the cells except the first set listed be locked (cell format - Protection - locked), then protect sheet.

For the downstream cells, you use a Data Validation formula like

=$A$2<>""

That will prevent anything from being entered until A2 is filled. If you need multiple cells to be filled in first, can do

=AND($A$2<>"", $C$7<>"")

and so on.

I am trying to do something similar where I want to allow/restrict users from entering data in cells based on the values selected in the previous cell. For example:
If D1 = Yes, Then disable data entry in E1:K1,
If D1 = No, Then allow data entry in E1 but keep F1:K1 disabled and so on.

All of these cells are supposed to be values lists (drop downs). Can I used this method along with lists to disable data entry?

I tried conditional formatting, but since there are a lot of columns and rows, it just made my file too large and I hadn't even started putting in some of the formulas yet. The size went up to 50MB and took forever to open/save.

Any help is appreciated.

Thanks!
Saili
 
Back
Top