I am an unexperienced user when it comes to VBA and hope to get help here.
I have a password protected excel sheet, in which cells in column B6:B89 are unlocked for user input. Columns C6:Z89 contain formulas, that lookup values in another excel sheet (cells c6:z89 are locked for editing)
Example: User inputs value 2 in column B, the formulas in row C2 to Z2 lookup values in the other excel sheet and automatically fill in cells c2:z2.
Since columns C to Z are locked for editing, users cannot make any changes, which I want anyway, WITH 1 EXCEPTION, and here I need help now with the coding:
If a user inputs value 262 into any row in column B6:B89, the corresponding row should then unlock cells in columns C to Z for editing and highlight this row (only rows which contain value 262 in column B, should unlock cells in columns c:Z, all others rows should remain locked)
I found a similar question in your forum, which I tried and made it work, HOWEVER, the code only works on the first row (guess, because target range is set to cell "B6"). Can someone suggest how to change the code, so that it would also unlock for example row C70:Z70, if a user inputs value 262 in column B70.
And finally, how could I make this code work in every sheet of my workbook without having to enter the code for each worksheet separately.
Here is the code, that I found in the forum and slightly adapted (as mentioned above, it only works for B6; if I enter value 262 in row B8, it does not unlock cells C8:Z8.
current code:
Thank you so much for you input and help!
Bookmarks