Dynamic unlock a cell (under condition)
Hello guys, lets see if anyone could help me out on how to do this:
I have a sheet protected with a password, the reason of this (you know) is that there are some cells that are locked (to not see their formulas or 'cause I don't want them to be changed under any circustances). This is working fine, but now I have the need of some cells (two ranges actually, these are E7:E56 & N7:N56) that they come locked by default but under certain conditions I would need them to get unlocked. Taking an E7 as example, let's say that depending on what we have in B7 this E7 will change its status (locked or unlocked) and it will show some data or not. (Then it would be the same for the rest of the ranges). The conditions are as follow: IF B7 = "1x.xxx" or "2x.xxx" or "3x.xxx" or EMPTY THEN E7 = LOCKED & EMPTY IF B7 = "5x.xxx" THEN E7 = LOCKED & "YES" IF B7 = "4x.xxx" or "6x.xxx" THEN E7 = UNLOCKED & EMPTY As we see (as aclaration) we can have in B7 numers of 5 digits where first digit must start on 1 or 2 or ... up to 6. B7 can be EMPTY as second thing (or a number or empty). Actually there can be a 0 number as well (simuling the cell is empty though), but this one would be not shown itself. A small detail would be that the sheet is password protected for some reason (you may figure it out) and I am not really interested on let people get the password. I say this 'cause I've seen around some VBA codes where, to perform what I need: [lock & unlock cells] they protect & unprotect the sheet all the time using the password, and well you just need to ALT+F11 to see the code to find out the password, and well, as long as there is no (really) other way to do so, I would prefer to not doing it this way instead. Anyone knows how to perform this? VBA code? Any other way? Thank you very much in advanced. Victor |
All times are GMT +1. The time now is 07:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com