View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
OrientalPearl OrientalPearl is offline
external usenet poster
 
Posts: 39
Default Conditional formula and a bit more...

Hi everyone,

I am trying to apply a conditional formula to a cell B1. Basically what
will happen is that

If A1 = "Good" Then
B1 = A2
//then lock B1
Else
//make B1 editable


I have done the first step using IF(A1 = "Good", A2, "") [not sure
about "" is suitable though] and setting cell property - tick 'Locked'
option. But how can the lock be released in the Else situation?

I wonder the neat way to do this is to code this in VB(similar to the
syntax above) rather than using Excel menu tools. But how can it make
sure that any changes to A1 will lead to INSTANT adjustment(To make
sure it happens IMMEDIATELY, should I put such a piece of code at a
certain place?) to B1, i.e. (either =A2 and then locked, or simply make
B1 editable as a normal cell).

Sorry Im relatively new to excel macro and the question above is
probably quite basic. Appreciate help of any kind.

Regards
Frank