I have 3 cells. If I enter data in any one of the cells, I want the other two cells to be locked out (IE, no data can be entered).
How can I do this?
I have 3 cells. If I enter data in any one of the cells, I want the other two cells to be locked out (IE, no data can be entered).
How can I do this?
What are the three cells?
B14, c14, d14
First make sure that the three cells are unlocked. Then protect the worksheet. The copy and paste the macro below into the worksheet code module.
![]()
Please Login or Register to view this content.
Sweet! Thanks a ton!
Oops. I'm actually trying to help a co-worker and he just told me that it will need to apply to only certain worksheets and also will need to apply to rows 14 - 44
Can you just give me the general format for that and I can amend it as needed? Thanks again!
You will have to loop through the appropriate worksheets and activate them one at a time. Then on each worksheet you will have to loop through rows 14 to 44 assigning a variable to the row number in the target address. You will also need to change the Intersect range to B14:D44. It may be a little tricky.
You can do this with Data Validation, you dont need VBA
Highlight the range you want, select DV from the DATA tab, select Custom, enter =COUNTA($E1:$G1)<2
Uncheck "ignore blanks"
Adjust ranges as needed
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks